https://sourceware.org/bugzilla/show_bug.cgi?id=29288
--- Comment #5 from William Tang <galaxyking0419 at gmail dot com> --- So, the rapth issue is that, if the environment is located under other folders instead of /usr/arm-linux-gnueabihf/lib and compile the program with command arm-linux-gnueabihf-gcc main.c -I /tmp/rpi-root/usr/include -Wl,--verbose -Wl,-rpath=/tmp/rpi-root/usr/lib /tmp/rpi-root/usr/lib/libarchive.so The ld seems not searching /tmp/rpi-root/usr/lib, ld verbose log: /usr/bin/arm-linux-gnueabihf-ld: warning: libcrypto.so.1.1, needed by /tmp/rpi-root/usr/lib/libarchive.so, not found (try using -rpath or -rpath-link) libacl.so.1 needed by /tmp/rpi-root/usr/lib/libarchive.so attempt to open /usr/arm-linux-gnueabihf/tmp/rpi-root/usr/lib/libacl.so.1 failed attempt to open /usr/lib/binutils/arm-linux-gnueabihf/libacl.so.1 failed attempt to open /usr/arm-linux-gnueabihf/usr/arm-linux-gnueabihf/lib/libacl.so.1 failed attempt to open /usr/arm-linux-gnueabihf/tmp/rpi-root/usr/lib/libacl.so.1 failed attempt to open /usr/lib/binutils/arm-linux-gnueabihf/libacl.so.1 failed attempt to open /usr/arm-linux-gnueabihf/usr/arm-linux-gnueabihf/lib/libacl.so.1 failed However, it did work with rpath-link option: libcrypto.so.1.1 needed by /tmp/rpi-root/usr/lib/libarchive.so found libcrypto.so.1.1 at /tmp/rpi-root/usr/lib/libcrypto.so.1.1 -- You are receiving this mail because: You are on the CC list for the bug.