View previous topic :: View next topic |
Author |
Message |
Comrade_Stalin n00b
Joined: 15 Sep 2021 Posts: 21
|
Posted: Thu Oct 14, 2021 6:53 pm Post subject: /etc/portage/package.env Doesn't seem to work? |
|
|
Hey there, I recently switched over to Clang without issue, but as is expected certain packages simply won't compile with Clang. No matter, simply use a backup environment to compile them with, yes?
Well, for whatever reason, this does not seem to work for me.
Within /etc/portage/env/ I have several environments configured
Code: | compiler-gcc.conf
compiler-clang.conf
compiler-clang-lto.conf |
and in the file /etc/portage/package.env I specify a package to use one of those environments as such
Code: | sys-kernel/gentoo-kernel-bin compiler-gcc.conf |
So I go to emerge, and it still fails to compile, with all the same errors. It refers to "-flto=thin" so I know it is using my default make.conf which is set to use Clang with LTO.
Very troublesome as I have followed the documentation to the T and made double sure. Any ideas what I am missing? I can manually switch back to my old make.conf for a single emerge, but that is rather clunky. _________________ I agree with the official state-sponsered narrative and are therefor entirely neutral and unbiased. |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3879
|
Posted: Thu Oct 14, 2021 7:23 pm Post subject: |
|
|
Plz post output of
Code: |
cat /etc/portage/env/compiler-gcc.conf
cat /etc/portage/make.conf
cat /etc/portage/package.env
|
and the output of
emerge gentoo-kernel-bin _________________
|
|
Back to top |
|
|
Comrade_Stalin n00b
Joined: 15 Sep 2021 Posts: 21
|
Posted: Thu Oct 14, 2021 8:28 pm Post subject: |
|
|
alamahant wrote: | Plz post output of
Code: |
cat /etc/portage/env/compiler-gcc.conf
cat /etc/portage/make.conf
cat /etc/portage/package.env
|
and the output of
emerge gentoo-kernel-bin |
Right-o! Here are the cats:
Code: | ❯ cat /etc/portage/env/compiler-gcc.conf
CC="gcc"
CXX="g++"
|
Code: |
❯ cat /etc/portage/make.conf
NOLDADD=1
COMMON_FLAGS="-O2 -pipe -march=native"
CFLAGS="${CFLAGS} -flto=thin"
CXXFLAGS="${CXXFLAGS} -flto=thin"
LDFLAGS="${LDFLAGS} -Wl,-O2 -Wl,--as-needed"
CC="clang"
CXX="clang++"
AR="llvm-ar"
NM="llvm-nm"
RANLIB="llvm-ranlib"
MAKEOPTS="-j8 -l8"
PORTAGE_NICENESS=1
EMERGE_DEFAULT_OPTS="--jobs=6 --load-average=6"
GRUB_PLATFORM="efi-64"
ACCEPT_KEYWORDS="~amd64"
ACCEPT_LICENSE="* -@EULA"
INPUT_DEVICES="libinput"
VIDEO_CARDS="amdgpu radeon radeonsi"
FEATURES="parallel-install"
CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3"
USE="-gnome -kde -Xinerama -telemetry -wmf -zsh-completion -zstd -xinerama -pulseaudio -gtk
-qt4 -qt5 -systemd -bluetooth -aac -accessibility -bash-completion -bidi -clamav -coreaudio -css -cups
-dvd -dvb -dvdr -geolocation -gnome-keyring -gtk-doc -ibm -ieee1394 -jack -networkmanager -oss -plasma
-samba -scanner -raw -speex -aptx -ios -ipod -emacs -xemacs -3dfx -3df -neon -nntp -nls -nas
-smartcard -gtk3 -aqua -Xaw3d -a53 -geoid harfbuzz
#jpeg dbus unicode X -xwayland alsa elogind minimal cjk -wayland"
PORTDIR="/var/db/repos/gentoo"
DISTDIR="/var/cache/distfiles"
PKGDIR="/var/cache/binpkgs"
LC_MESSAGES=C
GENTOO_MIRRORS="http://gentoo.osuosl.org/ https://gentoo.osuosl.org/ http://mirrors.rit.edu/gentoo/" |
Code: | ❯ cat /etc/portage/package.env
sys-kernel/gentoo-kernel-bin compiler-gcc.conf
|
As for the emerge:
[/quote]
Code: |
❯ doas emerge gentoo-kernel-bin
* IMPORTANT: 1 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items.
Calculating dependencies... done!
>>> Verifying ebuild manifests
>>> Running pre-merge checks for sys-kernel/gentoo-kernel-bin-5.14.12
>>> Emerging (1 of 2) sys-kernel/gentoo-kernel-bin-5.14.12::gentoo
>>> Failed to emerge sys-kernel/gentoo-kernel-bin-5.14.12, Log file:
>>> '/var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/temp/build.log'
>>> Jobs: 0 of 2 complete, 1 failed Load avg: 1.11, 0.93, 0.89
* Package: sys-kernel/gentoo-kernel-bin-5.14.12
* Repository: gentoo
* Maintainer: dist-kernel@gentoo.org
* USE: abi_x86_64 amd64 elibc_glibc initramfs kernel_linux userland_GNU
* FEATURES: network-sandbox preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking linux-5.14.tar.xz to /var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work
>>> Unpacking genpatches-5.14-13.base.tar.xz to /var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work
>>> Unpacking genpatches-5.14-13.extras.tar.xz to /var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work
>>> Unpacking gentoo-kernel-5.14.12-1.amd64.xpak to /var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work
unpack gentoo-kernel-5.14.12-1.amd64.xpak: file format not recognized. Ignoring.
* Unpacking gentoo-kernel-5.14.12-1.amd64.xpak ...
[ ok ]
>>> Source unpacked in /var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work
>>> Preparing source in /var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work ...
* Applying 1000_linux-5.14.1.patch ...
[ ok ]
* Applying 1001_linux-5.14.2.patch ...
[ ok ]
* Applying 1002_linux-5.14.3.patch ...
[ ok ]
* Applying 1003_linux-5.14.4.patch ...
[ ok ]
* Applying 1004_linux-5.14.5.patch ...
[ ok ]
* Applying 1005_linux-5.14.6.patch ...
[ ok ]
* Applying 1006_linux-5.14.7.patch ...
[ ok ]
* Applying 1007_linux-5.14.8.patch ...
[ ok ]
* Applying 1008_linux-5.14.9.patch ...
[ ok ]
* Applying 1009_linux-5.14.10.patch ...
[ ok ]
* Applying 1010_linux-5.14.11.patch ...
[ ok ]
* Applying 1011_linux-5.14.12.patch ...
[ ok ]
* Applying 1500_XATTR_USER_PREFIX.patch ...
[ ok ]
* Applying 1510_fs-enable-link-security-restrictions-by-default.patch ...
[ ok ]
* Applying 2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch ...
patching file net/bluetooth/hci_conn.c
Hunk #1 succeeded at 1395 with fuzz 1 (offset 123 lines).
[ ok ]
* Applying 2900_tmp513-Fix-build-issue-by-selecting-CONFIG_REG.patch ...
[ ok ]
* Applying 2920_sign-file-patch-for-libressl.patch ...
[ ok ]
* Applying 3000_Support-printing-firmware-info.patch ...
[ ok ]
* Applying 4567_distro-Gentoo-Kconfig.patch ...
[ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work ...
make -j8 -l8 -C linux-5.14 V=1 HOSTCC=gcc HOSTCXX=g++ 'HOSTCFLAGS=-O2 -pipe -flto=thin' 'HOSTLDFLAGS=-Wl,-O1 -Wl,--as-needed -Wl,-O2 -Wl,--as-needed' CROSS_COMPILE=x86_64-pc-linux-gnu- AS=x86_64-pc-linux-gnu-as CC=gcc LD=x86_64-pc-linux-gnu-ld.bfd AR=llvm-ar NM=llvm-nm STRIP=: OBJCOPY=x86_64-pc-linux-gnu-objcopy OBJDUMP=x86_64-pc-linux-gnu-objdump ARCH=x86 O=/var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work/modprep modules_prepare
make: Entering directory '/var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work/linux-5.14'
make -C /var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work/modprep -f /var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work/linux-5.14/Makefile modules_prepare
make[1]: Entering directory '/var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work/modprep'
: " SYNC include/config/auto.conf.cmd"
make -f /var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work/linux-5.14/Makefile syncconfig
if [ -f /var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work/linux-5.14/.config -o \
-d /var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work/linux-5.14/include/config -o \
-d /var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work/linux-5.14/arch/x86/include/generated ]; then \
echo >&2 "***"; \
echo >&2 "*** The source tree is not clean, please run 'make ARCH=x86 mrproper'"; \
echo >&2 "*** in /var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work/linux-5.14";\
echo >&2 "***"; \
false; \
fi
make -f /var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work/linux-5.14/scripts/Makefile.build obj=scripts/basic
ln -fsn /var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work/linux-5.14 source
{ echo "# Automatically generated by /var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work/linux-5.14/Makefile: don't edit"; echo "include /var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work/linux-5.14/Makefile"; } > Makefile
test -e .gitignore || \
{ echo "# this is build directory, ignore it"; echo "*"; } > .gitignore
gcc -Wp,-MMD,scripts/basic/.fixdep.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -O2 -pipe -flto=thin -I ./scripts/basic -Wl,-O1 -Wl,--as-needed -Wl,-O2 -Wl,--as-needed -o scripts/basic/fixdep /var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work/linux-5.14/scripts/basic/fixdep.c
cc1: error: unrecognized argument to '-flto=' option: 'thin'
make[3]: *** [/var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work/linux-5.14/scripts/Makefile.host:95: scripts/basic/fixdep] Error 1
make[2]: *** [/var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work/linux-5.14/Makefile:553: scripts_basic] Error 2
make[1]: *** [/var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work/linux-5.14/Makefile:740: include/config/auto.conf.cmd] Error 2
make[1]: Leaving directory '/var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work/modprep'
make: *** [Makefile:220: __sub-make] Error 2
make: Leaving directory '/var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work/linux-5.14'
* ERROR: sys-kernel/gentoo-kernel-bin-5.14.12::gentoo failed (configure phase):
* emake failed
*
* If you need support, post the output of `emerge --info '=sys-kernel/gentoo-kernel-bin-5.14.12::gentoo'`,
* the complete build log and the output of `emerge -pqv '=sys-kernel/gentoo-kernel-bin-5.14.12::gentoo'`.
* The complete build log is located at '/var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/temp/environment'.
* Working directory: '/var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work'
* S: '/var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work'
* Messages for package sys-kernel/gentoo-kernel-bin-5.14.12:
* ERROR: sys-kernel/gentoo-kernel-bin-5.14.12::gentoo failed (configure phase):
* emake failed
*
* If you need support, post the output of `emerge --info '=sys-kernel/gentoo-kernel-bin-5.14.12::gentoo'`,
* the complete build log and the output of `emerge -pqv '=sys-kernel/gentoo-kernel-bin-5.14.12::gentoo'`.
* The complete build log is located at '/var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/temp/environment'.
* Working directory: '/var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work'
* S: '/var/tmp/portage/sys-kernel/gentoo-kernel-bin-5.14.12/work'
|
And of course, thank you for your time _________________ I agree with the official state-sponsered narrative and are therefor entirely neutral and unbiased. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54239 Location: 56N 3W
|
Posted: Thu Oct 14, 2021 8:47 pm Post subject: |
|
|
Comrade_Stalin,
Much as I find your username in poor taste, the forums are a microcosm of the real world, so its not a reason to not help.
Maybe it dampens my enthusiasm a little though.
Your /etc/portage/env/compiler-gcc.conf file
chooses gcc and g++ as the C and C++ compilers. That's all.
It says nothing about CFLAGS or CXXFLAGS so the values from make.conf will be used.
The Username change request thread (part 3) is available if you wish to request a user name change. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Comrade_Stalin n00b
Joined: 15 Sep 2021 Posts: 21
|
Posted: Thu Oct 14, 2021 9:08 pm Post subject: |
|
|
NeddySeagoon
OOOhhhh, I see. I thought that they would simply revert to their default values. I see I still have much to learn.
I appreciate you being helpful despite your reservations. Obviously I wouldn't be upholding Stalin if I agreed using his image was in poor taste, but of course I'm sure we come from very different backgrounds politically.
Anyway, thank you for your assistance! _________________ I agree with the official state-sponsered narrative and are therefor entirely neutral and unbiased. |
|
Back to top |
|
|
Comrade_Stalin n00b
Joined: 15 Sep 2021 Posts: 21
|
Posted: Thu Oct 14, 2021 9:13 pm Post subject: |
|
|
Yep, I added those two lines in /etc/portage/env/compiller-gcc.conf and it made it work...
Seems like it should have been obvious, but I guess most things do after you understand it. _________________ I agree with the official state-sponsered narrative and are therefor entirely neutral and unbiased. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54239 Location: 56N 3W
|
Posted: Thu Oct 14, 2021 9:18 pm Post subject: |
|
|
Comrade_Stalin,
I'm sure we do and the Gentoo forums are not the place to discuss politics.
I'm good with agreeing to differ and it appears you are too.
Lets leave it there. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
mike155 Advocate
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Thu Oct 14, 2021 10:10 pm Post subject: |
|
|
Comrade_Stalin,
please change you username.
Mike |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21635
|
|
Back to top |
|
|
spikyatlinux n00b
Joined: 18 Sep 2010 Posts: 31
|
Posted: Fri Oct 15, 2021 8:46 am Post subject: |
|
|
Isn´t the COMMON_FLAGS variable wrong also?
I think it should be
Code: | COMMON_FLAGS="-O2 -pipe -flto=thin -march=native"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}" |
in your case |
|
Back to top |
|
|
|