/var/db/gentoo/scripts/bootstrap.sh should rebuild the primary C compiler, which should be llvm+lld on profiles using llvm. On my musl+llvm profile, it pulls in gcc+binutils instead. Reproducible: Always Steps to Reproduce: 1. unpack any stage3 which uses llvm profile (glibc+llvm or musl+llvm) 2. emerge --sync 3. /var/db/repos/gentoo/scripts/bootstrap.sh Actual Results: livecd / # /var/db/repos/gentoo/scripts/bootstrap.sh -p -v Gentoo Linux; https://www.gentoo.org/ Copyright 1999-2024 Gentoo Authors; Distributed under the GPLv2 ------------------------------------------------------------------------------- [[ (0/3) Locating packages ]] * Using baselayout : >=sys-apps/baselayout-2 * Using portage : sys-apps/portage * Using os-headers : sys-kernel/linux-headers:0 * Using binutils : sys-devel/binutils * Using gcc : sys-devel/gcc * Using libc : sys-libs/musl * Using texinfo : sys-apps/texinfo * Using zlib : sys-libs/zlib * Using ncurses : sys-libs/ncurses ------------------------------------------------------------------------------- [[ (1/3) Configuring environment ]] ------------------------------------------------------------------------------- [[ (2/3) Updating portage ]] * Executing: USE=-* build bootstrap unicode pkg-config split-usr xml python_targets_python3_12 python_single_target_python3_12 gil multilib zstd cet -berkdb -gdbm ssl curl_ssl_openssl -binutils-plugin compiler-rt clang libunwind default-compiler-rt default-lld default-libcxx llvm-libunwind libcxx -sanitize libcxxabi -llvm_targets_BPF -llvm_targets_AMDGPU -llvm_targets_NVPTX -llvm_targets_BPF emerge --oneshot -p -v sys-apps/portage !!! CONFIG_PROTECT is empty These are the packages that would be merged, in order: Calculating dependencies... done! Dependency resolution took 0.59 s (backtrack: 0/20). [ebuild R ] sys-apps/portage-3.0.63-r1::gentoo USE="build* (ipc) -apidoc -doc -gentoo-dev -native-extensions* -rsync-verify* (-selinux) -test -xattr*" PYTHON_TARGETS="python3_12 (-pypy3) -python3_10 -python3_11" 1161 KiB Total: 1 package (1 reinstall), Size of downloads: 1161 KiB ------------------------------------------------------------------------------- [[ (3/3) Emerging packages ]] * Executing: emerge --oneshot -p -v sys-kernel/linux-headers:0 sys-apps/texinfo sys-devel/binutils sys-devel/gcc sys-libs/musl >=sys-apps/baselayout-2 sys-libs/zlib !!! CONFIG_PROTECT is empty These are the packages that would be merged, in order: Calculating dependencies... done! Dependency resolution took 0.63 s (backtrack: 0/20). [ebuild R ] sys-apps/baselayout-2.15::gentoo USE="-build (-split-usr)" 30 KiB [ebuild N ] dev-libs/mpfr-4.2.1:0/6::gentoo USE="-static-libs -verify-sig" 1459 KiB [ebuild N ] dev-libs/mpc-1.3.1:0/3::gentoo USE="-static-libs" 756 KiB [ebuild N ] sys-devel/gcc-config-2.11::gentoo USE="(cc-wrappers) (native-symlinks)" 18 KiB [ebuild N ] sys-devel/binutils-config-5.5::gentoo USE="(native-symlinks)" 8 KiB [ebuild R ] sys-libs/zlib-1.3.1-r1:0/1::gentoo USE="-minizip -static-libs -verify-sig" 1276 KiB [ebuild R ] sys-libs/musl-1.2.4-r1::gentoo USE="-crypt -headers-only (-split-usr) -verify-sig" 1065 KiB [ebuild R ] sys-kernel/linux-headers-6.6-r1::gentoo USE="-headers-only" 136783 KiB [ebuild R ] sys-apps/texinfo-7.1-r1::gentoo USE="-nls* -standalone* -static" 5416 KiB [ebuild N ] sys-devel/binutils-2.42-r1:2.42::gentoo USE="zstd (-cet) -debuginfod -doc -gold (-gprofng) -hardened -multitarget -nls (-pgo) -plugins -static-libs -test -vanilla" 26956 KiB [ebuild N ] sys-devel/gcc-13.2.1_p20240210:13::gentoo USE="(cxx) (default-stack-clash-protection) (default-znow) (pie) zstd -ada (-cet) (-custom-cflags) -d -debug -doc (-fixed-point) -fortran -go -graphite -hardened (-ieee-long-double) -jit (-libssp) -lto -modula2 (-multilib) (-nls) -objc -objc++ -objc-gc -openmp (-pch) -pgo -sanitize -ssp -systemtap -test -valgrind -vanilla (-vtv)" 82429 KiB Total: 11 packages (6 new, 5 reinstalls), Size of downloads: 256190 KiB ------------------------------------------------------------------------------- Expected Results: llvm+lld should be emerged instead of gcc+binutils. livecd / # emerge --info !!! No gcc found. You probably need to 'source /etc/profile' !!! to update the environment of this terminal and possibly !!! other terminals also. Portage 3.0.63 (python 3.12.3-final-0, default/linux/amd64/23.0/musl/llvm, [unavailable], musl-1.2.4-r1, 6.6.30-gentoo-dist x86_64) ================================================================= System uname: Linux-6.6.30-gentoo-dist-x86_64-12th_Gen_Intel-R-_Core-TM-_i5-1240P-with-libc KiB Mem: 32431916 total, 20512296 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Thu, 20 Jun 2024 15:30:00 +0000 Head commit of repository gentoo: e8e4b44edb4a31c555d65dff472c271bb4f2f0af sh bash 5.1_p16-r11 ld LLD 17.0.6 (compatible with GNU linkers) app-misc/pax-utils: 1.3.7::gentoo app-shells/bash: 5.1_p16-r11::gentoo dev-build/autoconf: 2.71-r7::gentoo dev-build/automake: 1.16.5-r2::gentoo dev-build/cmake: 3.28.5::gentoo dev-build/libtool: 2.4.7-r4::gentoo dev-build/make: 4.4.1-r1::gentoo dev-build/meson: 1.4.0-r1::gentoo dev-lang/perl: 5.38.2-r3::gentoo dev-lang/python: 3.12.3-r1::gentoo sys-apps/baselayout: 2.15::gentoo sys-apps/openrc: 0.54::gentoo sys-apps/sandbox: 2.38::gentoo sys-devel/clang: 17.0.6::gentoo sys-devel/lld: 17.0.6::gentoo sys-devel/llvm: 17.0.6::gentoo sys-kernel/linux-headers: 6.6-r1::gentoo (virtual/os-headers) sys-libs/musl: 1.2.4-r1::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: no sync-rsync-verify-max-age: 3 sync-rsync-verify-jobs: 1 Binary Repositories: gentoobinhost priority: 1 sync-uri: https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64_musl_llvm ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE" ADDR2LINE="llvm-addr2line" AR="llvm-ar" AS="clang -c" CBUILD="x86_64-pc-linux-musl" CC="clang" CFLAGS="-march=native -O2 -pipe" CHOST="x86_64-pc-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" FFLAGS="-march=native -O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" INSTALL_MASK="charset.alias /usr/share/locale/locale.alias" LANG="C.UTF8" LD="ld.lld" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -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="amd64 clang llvm-libunwind test-rust" ABI_X86="64" ELIBC="musl" KERNEL="linux" 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
I don't understand why you'd want or need to run bootstrap.sh outside of bootstrapping a system from a stage1 (which we haven't provided in many years).
(In reply to Matt Turner from comment #1) > I don't understand why you'd want or need to run bootstrap.sh outside of > bootstrapping a system from a stage1 (which we haven't provided in many > years). well, at least warn user and exit if their profile is llvm?