moinakg / pcompress

A Parallelized Data Deduplication and Compression utility
http://moinakg.github.com/pcompress/
GNU Lesser General Public License v3.0
278 stars 34 forks source link

Unable to use --with-libarchive #23

Closed sinkap closed 8 years ago

sinkap commented 10 years ago

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

moinakg commented 10 years ago

Thanks. Will check this. Might be already fixed in the trunk.

sinkap commented 8 years ago

Will close this issue for now. We can reopen it comes up again. Thanks!