Linking with libarchive fails (Was: Re: buildworld fails.)

Mel Flynn mel.flynn+fbsd.current at mailing.thruhere.net
Fri May 29 16:57:51 UTC 2009


On Saturday 18 April 2009 08:08:14 Tim Kientzle wrote:
> Mel Flynn wrote:
> > On Friday 17 April 2009 19:52:36 Tim Kientzle wrote:
> >> This should be fixed in SVN r191196 by my update to
> >> lib/libarchive/config_freebsd.h, which disabled the
> >> crypto references here until I can sort out some
> >> other issues.
> >
> > It's fixed. What should we be looking for (if anything) that's now broken
> > with crypto references disabled?
>
> I just re-enabled this code in libarchive,
> after waiting all day to ensure that buildworld
> succeeds both WITHOUT_OPENSSL and WITH_OPENSSL.

Revisiting, side effect:
% ident /usr/lib/libarchive.so|awk '{print $3,$2}'|sort -r|head -1
192031 head/lib/libarchive/archive_read_disk_entry_from_file.c

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'
/usr/lib/libarchive.so: undefined reference to `RIPEMD160_Final'
/usr/lib/libarchive.so: undefined reference to `SHA256_Final'
/usr/lib/libarchive.so: undefined reference to `SHA384_Final'
/usr/lib/libarchive.so: undefined reference to `SHA1_Update'
/usr/lib/libarchive.so: undefined reference to `SHA1_Final'
/usr/lib/libarchive.so: undefined reference to `MD5Final'
/usr/lib/libarchive.so: undefined reference to `SHA384_Init'
/usr/lib/libarchive.so: undefined reference to `SHA384_Update'
/usr/lib/libarchive.so: undefined reference to `SHA512_Init'
/usr/lib/libarchive.so: undefined reference to `RIPEMD160_Update'
/usr/lib/libarchive.so: undefined reference to `RIPEMD160_Init'
/usr/lib/libarchive.so: undefined reference to `SHA512_Update'
/usr/lib/libarchive.so: undefined reference to `MD5Init'
/usr/lib/libarchive.so: undefined reference to `MD5Update'
/usr/lib/libarchive.so: undefined reference to `SHA256_Init'
*** Error code 1

Stop in /home/mel/cvs/utils/tardiff.

% cat BSDmakefile
PROG=tardiff
LDADD=-larchive
WARNS=3
NO_MAN=yes

.include <bsd.prog.mk>

After adding -lmd to LDADD it's trimmed down to:
/usr/lib/libarchive.so: undefined reference to `SHA512_Final'
/usr/lib/libarchive.so: undefined reference to `SHA384_Final'
/usr/lib/libarchive.so: undefined reference to `SHA384_Init'
/usr/lib/libarchive.so: undefined reference to `SHA384_Update'
/usr/lib/libarchive.so: undefined reference to `SHA512_Init'
/usr/lib/libarchive.so: undefined reference to `SHA512_Update'

If this is fixed in a more recent current, then I'll have to provide some 
stubs for these as I'm waiting for the NFS storm to blow over before 
upgrading.

(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).
-- 
Mel


More information about the freebsd-current mailing list