Skip to content

test: add XCB_SHM_LIBS to all test

David Callu requested to merge ledocc/libxcb-image:master into master

when I build the package, gcc complain:

/bin/bash ../libtool  --tag=CC   --mode=link /usr/bin/gcc  -m64 -O3 -s -fPIC  -m64 -L/root/.conan/data/xcb-util/0.4.0/bincrafters/stable/package/57dfc83e3ca74c5a05902e0d2c6423de4558ca4e/lib -L/root/.conan/data/libxcb/1.13.1/bincrafters/stable/package/ab9825abda22f84b85715d1d0da895754f0f1f39/lib -L/root/.conan/data/xcb-proto/1.13/bincrafters/stable/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/lib -L/root/.conan/data/libxau/1.0.9/bincrafters/stable/package/ddfaad73caa57b7fb20284d2ceb072ef45beb7be/lib -L/root/.conan/data/libpthread-stubs/0.1/bincrafters/stable/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/lib -L/root/.conan/data/libxdmcp/1.1.3/bincrafters/stable/package/0ffaf13d3704359113c5b64c153c1cdfd813969a/lib -L/root/.conan/data/xproto/7.0.31/bincrafters/stable/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/lib -o test_xcb_image test_xcb_image-test_xcb_image.o -L/root/.conan/data/libxcb/1.13.1/bincrafters/stable/package/ab9825abda22f84b85715d1d0da895754f0f1f39/lib -lxcb -L/root/.conan/data/xcb-util/0.4.0/bincrafters/stable/package/57dfc83e3ca74c5a05902e0d2c6423de4558ca4e/lib -L/root/.conan/data/libxcb/1.13.1/bincrafters/stable/package/ab9825abda22f84b85715d1d0da895754f0f1f39/lib -lxcb-util -lxcb ../image/libxcb-image.la -lxcb-util -lxcb -lXau -lXdmcp
libtool: link: /usr/bin/gcc -m64 -O3 -s -fPIC -m64 -o .libs/test_xcb_image test_xcb_image-test_xcb_image.o  -L/root/.conan/data/xcb-util/0.4.0/bincrafters/stable/package/57dfc83e3ca74c5a05902e0d2c6423de4558ca4e/lib -L/root/.conan/data/libxcb/1.13.1/bincrafters/stable/package/ab9825abda22f84b85715d1d0da895754f0f1f39/lib -L/root/.conan/data/xcb-proto/1.13/bincrafters/stable/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/lib -L/root/.conan/data/libxau/1.0.9/bincrafters/stable/package/ddfaad73caa57b7fb20284d2ceb072ef45beb7be/lib -L/root/.conan/data/libpthread-stubs/0.1/bincrafters/stable/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/lib -L/root/.conan/data/libxdmcp/1.1.3/bincrafters/stable/package/0ffaf13d3704359113c5b64c153c1cdfd813969a/lib -L/root/.conan/data/xproto/7.0.31/bincrafters/stable/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/lib ../image/.libs/libxcb-image.so -lxcb-util -lxcb -lXau -lXdmcp -Wl,-rpath -Wl,/root/.conan/data/xcb-util-image/0.4.0/bincrafters/stable/package/3678e36de7f083dcadfc7a202ece0561b7f07e2c/lib
/usr/bin/ld: warning: libxcb-shm.so.0, needed by ../image/.libs/libxcb-image.so, not found (try using -rpath or -rpath-link)
../image/.libs/libxcb-image.so: undefined reference to `xcb_shm_put_image'
../image/.libs/libxcb-image.so: undefined reference to `xcb_shm_get_image'
../image/.libs/libxcb-image.so: undefined reference to `xcb_shm_get_image_reply'
collect2: error: ld returned 1 exit status

so libxcb-shm.so.0 is not found, libtool should add a "-Wl,rpath -Wl,/root/.conan/data/libxcb/1.13.1/bincrafters/stable/package/ab9825abda22f84b85715d1d0da895754f0f1f39/lib" to the link command.

If a add -lxcb-shm to the link flags, this work fine, but the good way to fix this is to say libtool "add xcb-shm lib path to rpath". But I really have no idea to do this. Any hint is welcome.

Edited by David Callu

Merge request reports

Loading