Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 942843 - sys-boot/grub-2.12-r5 with clang and musl/llvm profile: error: invalid argument '-mcmodel=large' only allowed with '-fno-pic'
Summary: sys-boot/grub-2.12-r5 with clang and musl/llvm profile: error: invalid argume...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM64 Linux
: Normal normal
Assignee: Mike Gilbert
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-03 21:05 UTC by Winter
Modified: 2024-11-03 23:45 UTC (History)
4 users (show)

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


Attachments
Build log (build.log.gz,38.55 KB, application/x-gzip)
2024-11-03 21:13 UTC, Winter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Winter 2024-11-03 21:05:49 UTC
Can't emerge sys-boot/grub-2.12-r5 when using the arm64/musl/llvm profile.

Reproducible: Always

Steps to Reproduce:
1. Emerge sys-boot/grub-2.12-r5 when using default/linux/arm64/23.0/musl/llvm
Actual Results:  
It doesn't emerge successfully: error: invalid argument '-mcmodel=large' only allowed with '-fno-pic'

Expected Results:  
It should emerge ;)

Portage 3.0.66.1 (python 3.12.7-final-0, default/linux/arm64/23.0/musl/llvm, [unavailable], musl-1.2.4-r2, 6.6.52-gentoo-arm64 aarch64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.6.52-gentoo-arm64-aarch64-with-libc
KiB Mem:     6068016 total,   2758956 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sun, 03 Nov 2024 20:15:02 +0000
Head commit of repository gentoo: eec4e2a612dbc08aade7c781e6ead5044999378a
sh bash 5.2_p37
ld LLD 18.1.8 (compatible with GNU linkers)
app-misc/pax-utils:       1.3.7::gentoo
app-shells/bash:          5.2_p37::gentoo
dev-build/autoconf:       2.72-r1::gentoo
dev-build/automake:       1.16.5-r2::gentoo
dev-build/cmake:          3.30.5::gentoo
dev-build/libtool:        2.4.7-r4::gentoo
dev-build/make:           4.4.1-r1::gentoo
dev-build/meson:          1.5.1::gentoo
dev-lang/perl:            5.40.0::gentoo
dev-lang/python:          3.12.7_p1::gentoo, 3.13.0::gentoo
sys-apps/baselayout:      2.15::gentoo
sys-apps/openrc:          0.54.2::gentoo
sys-apps/sandbox:         2.39::gentoo
sys-devel/clang:          18.1.8::gentoo
sys-devel/lld:            18.1.8::gentoo
sys-devel/llvm:           18.1.8-r1::gentoo
sys-kernel/linux-headers: 6.6-r1::gentoo (virtual/os-headers)
sys-libs/musl:            1.2.4-r2::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-max-age: 3
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1

Binary Repositories:

gentoobinhost
    priority: 1
    sync-uri: hxxps://distfiles.gentoo.org/releases/arm64/binpackages/23.0/arm64_musl_llvm

ACCEPT_KEYWORDS="arm64"
ACCEPT_LICENSE="@FREE"
ADDR2LINE="llvm-addr2line"
AR="llvm-ar"
AS="clang -c"
CBUILD="aarch64-unknown-linux-musl"
CC="clang"
CFLAGS="-march=native -O2 -pipe"
CHOST="aarch64-unknown-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"
CPP="clang-cpp"
CXX="clang++"
CXXFLAGS="-march=native -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 -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="rsync://mirror.leaseweb.com/gentoo/     hxxp://mirrors.mit.edu/gentoo-distfiles/     hxxps://ftp.belnet.be/pub/rsync.gentoo.org/gentoo/     ftp://ftp.halifax.rwth-aachen.de/gentoo/     hxxps://ftp.fau.de/gentoo"
INSTALL_MASK="charset.alias /usr/share/locale/locale.alias"
LANG="C.UTF8"
LD="ld.lld"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--as-needed"
LEX="flex"
NM="llvm-nm"
OBJCOPY="llvm-objcopy"
OBJDUMP="llvm-objdump"
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"
RANLIB="llvm-ranlib"
READELF="llvm-readelf"
SHELL="/bin/bash"
STRINGS="llvm-strings"
STRIP="llvm-strip"
USE="acl arm64 bzip2 clang crypt iconv ipv6 libtirpc llvm-libunwind ncurses nls openmp pam pcre pic readline seccomp ssl test-rust unicode xattr zlib" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio 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_ARM="aes asimddp crc32 edsp sha1 sha2 v8 vfp vfp-d32 vfpv3 vfpv4" ELIBC="musl" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby32" VIDEO_CARDS="fbdev dummy" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ARFLAGS, ASFLAGS, CCLD, CONFIG_SHELL, CPPFLAGS, CTARGET, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LC_ALL, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, MAKEOPTS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RUSTFLAGS, SIZE, YACC, YFLAGS
Comment 1 Winter 2024-11-03 21:07:50 UTC
Build log (too big for Bugzilla): hxxps://gist.github.com/winterqt/1cfced103e2c87b7e382d48341c7241d
Comment 2 Mike Gilbert gentoo-dev 2024-11-03 21:11:17 UTC
Please compress the build log and attach it.
Comment 3 Winter 2024-11-03 21:13:28 UTC
Created attachment 907826 [details]
Build log
Comment 4 Mike Gilbert gentoo-dev 2024-11-03 21:16:05 UTC
This config is too exotic for me to look into. Patches welcome.
Comment 5 Winter 2024-11-03 21:17:28 UTC
Is there a way for me to test this build config while using e.g. a GCC/glibc profile (so I can actually install GRUB on my machine)? If so, happy to try and fix.
Comment 6 Winter 2024-11-03 21:40:01 UTC
Fix is likely just to filter-flags, but I want to test what component is actually causing it (I'm guessing the combination of both LLVM and musl profiles), and I'm not sure how to easily do that while having a separate profile on my machine -- a container or chroot, maybe?
Comment 7 Mike Gilbert gentoo-dev 2024-11-03 23:45:51 UTC
A container or chroot seems like a good plan.