issues with static linking #68

Closed
opened 2014-06-28 15:18:28 +00:00 by wbx-github · 1 comment
wbx-github commented 2014-06-28 15:18:28 +00:00 (Migrated from github.com)

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

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...

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...
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ariadne/pkgconf#68
There is no content yet.