[Bug 296962] ports-mgmt/pkg 2.8.0_1 fails to link with WITH_PIE

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 21 Jul 2026 15:12:59 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296962

--- Comment #2 from lysfjord.daniel@smokepit.net ---
(In reply to Shawn Webb from comment #1)

It did work just fine on 2.7.5. What changed? I can see in the build log,
there's -fPIC lots of places.

# file /usr/local/sbin/pkg
/usr/local/sbin/pkg: ELF 64-bit LSB pie executable, x86-64, version 1
(FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD
14.4, FreeBSD-style, stripped
# file /usr/local/sbin/pkg-static 
/usr/local/sbin/pkg-static: ELF 64-bit LSB executable, x86-64, version 1
(FreeBSD), statically linked, for FreeBSD 14.4, FreeBSD-style, stripped
# ls -lah /usr/local/sbin/pkg*
-rwxr-xr-x  1 root wheel  3.4M Jun 18 18:24 /usr/local/sbin/pkg*
-rwxr-xr-x  1 root wheel  9.3M Jun 18 18:24 /usr/local/sbin/pkg-static*
# pkg info pkg
pkg-2.7.5
Name           : pkg
Version        : 2.7.5
Installed on   : Thu Jun 18 22:37:18 2026 CEST
Origin         : ports-mgmt/pkg
Architecture   : FreeBSD:14:amd64
Prefix         : /usr/local
Categories     : ports-mgmt
Licenses       : BSD2CLAUSE
Maintainer     : pkg@FreeBSD.org
WWW            : https://github.com/freebsd/pkg
Comment        : Package manager
Options        :
        DOCS           : off
Shared Libs required:
        libarchive.so.7
        libc.so.7
        libcrypto.so.30
        libelf.so.2
        libjail.so.1
        libm.so.5
        libssl.so.30
        libthr.so.3
        libutil.so.9
Shared Libs provided:
        libpkg.so.4
Annotations    :
        FreeBSD_version: 1404000
        port_checkout_unclean: unknown
        ports_top_checkout_unclean: unknown
        ports_top_git_hash: 7449e9562f596e7b489d70e6cc2363d5151de187
        repo_type      : binary
        repository     : poudriere
Flat size      : 21.6MiB
Description    :
Package management tool

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