`pkg-config --static --libs x11` unusable for static linking?

walter harms wharms at bfs.de
Wed Mar 15 13:01:06 UTC 2017


you are aware the glibc does not support static linking ?

re,
 wh

Am 15.03.2017 02:16, schrieb xorg at pengaru.com:
> Hello list,
> 
> I'm trying to support clean-ish static linking of a small autotools and
> libx11-using monitoring program via:
> 
> PKG_CONFIG="pkg-config --static" LDFLAGS="-static" ./configure
> 
> But linking fails on libdl and libpthread symbols:
> 
> $ gcc  -g -O2  -static -o vwm vwm-clickety.o vwm-composite.o vwm-context.o vwm-desktop.o vwm-key.o vwm-launch.o vwm-logo.o vwm-overlays.o vwm-screen.o vwm-vwm.o vwm-window.o vwm-xevent.o vwm-xserver.o vwm-xwindow.o -lXinerama -lXrandr -lXext -lXcomposite -lXdamage -lXfixes -lXrender -lX11 -lpthread -lxcb -lXau -lXdmcp  libvmon/libvmon.a 
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libX11.a(xim_trans.o): In function `_XimXTransSocketINETConnect':
> (.text+0xe32): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libX11.a(CrGlCur.o): In function `open_library':
> (.text+0x32): undefined reference to `dlopen'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libX11.a(CrGlCur.o): In function `fetch_symbol':
> (.text+0x61): undefined reference to `dlsym'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libX11.a(CrGlCur.o): In function `fetch_symbol':
> (.text+0x85): undefined reference to `dlsym'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_conn.o): In function `xcb_disconnect.part.0':
> (.text+0x27): undefined reference to `pthread_mutex_destroy'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_conn.o): In function `xcb_connect_to_fd':
> (.text+0x140): undefined reference to `pthread_mutex_init'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_conn.o): In function `xcb_connect_to_fd':
> (.text+0x262): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_conn.o): In function `xcb_connect_to_fd':
> (.text+0x27d): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_conn.o): In function `_xcb_conn_wait':
> (.text+0x472): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_conn.o): In function `_xcb_conn_wait':
> (.text+0x4ba): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_conn.o): In function `_xcb_conn_wait':
> (.text+0x691): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_conn.o): In function `_xcb_conn_wait':
> (.text+0x6e5): undefined reference to `pthread_cond_wait'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_out.o): In function `get_socket_back':
> (.text+0x41): undefined reference to `pthread_cond_wait'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_out.o): In function `get_socket_back':
> (.text+0x66): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_out.o): In function `get_socket_back':
> (.text+0x7b): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_out.o): In function `get_socket_back':
> (.text+0x8d): undefined reference to `pthread_cond_broadcast'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_out.o): In function `xcb_prefetch_maximum_request_length.part.0':
> (.text+0xd4): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_out.o): In function `xcb_get_maximum_request_length':
> (.text+0x191): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_out.o): In function `xcb_get_maximum_request_length':
> (.text+0x1a2): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_out.o): In function `_xcb_out_init':
> (.text+0x276): undefined reference to `pthread_mutex_init'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_out.o): In function `_xcb_out_destroy':
> (.text+0x295): undefined reference to `pthread_cond_destroy'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_out.o): In function `_xcb_out_send':
> (.text+0x315): undefined reference to `pthread_cond_broadcast'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_out.o): In function `xcb_writev':
> (.text+0x35c): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_out.o): In function `xcb_writev':
> (.text+0x37b): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_out.o): In function `xcb_send_request':
> (.text+0x647): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_out.o): In function `xcb_send_request':
> (.text+0x667): undefined reference to `pthread_cond_wait'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_out.o): In function `xcb_send_request':
> (.text+0x6ac): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_out.o): In function `_xcb_out_send_sync':
> (.text+0x947): undefined reference to `pthread_cond_wait'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_out.o): In function `_xcb_out_flush_to':
> (.text+0x9f7): undefined reference to `pthread_cond_wait'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_out.o): In function `xcb_send_fd':
> (.text+0xaa1): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_out.o): In function `xcb_take_socket':
> (.text+0xb37): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_out.o): In function `xcb_take_socket':
> (.text+0xb76): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_out.o): In function `xcb_flush':
> (.text+0xc11): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_out.o): In function `xcb_flush':
> (.text+0xc2a): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_out.o): In function `xcb_prefetch_maximum_request_length.part.0':
> (.text+0xec): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_out.o): In function `xcb_prefetch_maximum_request_length.part.0':
> (.text+0x12a): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_out.o): In function `_xcb_out_destroy':
> (.text+0x2a2): undefined reference to `pthread_mutex_destroy'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_out.o): In function `xcb_send_fd':
> (.text+0xaef): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `xcb_discard_reply':
> (.text+0x21b): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `xcb_discard_reply':
> (.text+0x2f9): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `xcb_poll_for_reply':
> (.text+0x391): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `xcb_poll_for_reply':
> (.text+0x3d0): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `xcb_poll_for_special_event':
> (.text+0x417): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `xcb_poll_for_special_event':
> (.text+0x43d): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `xcb_wait_for_special_event':
> (.text+0x4a0): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `xcb_wait_for_special_event':
> (.text+0x4fc): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `xcb_register_for_special_xge':
> (.text+0x556): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `xcb_register_for_special_xge':
> (.text+0x588): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `xcb_register_for_special_xge':
> (.text+0x5f7): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `xcb_unregister_for_special_event':
> (.text+0x648): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `xcb_unregister_for_special_event':
> (.text+0x6c1): undefined reference to `pthread_cond_destroy'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `_xcb_in_destroy':
> (.text+0x76a): undefined reference to `pthread_cond_destroy'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `_xcb_in_wake_up_next_reader':
> (.text+0x815): undefined reference to `pthread_cond_signal'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `_xcb_in_wake_up_next_reader':
> (.text+0x82d): undefined reference to `pthread_cond_signal'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `wait_for_reply':
> (.text+0x949): undefined reference to `pthread_cond_destroy'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `xcb_wait_for_reply':
> (.text+0x9de): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `xcb_wait_for_reply':
> (.text+0xa18): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `xcb_request_check':
> (.text+0xa69): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `xcb_request_check':
> (.text+0xadb): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `xcb_wait_for_event':
> (.text+0xb51): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `xcb_wait_for_event':
> (.text+0xb8f): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `_xcb_in_read':
> (.text+0x10a5): undefined reference to `pthread_cond_signal'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `_xcb_in_read':
> (.text+0x13fa): undefined reference to `pthread_cond_signal'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `_xcb_in_read':
> (.text+0x150b): undefined reference to `pthread_cond_signal'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `_xcb_in_read':
> (.text+0x16c9): undefined reference to `pthread_cond_signal'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `poll_for_next_event':
> (.text+0x1740): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `poll_for_next_event':
> (.text+0x1766): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_in.o): In function `xcb_unregister_for_special_event':
> (.text+0x67e): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_ext.o): In function `get_lazyreply':
> (.text+0x14): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_ext.o): In function `get_lazyreply':
> (.text+0x3b): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_ext.o): In function `xcb_get_extension_data':
> (.text+0x134): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_ext.o): In function `xcb_get_extension_data':
> (.text+0x154): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_ext.o): In function `xcb_get_extension_data':
> (.text+0x174): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_ext.o): In function `xcb_prefetch_extension_data':
> (.text+0x1d5): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_ext.o): In function `_xcb_ext_init':
> (.text+0x1fe): undefined reference to `pthread_mutex_init'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_ext.o): In function `_xcb_ext_destroy':
> (.text+0x21c): undefined reference to `pthread_mutex_destroy'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_ext.o): In function `xcb_prefetch_extension_data':
> (.text+0x1ec): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_xid.o): In function `xcb_generate_id':
> (.text+0x2e): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_xid.o): In function `xcb_generate_id':
> (.text+0x72): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_xid.o): In function `xcb_generate_id':
> (.text+0x123): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_xid.o): In function `_xcb_xid_init':
> (.text+0x15e): undefined reference to `pthread_mutex_init'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_xid.o): In function `_xcb_xid_destroy':
> (.text+0x1b8): undefined reference to `pthread_mutex_destroy'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_auth.o): In function `_xcb_get_auth_info':
> (.text+0x536): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libxcb.a(xcb_auth.o): In function `_xcb_get_auth_info':
> (.text+0x557): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__register_frame_info_bases':
> (.text+0x16f7): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__register_frame_info':
> (.text+0x1792): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__register_frame':
> (.text+0x1834): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__register_frame_info_table_bases':
> (.text+0x18bb): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__deregister_frame_info_bases':
> (.text+0x195e): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__deregister_frame_info_bases':
> (.text+0x19f8): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `_Unwind_Find_FDE':
> (.text+0x1ac6): undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `_Unwind_Find_FDE':
> (.text+0x1b16): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `_Unwind_Find_FDE':
> (.text+0x1c00): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__register_frame_info_bases':
> (.text+0x1716): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__register_frame_info':
> (.text+0x17b1): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__register_frame':
> (.text+0x1858): undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc_eh.a(unwind-dw2-fde-dip.o):(.text+0x18da): more undefined references to `pthread_mutex_unlock' follow
> collect2: error: ld returned 1 exit status
> Makefile:388: recipe for target 'vwm' failed
> make[2]: *** [vwm] Error 1
> make[2]: Leaving directory '/home/vc/src/vwm/src'
> Makefile:674: recipe for target 'all-recursive' failed
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory '/home/vc/src/vwm/src'
> Makefile:381: recipe for target 'all-recursive' failed
> make: *** [all-recursive] Error 1
> 
> ---
> 
> The output of `pkg-config --static --libs x11` here (Debian jessie amd64) is:
> -lX11 -lpthread -lxcb -lXau -lXdmcp 
> 
> -ldl is not present, and -lpthread appears before -lxcb.
> 
> If I manually perform the link with these tweaked, linking is successful and
> the program functions fine:
> 
> $ gcc  -g -O2  -static -o vwm vwm-clickety.o vwm-composite.o vwm-context.o vwm-desktop.o vwm-key.o vwm-launch.o vwm-logo.o vwm-overlays.o vwm-screen.o vwm-vwm.o vwm-window.o vwm-xevent.o vwm-xserver.o vwm-xwindow.o -lXinerama -lXrandr -lXext -lXcomposite -lXdamage -lXfixes -lXrender -lX11 -ldl -lxcb -lpthread -lXau -lXdmcp  libvmon/libvmon.a
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libX11.a(CrGlCur.o): In function `open_library':
> (.text+0x32): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libX11.a(xim_trans.o): In function `_XimXTransSocketINETConnect':
> (.text+0xe32): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
> 
> ---
> 
> Shouldn't `pkg-config --static --libs` be emitting usable output for static
> linking?
> 
> Thanks,
> Vito Caputo
> _______________________________________________
> xorg at lists.x.org: X.Org support
> Archives: http://lists.freedesktop.org/archives/xorg
> Info: https://lists.x.org/mailman/listinfo/xorg
> Your subscription address: %(user_address)s


More information about the xorg mailing list