Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 May 2009 00:00:11 -0700
From:      Tim Kientzle <kientzle@freebsd.org>
To:        Mel Flynn <mel.flynn+fbsd.current@mailing.thruhere.net>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Linking with libarchive fails (Was: Re: buildworld fails.)
Message-ID:  <4A20D97B.1030609@freebsd.org>
In-Reply-To: <200905291857.34848.mel.flynn%2Bfbsd.current@mailing.thruhere.net>
References:  <57200BF94E69E54880C9BB1AF714BBCB5DE72E@w2003s01.double-l.local> <200904172107.15616.mel.flynn%2Bfbsd.current@mailing.thruhere.net> <49E96E4E.3070206@freebsd.org> <200905291857.34848.mel.flynn%2Bfbsd.current@mailing.thruhere.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A20D97B.1030609>