[Bug 245025] ports-mgmt/pkg: Fails to link after ports r359159: undefined reference to `_libmd_SHA1_Init' (requires -lmd after -larchive)

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Mar 25 02:18:54 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=245025

--- Comment #2 from dewayne at heuristicsystems.com.au ---
(In reply to Baptiste Daroussin from comment #1)
If pkg links to archivers/libarchive then the problem is not reproducible; and
this is my workaround ;)

In both the amd64 and i386 jails, there is no:
-  /usr/local/lib/libarchive*
-  base openssl (because we build with libressl).
Prior to building packages, we remove all remnants of prior builds, inluding
various "pkg delete -y -a".  From here we rebuild everything.  (And yes, we do
reinstall a previously working /usr/local/sbin/pkg-static into our bare bones
build jails)


# make -C /usr/ports/ports-mgmt/pkg -VCFLAGS -Vspace -VLDFLAGS
-O2 -pipe -Wl,-m,elf_x86_64_fbsd -Wl,--strip-debug -Wl,--build-id=md5
-Wl,--hash-style=sysv -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3 -g0 -ggdb0
-DSTRIP_FBSDID -UDEBUGGING -UDEBUG -fno-math-errno -fomit-frame-pointer
-fno-asynchronous-unwind-tables -march=core2 -Wno-error -fno-strict-aliasing

-Wl,--strip-debug -Wl,--build-id=md5 -Wl,--hash-style=sysv 


When I examine base's tar and pkg they are both linked to libmd, 
# ldd /usr/bin/tar /usr/sbin/pkg | grep -E ":|archiv|md"
/usr/bin/tar:
        libarchive.so.7 => /usr/lib/libarchive.so.7 (0x178e5daf4000)
        libmd.so.6 => /lib/libmd.so.6 (0x178e5dc4f000)
/usr/sbin/pkg:
        libarchive.so.7 => /usr/lib/libarchive.so.7 (0x801d1d000)
        libmd.so.6 => /lib/libmd.so.6 (0x806a80000)
(I selected tar because I know it also needs libarchive)

This is on a very recent FreeBSD12.1 r359159.  I don't know what else would be
helpful to reproduce?

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-pkg mailing list