Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 900871 - sys-devel/gcc: fails to build with sys-libs/musl-9999 (musl-1.2.4) because of LFS changes (sanitizer_platform_limits_posix.cpp:182:31: error: invalid application of 'sizeof' to incomplete type '__sanitizer::stat64')
Summary: sys-devel/gcc: fails to build with sys-libs/musl-9999 (musl-1.2.4) because of...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard: Needs libsanitizer commit backported ...
Keywords: PATCH
: 905899 (view as bug list)
Depends on:
Blocks: musl-1.2.4
  Show dependency tree
 
Reported: 2023-03-11 14:47 UTC by immolo
Modified: 2024-03-08 01:16 UTC (History)
6 users (show)

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


Attachments
build.log (build.log.tar.xz,117.66 KB, application/x-xz)
2023-03-11 14:49 UTC, immolo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description immolo 2023-03-11 14:47:35 UTC
While doing 23.0 profile testing on riscv I've come across an issue where GCC will no longer compile GCC and as Musl 1.2.4 is needed for the 23.0 profiles it might wise for someone else to test and confirm this to see if we need to upstream it or if it's just certain systems that his this as mipsel, aarch64 and amd64 don't seem to hit this issue. 

Reproducible: Always

Steps to Reproduce:
1. enable 23.0 profile default/linux/riscv/23.0/rv64/lp64d/musl1. e
2. add `sys-libs/musl **`` to /etc/portage/package.accept_keywords/musl
3. emerge -va sys-libs/musl
4. emerge -va sys-devel/gcc
Actual Results:  
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libgfortran.spec
config.status: creating config.h
config.status: executing default-1 commands
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing gstdint.h commands
make[1]: Leaving directory '/var/tmp/portage/sys-devel/gcc-12.2.1_p20230121-r1/work/build'
make: *** [Makefile:24850: bootstrap-lean] Error 2


emerge --info isn't completely useful as I dropped profiles and downgraded musl to confirm where the errror is for me but still included incase any other information is important.

# emerge --info
Portage 3.0.45.2 (python 3.10.10-final-0, default/linux/riscv/20.0/rv64gc/lp64d/musl, gcc-12, musl-1.2.3-r7, 6.1.11-gentoo-dist riscv64)
=================================================================
System uname: Linux-6.1.11-gentoo-dist-riscv64-with-libc
KiB Mem:    16347928 total,   5550524 free
KiB Swap:   25169912 total,  23590392 free
Timestamp of repository gentoo: Wed, 08 Mar 2023 22:30:01 +0000
Head commit of repository gentoo: 0c9116b3aef8f3e47e801bc1c8afce931f9b790b
sh bash 5.2_p15-r2
ld GNU ld (Gentoo 2.40 p2) 2.40.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p15-r2::gentoo
dev-lang/perl:             5.36.0-r2::gentoo
dev-lang/python:           3.10.10_p2::gentoo, 3.11.2_p1::gentoo
dev-util/cmake:            3.25.2::gentoo
dev-util/meson:            1.0.1::gentoo
sys-apps/baselayout:       2.13-r1::gentoo
sys-apps/openrc:           0.46::gentoo
sys-apps/sandbox:          2.30-r1::gentoo
sys-devel/autoconf:        2.71-r5::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.40-r2::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           15.0.7-r1::gentoo
sys-devel/gcc:             12.2.1_p20230304::gentoo
sys-devel/gcc-config:      2.10::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             15.0.7::gentoo
sys-devel/llvm:            15.0.7::gentoo
sys-devel/make:            4.4.1::gentoo
sys-kernel/linux-headers:  6.2::gentoo (virtual/os-headers)
sys-libs/musl:             1.2.3-r7::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-extra-opts:
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1

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

ACCEPT_KEYWORDS="riscv ~riscv"
ACCEPT_LICENSE="@FREE"
CBUILD="riscv64-gentoo-linux-musl"
CFLAGS="-Os -pipe -march=rv64imafd -mabi=lp64d"
CHOST="riscv64-gentoo-linux-musl"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d"
CXXFLAGS="-Os -pipe -march=rv64imafd -mabi=lp64d"
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="-Os -pipe -march=rv64imafd -mabi=lp64d"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-Os -pipe -march=rv64imafd -mabi=lp64d"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="charset.alias /usr/share/locale/locale.alias"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
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="acl bzip2 cli crypt dri fortran iconv ipv6 libglvnd lto ncurses nls nptl openmp pam pcre readline riscv seccomp split-usr ssl test-rust unicode xattr zlib" 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" ELIBC="musl" 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" 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="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby27 ruby30" USERLAND="GNU" VIDEO_CARDS="fbdev v4l" 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, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, MAKEOPTS, 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 immolo 2023-03-11 14:49:39 UTC
Created attachment 857299 [details]
build.log
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-11 14:59:36 UTC
This is to do with the LFS changes in musl master/1.2.4. It needs to be fixed in libsanitizer.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-11 15:00:17 UTC
IIRC this is fixed on the LLVM side already but I haven't confirmed.
Comment 4 immolo 2023-03-14 03:37:34 UTC
For completion sake of the report I have selected random GCC version to test this up the latest snapshot of gcc-13 checked out the 12th of march 2023 and all version have the same failure.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-17 03:58:27 UTC
We likely need https://github.com/llvm/llvm-project/commit/a5519b99bc73d50f362d6fb306411e9fcb758b53 backported into gcc.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-08 04:40:03 UTC
*** Bug 905899 has been marked as a duplicate of this bug. ***
Comment 7 Larry the Git Cow gentoo-dev 2023-05-10 01:36:04 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=597377c1373e7716a4ac2372080cce4947b32e01

commit 597377c1373e7716a4ac2372080cce4947b32e01
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-05-10 01:35:32 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-05-10 01:35:32 +0000

    sys-devel/gcc: fix build w/ musl-1.2.4 for 13
    
    Closes: https://bugs.gentoo.org/900871
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/gcc/Manifest                       | 1 +
 sys-devel/gcc/gcc-13.1.1_p20230429-r1.ebuild | 2 +-
 sys-devel/gcc/gcc-13.1.1_p20230429.ebuild    | 2 +-
 sys-devel/gcc/gcc-13.1.1_p20230506.ebuild    | 2 +-
 4 files changed, 4 insertions(+), 3 deletions(-)
Comment 8 Larry the Git Cow gentoo-dev 2023-05-10 01:36:18 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=29d805847dc870c92f705ed9c5e7eac955c7e7d4

commit 29d805847dc870c92f705ed9c5e7eac955c7e7d4
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-05-10 01:36:00 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-05-10 01:36:00 +0000

    13.2.0: musl: fix build w/ musl-1.2.4 LFS changes
    
    Bug: https://bugs.gentoo.org/900871
    Signed-off-by: Sam James <sam@gentoo.org>

 13.2.0/musl/50_all_sanitizer_lfs.patch | 197 +++++++++++++++++++++++++++++++++
 13.2.0/musl/README.history             |   3 +
 2 files changed, 200 insertions(+)
Comment 9 Larry the Git Cow gentoo-dev 2023-05-14 04:52:35 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=010b18590c02f13def520d636af5a3902bcc07ff

commit 010b18590c02f13def520d636af5a3902bcc07ff
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-05-14 04:49:32 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-05-14 04:49:32 +0000

    sys-devel/gcc: fix build w/ musl-1.2.4 for 13 deux
    
    Thanks to Kangie for pointing this out.
    
    Bug: https://bugs.gentoo.org/900871
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/gcc/Manifest             | 1 -
 sys-devel/gcc/gcc-13.1.0-r1.ebuild | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)