issues with static linking #68
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Hi,
I try to cross-compile gtk+ 2.x and want to link it statically.
$ ./host_x86_64-linux-gnu/usr/bin/pkgconf --static --libs x11 xext xrender
-lX11 -lxcb -lXau -lXext -lXrender -L/usr/lib -lpthread
$ ./host_x86_64-linux-gnu/usr/bin/pkgconf --static --libs xext xrender x11
-lXext -lX11 -lxcb -lXau -lXrender -L/usr/lib -lpthread
$ ./host_x86_64-linux-gnu/usr/bin/pkgconf --static --libs xrender xext x11
-lXrender -lX11 -lxcb -lXau -lXext -L/usr/lib -lpthread
$ grep private target_qemu-arm_glibc/usr/lib/pkgconfig/{xext,x11,xrender}.pc
target_qemu-arm_glibc/usr/lib/pkgconfig/xext.pc:Requires.private: x11
target_qemu-arm_glibc/usr/lib/pkgconfig/x11.pc:Requires.private: xcb >= 1.1.92
target_qemu-arm_glibc/usr/lib/pkgconfig/x11.pc:Libs.private: -lpthread
target_qemu-arm_glibc/usr/lib/pkgconfig/xrender.pc:Requires.private: x11
In the first case the configure check for Xext will fail, in the second case this would work, but Xrender test will fail. in the third case I believe Xext will fail again. so how to solve
this? The pc files seems to be correct. -lX11 must be the last library.
Any idea?
best regards
Waldemar
The behaviour of
--static
in pkgconf with multiple modules on one line is not necessarily the most reliable (it hasn't gotten a lot of work vs pkg-config).Can you submit a test case which creates the proper order on freedesktop's pkg-config and integrate it into our test framework? From there it will be more easy to debug why this is occuring...