Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 341671 - app-text/xdvik-22.84.16 tries to pick up system X libs instead of prefix X libs
Summary: app-text/xdvik-22.84.16 tries to pick up system X libs instead of prefix X libs
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: AMD64 Linux
: High normal
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-18 18:57 UTC by Stefan Hoelldampf
Modified: 2012-05-27 03:03 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,58.79 KB, text/plain)
2010-10-18 18:58 UTC, Stefan Hoelldampf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Hoelldampf 2010-10-18 18:57:55 UTC
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.
Comment 1 Stefan Hoelldampf 2010-10-18 18:58:43 UTC
Created attachment 251157 [details]
build.log
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-10-18 19:10:14 UTC
(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?
Comment 3 Alexis Ballier gentoo-dev 2010-10-18 19:31:22 UTC
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 ?
Comment 4 Stefan Hoelldampf 2010-10-18 21:08:34 UTC
(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
Comment 5 Alexis Ballier gentoo-dev 2010-10-18 21:36:10 UTC
(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.
Comment 6 Stefan Hoelldampf 2010-10-19 09:41:47 UTC
(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).
Comment 7 Naohiro Aota gentoo-dev 2012-05-27 03:03:46 UTC
It built fine on non-prefix system. Added to the ebuild.