Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 911726 - dev-libs/libbsd fails to build with glibc-2.38 and -fno-semantic-interposition
Summary: dev-libs/libbsd fails to build with glibc-2.38 and -fno-semantic-interposition
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: glibc-2.38 glibc-2.38-stable
  Show dependency tree
 
Reported: 2023-08-05 00:31 UTC by Ninpo
Modified: 2024-03-25 15:04 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
libbsd build.log (libbsd-0.11.7-r2:20230804-015306.log,73.19 KB, text/x-log)
2023-08-05 00:31 UTC, Ninpo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ninpo 2023-08-05 00:31:56 UTC
Created attachment 867071 [details]
libbsd build.log

See attached build.log. Builds fine without -fno-semantic-interposition

Portage 3.0.49_p38 (python 3.12.0-beta-4, default/linux/amd64/17.1/desktop/plasma, gcc-13, glibc-2.38, 6.1.41-gentoo-x86_64 x86_64)
=================================================================
System uname: Linux-6.1.41-gentoo-x86_64-x86_64-AMD_Ryzen_Threadripper_1950X_16-Core_Processor-with-glibc2.38
KiB Mem:    65662428 total,   8677200 free
KiB Swap:    8388604 total,   6469372 free
Timestamp of repository gentoo: Fri, 04 Aug 2023 13:16:40 +0000
Head commit of repository gentoo: c8a04abb51369aa9cac857f518186c0a430dce41

Timestamp of repository kde: Wed, 02 Aug 2023 18:32:20 +0000
Head commit of repository kde: f58052ca124abfe5442d5e830df32968b39fa4f7

Timestamp of repository lto-overlay: Wed, 02 Aug 2023 18:32:18 +0000
Head commit of repository lto-overlay: 77e924278367892a3ce0e6c53728473e7a3beed0

Head commit of repository mv: e1118e55e25cd171db8a070bd65545052452cc3f

Timestamp of repository steam-overlay: Wed, 02 Aug 2023 18:32:12 +0000
Head commit of repository steam-overlay: 7a0714867f4659d1ef4b9b9229ec6457cd884d78

sh bash 5.2_p15-r6
ld GNU ld (Gentoo 2.41 p1) 2.41
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p15-r6::gentoo
dev-lang/perl:             5.38.0-r1::gentoo
dev-lang/python:           3.10.12::gentoo, 3.11.4::gentoo, 3.12.0_beta4_p1::gentoo
dev-lang/rust:             1.71.0::gentoo
dev-util/cmake:            3.27.1::gentoo
dev-util/meson:            1.2.0::gentoo
sys-apps/baselayout:       2.14::gentoo
sys-apps/openrc:           0.48::gentoo
sys-apps/sandbox:          2.37::gentoo
sys-devel/autoconf:        2.71-r7::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.40-r7::gentoo, 2.41::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           16.0.6::gentoo
sys-devel/gcc:             12.3.1_p20230623::gentoo, 13.2.0::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             16.0.6::gentoo
sys-devel/llvm:            16.0.6::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.4::gentoo (virtual/os-headers)
sys-libs/glibc:            2.38::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo
    priority: -1000
    volatile: False

custom
    location: /var/db/repos/custom
    masters: gentoo
    volatile: False

kde
    location: /var/db/repos/kde
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/kde.git
    masters: gentoo
    volatile: False

lto-overlay
    location: /var/db/repos/lto-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/lto-overlay.git
    masters: gentoo mv
    volatile: False

mv
    location: /var/db/repos/mv
    sync-type: git
    sync-uri: https://github.com/vaeth/mv-overlay.git
    masters: gentoo
    volatile: False

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo
    volatile: False

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -pipe -O2 -flto=6 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -pipe -O2 -flto=6 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -march=native -pipe -O2 -flto=6 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-march=native -pipe -O2 -flto=6 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms split-elog split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -pipe -O2 -flto=6 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j9"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac acl acpi activities alsa amd64 branding bzip2 cairo cdda cdr cli crypt cups dbus declarative dri dts dvd dvdr elogind encode exif flac fortran gdbm gif googledrive gpm gtk gui i3wm iconv icu ipv6 jpeg kde kwallet lcms libnotify libtirpc lto mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf perl pgo pipewire plasma png policykit ppds pulseaudio qml qt5 readline screencast sdl seccomp semantic-desktop sound spell split-usr ssl startup-notification svg system-bootstrap system-llvm test-rust tiff truetype udev udisks unicode upower usb vim vim-syntax vorbis vulkan wayland widgets wxwidgets x264 xattr xcb xft xml xv xvid zlib zstd" ABI_X86="64 32" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en-GB en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11 python3_10 python3_12" RUBY_TARGETS="ruby31" VIDEO_CARDS="vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Holger Hoffstätte 2023-08-05 13:48:40 UTC
I can build libbsd-0.11.7-r2 just fine with glibc-2.38 using CFLAGS="-pipe -O2 -march=native -fno-semantic-interposition". This seems to be more of an LTO problem.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-05 13:50:27 UTC
It'll be the combination of the two with inclining I guess.
Comment 3 Ninpo 2023-08-05 14:44:03 UTC
Definitely a combination, as it builds fine with LTO but without the -fno-semantic-interposition flag.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-05 14:49:48 UTC
(In reply to Sam James from comment #2)
> It'll be the combination of the two with inclining I guess.

s/inclining/inlining...
Comment 5 Holger Hoffstätte 2023-09-01 15:22:39 UTC
Upstream bug: https://gitlab.freedesktop.org/libbsd/libbsd/-/issues/26
Comment 6 Larry the Git Cow gentoo-dev 2023-10-28 16:07:58 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ae193c0705d6114f392e6757975731c828d0d18

commit 8ae193c0705d6114f392e6757975731c828d0d18
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2023-10-28 16:06:54 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2023-10-28 16:07:47 +0000

    dev-libs/libbsd: Filter -fno-semantic-interposition, bug 911726
    
    Upstream seems not to be interested in fixing this.
    
    Closes: https://bugs.gentoo.org/911726
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 dev-libs/libbsd/libbsd-0.11.7-r2.ebuild | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Comment 7 Larry the Git Cow gentoo-dev 2024-01-14 03:40:31 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32f6b6137ac36f8bd2d6aaf30e31a6ae64fc2e27

commit 32f6b6137ac36f8bd2d6aaf30e31a6ae64fc2e27
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-01-14 03:21:06 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-14 03:28:10 +0000

    dev-libs/libbsd: add 0.11.8
    
    Bug: https://bugs.gentoo.org/911726
    Closes: https://bugs.gentoo.org/898312
    Closes: https://bugs.gentoo.org/915068
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-libs/libbsd/Manifest             |  2 ++
 dev-libs/libbsd/libbsd-0.11.8.ebuild | 44 ++++++++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+)
Comment 8 Kostadin Shishmanov 2024-01-17 23:44:47 UTC
still fails for me with the combination of LTO and -fno-semantic-interposition
Comment 9 Larry the Git Cow gentoo-dev 2024-01-18 17:53:15 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56a35e4b73fec0427ef1ecbb1791f8e3c49dd9df

commit 56a35e4b73fec0427ef1ecbb1791f8e3c49dd9df
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-01-18 17:50:46 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-18 17:52:27 +0000

    dev-libs/libbsd: filter -fno-semantic-interposition again
    
    It's needed for LTO at least.
    
    Bug: https://bugs.gentoo.org/911726
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-libs/libbsd/libbsd-0.11.8.ebuild | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)