When I specify --with-libarchive the correct -L flag does get passed leaving the linker clueless about the location of the sharedlibs. On further investigation I found that
gcc -I/mypath/libarchive/3.1.2/include -L/mytpath/libarchive/3.1.2/lib,--enable-new-dtags tst.c -larchive
/usr/bin/ld: cannot find -larchive
collect2: error: ld returned 1 exit status
and I also found that I had to change -Wl,-R@LIBARCHIVE_DIR@ to -L@LIBARCHIVE_DIR@ to get it to work. We also use the following LDFLAGS which dont seem to be picked up by the installation (config script)
When I specify --with-libarchive the correct -L flag does get passed leaving the linker clueless about the location of the sharedlibs. On further investigation I found that
gcc -I/mypath/libarchive/3.1.2/include -L/mytpath/libarchive/3.1.2/lib,--enable-new-dtags tst.c -larchive /usr/bin/ld: cannot find -larchive collect2: error: ld returned 1 exit status
gives an error but:
gcc -I/mypath/libarchive/3.1.2/include -L/mypath/3.1.2/lib tst.c -larchive $ echo $? 0
and I also found that I had to change -Wl,-R@LIBARCHIVE_DIR@ to -L@LIBARCHIVE_DIR@ to get it to work. We also use the following LDFLAGS which dont seem to be picked up by the installation (config script)
-Wl,-rpath=$installDir/lib -Wl,-rpath=$rpath"
Details: OS: FC20 binutils: 2.24 gcc: 4.8.2