Jump to content
  • 0
Sign in to follow this  

xml-rewrite-2.py not found for java-ant_xml-rewrite


Trying to emerge dev-java/ant-core (in the course of emerging libreoffice), I got the error:

ERROR: prepare
No binary for rewriting found.
Do you have dev-java/javatoolkit installed?
ERROR: dev-java/ant-core-1.10.5-r2::java-kit failed (prepare phase):
  xml-rewrite not found

Call stack:
    ebuild.sh, line   93:  Called src_prepare
  environment, line 4125:  Called java-ant_xml-rewrite '-f' 'build.xml' '-c' '-e' 'javadoc' '-a' 'failonerror' '-v' 'false'
  environment, line 1896:  Called die

I do have dev-java/javatoolkit installed.

I tried looking at the function java-ant_xml-rewrite() in core-kit/eclass/java-ant-2.eclass to fix it, but I don't even know what an eclass is. I did manage to figure out that it was looking for a file /usr/lib64/javatoolkit/bin/xml-rewrite-2.py, but all the files installed by dev-java/javatoolkit are in /usr/lib/javatoolkit/ instead. The "lib64" comes from a function get_libdir, and I don't know where that's defined.

I created a symlink /usr/lib64/javatoolkit pointing to /usr/lib/javatoolkit and then the emerge worked.

Are /usr/lib and /usr/lib64 even supposed to be separate directories? This is a newly installed Funtoo 1.4 system, and they were separate directories after the installation (so are /lib and /lib64).

Share this post

Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 1

Extract the stage3 you used for your installation inside an empty directory.

If lib is not a symlink to lib64 or usr/lib is not a symlink to usr/lib64 file a bug report identifying the defective stage3.


Share this post

Link to post
Share on other sites
  • 0

I used https://build.funtoo.org/1.4-release-std/x86-64bit/intel64-skylake/stage3-latest.tar.xz. Of course that's changed since. I used the version current around September 25 or 26, which is no longer available to download.

The current version—stage3-intel64-skylake-1.4-release-std-2019-10-11.tar.xz—still has separate /usr/lib and /usr/lib64, so it seems that would still cause this bug.

The stage3 tarball /lib is a symlink to /lib64, though (which is not the case on my system).

So should I move everything from /lib to /lib64, and everything from /usr/lib to /usr/lib64?

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...