On RHEL5 amd64, app-text/xdvik-22.84.16 fails due to picking up the (wrong) system X libraries in /usr/lib64 instead of in ${EPREFIX}/usr/lib. I was able to fix it either by passing "--x-libraries=${EPREFIX}/usr/lib" to econf or by emerging x11-misc/imake. The latter contains xmkmf which is eventually used by the xdvik configure script to detect the location of the X libs.
Created attachment 251157 [details] build.log
(In reply to comment #0) > I was able to fix it either by passing "--x-libraries=${EPREFIX}/usr/lib" to > econf or by emerging x11-misc/imake. The latter contains xmkmf which is > eventually used by the xdvik configure script to detect the location of the X > libs. I think the former would be the preferred solution.. comments from cjk or tex?
I don't understand: the build log refers to missing functions from the _kpathsea_ library; could you please explain me why and how this relates to the X libraries ? Also, by using --x-libraries, what headers are being used ?
(In reply to comment #3) > I don't understand: the build log refers to missing functions from the > _kpathsea_ library; could you please explain me why and how this relates to the > X libraries ? The missing kpathsea functions seem to be a side-effect of the wrongly detected system X libs and its "-L/usr/lib64". In texk/xdvi/Makefile, x_ldflags is set to "-L/usr/lib64 -Xlinker --allow-multiple-definition". "/usr/lib64" is determined by the "checking for X" code in the configure script. It uses xmkmf if e.g. --x-libraries is not given. Unfortunately, it picks up the system script /usr/bin/xmkmf of RHEL, resulting in /usr/lib64 instead of ${EPREFIX}/usr/lib in my prefix environment. > Also, by using --x-libraries, what headers are being used ? I think --x-include="${EPREFIX}"/usr/inclulde wouldn't hurt, although the prefix gcc picks up prefix headers at first. I have added the following lines to econf now and it emerges without any problems: --x-includes="${EPREFIX}"/usr/include \ --x-libraries="${EPREFIX}"/usr/lib
(In reply to comment #4) > I have added the following lines to econf now and it emerges without any > problems: > > --x-includes="${EPREFIX}"/usr/include \ > --x-libraries="${EPREFIX}"/usr/lib Fair enough, thanks. Make the last line use get_libdir and feel free to commit if tested on a non-prefix system too. Just for the record: what happens if nothing is given and xmkmf is not present? Also, if you want to be careful, you can check if the same doesn't happen for e.g. texlive, they share quite a big amount of their build system.
(In reply to comment #5) > Just for the record: what happens if nothing is given and xmkmf is not present? I can not uninstall xmkmf on the system, but the configure accepts an XMKMF env variable. Using "export XMKMF=/bin/true" also fixes the build. The binary in question xdvi-xaw is only linked against libs from ${EPREFIX} (except glibc of course).
It built fine on non-prefix system. Added to the ebuild.