Linking with libarchive fails (Was: Re: buildworld fails.)
Tim Kientzle
kientzle at freebsd.org
Sat May 30 07:00:13 UTC 2009
Mel Flynn wrote:
>
> Linking with libarchive now results in:
> /usr/local/libexec/ccache/world-cc -O2 -pipe -std=iso9899:1999 -fstack-
> protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-
> parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-
> uninitialized -Wno-pointer-sign -o tardiff tardiff.o -larchive
> /usr/lib/libarchive.so: undefined reference to `SHA1_Init'
> /usr/lib/libarchive.so: undefined reference to `SHA256_Update'
> /usr/lib/libarchive.so: undefined reference to `SHA512_Final'
... omitted many more...
> *** Error code 1
>
> Stop in /home/mel/cvs/utils/tardiff.
>
> % cat BSDmakefile
> PROG=tardiff
> LDADD=-larchive
> WARNS=3
> NO_MAN=yes
You need: LDADD=-larchive -lmd -lcrypto
One of the formats supported by libarchive has recently
gained support for some cryptographic extensions which
rely on the 'md' and 'crypto' libraries.
> (In case you curious types are wondering what tardiff is, it's something I'm
> writing at the moment, to figure out why 2 tars are different even though
> their TOC is the same and are created from in theory the same source tree).
Sounds like exactly the kind of tool that libarchive
was created to help support. I'd be happy to include
that in the "contrib" examples area of the libarchive
portable distribution.
Tim
More information about the freebsd-current
mailing list