gtkdoc-mkhtml does not work if /usr/local/bin appears before /usr/bin in PATH. The reason are these lines of code in /usr/bin/gtkdoc-mkhtml: 32 # FIXME: this is a hack to detect uninstalled 33 if test "x$0" = "x/usr/bin/gtkdoc-mkhtml" ; then 34 #echo "installed" 35 # the first two are needed to resolve datadir 36 prefix=/usr 37 datarootdir=${prefix}/share 38 gtkdocdir=/usr/share/gtk-doc/data 39 else 40 #echo "uninstalled" 41 gtkdocdir=`dirname $0` 42 fi Because, changing /etc/profile did not help, the only fix solution for me was to change line 33 in /usr/bin/gtkdoc-mkhtml to read: 33 if test "x$0" = "x/usr/local/bin/gtkdoc-mkhtml" ; then Reproducible: Always Steps to Reproduce: 1.If not already true position /usr/local/bin at the beginning of PATH in /etc/profile. 2. Try to emerge for example bluez with "doc" USE flag switched on. 3. Actual Results: The ebuild fails.
works just fine here with this PATH: PATH=/usr/lib/ccache/bin:/usr/lib/distcc:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.4.1:/usr/games/bin:/home/eva/devel/bin it's not clear what's your problem here.
Now, I tested it on another machine where it also works fine. Probably, there is a symbolic link /usr/local/bin -> /usr/bin on the machine where the problem occurs. I have to verify that later when I am back home.
(In reply to comment #1) > it's not clear what's your problem here. > @Dirk: Can you be more clear about your problem please, it sounds like confusing...
OK, on one of my machines there exists a symbolic link /usr/local/bin -> /usr/bin. If now, /usr/local/bin appears before /usr/bin in PATH and gtkdoc-mkhtml is invoked it gets invoked as /usr/local/bin/gtkdoc-mkhtml. In that case, the quoted code extract causes the variable `gtkdocdir' to be set to /usr/local/bin (instead of /usr/share/gtk-doc/data) and gtkdoc-mkhtml fails, because the stylesheet gtk-doc.xsl which is located in /usr/share/gtk-doc/data/ cannot be found. So, the reported problem appears only on machines that have a symbolic link /usr/local/bin -> /usr/bin. @Romain: Please let me know if this explanation is still confusing.
(In reply to comment #4) > OK, on one of my machines there exists a symbolic link /usr/local/bin -> > /usr/bin. > If now, /usr/local/bin appears before /usr/bin in PATH and gtkdoc-mkhtml is > invoked it gets invoked as /usr/local/bin/gtkdoc-mkhtml. > > In that case, the quoted code extract causes the variable `gtkdocdir' to be set > to > /usr/local/bin (instead of /usr/share/gtk-doc/data) and > gtkdoc-mkhtml fails, because the stylesheet gtk-doc.xsl which is located in > /usr/share/gtk-doc/data/ cannot be found. > > So, the reported problem appears only on machines that have a symbolic link > /usr/local/bin -> /usr/bin. > > @Romain: Please let me know if this explanation is still confusing. > it's absolutely clear now. what's the purpose to create a symlink /usr/local/bin -> /usr/bin ? it's could be very dangerous in case where you install a package from a tarball (assuming this package isn't in the main tree or for example your own personnal project), because it's the same thing than to install into /usr/bin directly.. which is very unrecommended, see some gentoo specs about that (mainly to avoid conflicts with existing binaries in /usr/bin already installed by portage, and so on)
this kind of setup is just not supported. If you can reproduce this issue with /usr/local/bin being a regular folder, please reopen this bug.