I'm building an llvm profile desktop machine, and comparing it against a gcc desktop machine; and having issues understanding portage's use flags and restrictions. ( They seem to have changed a bit over the last few years.... and certain bugs, never seem to get fixed even in the stage 3 tarballs. )
I'm wanting to figure out how to get portage to be more aggressive with error messages; document a few annoyances that other's a *probably* running into, (as soon as they try anything other than a simple, naive install); and possibly how/where to report portage package issues; [ ?! and (mis-)documentation issues on the gentoo site ?! ]
skip down to the next ----------------------------------- For the main question(s)
This section is all the gory details you may want to ask about.
I'm an advanced programmer/BSEE with 25+ years experience doing very complex problems. I have a fondness for building minimal systems, including embedded. Gentoo can *do* but the learning threshold is still high (2024.).
Open software, though, is about being able to fix problems, right?
Therefore, this round of masochism will be sponsored on a new ASUS Vivobook (Year 2024), M1803Q ; 8 core:
Linux localhost 5.15.159 #8 SMP Sat Mar 9 22:34:30 PST 2024 x86_64 AMD Ryzen 7 4700U with Radeon Graphics AuthenticAMD GNU/Linux. ( I've paid for it, all; so you don't have to, unless you want to. )
This computer has a 1Tb /dev/nvme0n1, a 40Gb DRAM memory, a MediaTek MT7921 Wireless Adapter
Audio: 17h/19h HD (AMD), and ACP/ACP3x/ACP6x Audio Compressor.
The GPU is AMD Radeon Vega Mobile series, Cezzane.
This is a pure AMD laptop.
I will be posting config files, so other's may enjoy the quick solutions and study it in detail...
But: I am using an older vivobook to websurf, and post here, while my new machine experiences birthing pains.
I've broken the hard drive up into a partitioning as follows: ( with 741GiB free, still. )
Code: Select all
Number Size Code Name
gpt1 260 MiB EFOO EFI system partition
gpt2 16.9 MiB 0C01 Mircrosoft Reserved
gpt3 31.0 GiB 8300 Root
gpt4 31.0 GiB 8300 Root~
gpt5 31.0 GiB 8300 Opt
gpt6 31.0 GiB 8300 home
gpt7 31.0 GiB 8300 portage
gpt8 31.0 GiB 8300 tmpbuild
gpt9 4.0 GiB 8300 linuxKernelSrc
For most people, this sneaky -pipe bashing will only really become annoying when trying to compile 'rust'; ( which most people have not been able to do (without a supercomputer bank) for the last two years or so. -- and that, I suspect, is why it is a 'bin' package hiding in Gentoo's compile everything philosophy!. )
I have also built a custom kernel, with no initrd, all firmware compiled into the image; I already know the basic kernel config is good (as I use it on another vivobook, from 2022 with different firmware). The kernel has ram compression swapping built in. ( And I have some questions about filesystem choices in ram, that might exploit the compression; though that's a later issue. )
I started from two stage3 tarballs, and have two root partitions; one compiled by gcc, the other by llvm.
https://distfiles.gentoo.org/releases/a ... 55Z.tar.xz
eselect profile default/linux/amd64/23.0 (stable)
https://distfiles.gentoo.org/releases/a ... 55Z.tar.xz
eselect profile defualt/linux/amd64/23.0 llvm (stable)
This will allow me to compare, space, speed, etc. and also give me a redundant backup root, if the other one happens to fail.
All linux filesystems are BTRFS. EFI, is of course, fat -F32.
I chose 260MiB of EFI in order to install the gentoo minimal live-cd onto that partition during initial setup.
( It was a bad choice; I had to upgrade to the GUI liveCD and fight GRUB to get it to *indirectly* boot from a non gpt1 partition. Sigh, do Gentoo maintainers actually test the minimal.iso or is there not enough time to do it? )
If I did it again, I'd partition a full DVD size of 4Gb, for the EFI partition.
My make.conf is as follows:
Code: Select all
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
MAKEOPT="-j4"
#
ACCEPT_LICENSE="-* @FREE"
GRUB_PLATFORMS="emu efi-64"
#
PKGDIR="/usr/cache/binpkgs"
DISTDIR="/usr/cache/distfiles"
PORTAGE_TMPDIR="/mnt"
#
LC_MESSAGES=C.utf8
#
USE="bluetooth dbus elogind ffmpeg fontconfig gles1 gles2 gnutls grub harfbuzz
icu jpeg lapack minizip png pulseaudio svg truetype xattr xdg xinerama
-acl -consolekit -gstreamer -jack -kde -libav -ssh1 -ssl1 -sslv2 -sslv3
-systemd -bpf"
VIDEO_CARDS="amdgpu radeonsi" # Radeon SI, according to gentoo wiki, is *required* for OpenGL hardware support.
--------------------------------------------
I want to build Gentoo packages in a consistent/clean/complete way; (eg: emerge -e @world) but there are packages that may not compile on one root, that will compile on the other root~. Therefore, I need to be able to force packages to not install, selectively. Eg: Either masking them, or in the package.use directory, specifying a particular acceptable version; so as to make both roots use the exact same source code.
In older Gentoo distributions, I could write a package name with an asterisk as part of use flags: /etc/portage/package.use/cairo
Code: Select all
dev-cpp/cairomm* X
xll-libs/cairo*
In general, the asterisks no longer seem to be consistently welcome. It does work as long as asterisks are not included. So, I just 'worked' around this annoyance:
BUT:
In the purely *stable* distribution for llvm, I suddenly had a package conflict; May 24,2024. (Which shouldn't happen, right?)
The Gentoo distribution indicated that dev-python/sphinx-7.2.6 required python doclib <0.20
Except that the lowest version number of doclib, was .20.1-r1
Therefore, I got a conflict message even though I'm using a purely stable distribution where at least one package ought to have been installable without a conflict.
The obvious thing, here, (I thought) is to either use a sphinx package with a higher version number; so it will accept a higher version of doclib *or* to block the conflicting version of doclib, and force portage to 'deduce' that it must use a higher version number of sphinx; (or at least STOP the compile with a hard error. )
But neither idea stopped portage from compiling and installing the wrong package (again!).
I did: emerge --unemerge dev-python/docutils ; emerge --unemerge dev-python/docutils
THEN:
nano /etc/portage/package.mask/docutils
Code: Select all
dev-python/docutils-0.21.2nano /etc/portage/package.use/sphinx
Code: Select all
>dev-python/sphinx-7.2.6This did not cause an error message; but it still built sphinx-7.2.6, ignoring my constraint!
Deleting the packages again, and trying:
nano /etc/portage/package.use/sphinx
Code: Select all
>=dev-python/sphinx-7.3.7-r2It's at this point that I realized that the portage *stable* tree was in a mysteriously unstable state. I only knew one other way to proceed; I could use /etc/portage/package.accept_keywords/sphinx.
This did work, and solved the problem. However, I don't want portage *silently* building a package that does not meet constraints specified in the package.use file. Is there a switch or way to make portage more aggressive in it's error reporting so that an emerge *stops* if a requested constraint (AKA: atom prefix) can not be properly met by the stable source code ?
Additional questions/issues:
So far; I've encountered three other major problems that aren't documented in the Gentoo wikis.
#1. There is a lot of Grub confusion about where the EFI partition ought to be mounted.
Gentoo stage 3 tarballs only supply /boot -- Which is intended for legacy BIOS booting, and not the more common /efi partition.
The wiki on installing the base system says it ought to be /efi where the partition is mounted. But: Common install videos mis-place the location as /boot/efi which can cause all kinds of chaos and failures in the future when updating kernels, grub, etc.
https://www.youtube.com/watch?v=J7W9MItUSGw
I decided to mount the partition on /efi, (lowercase) exactly as the Gentoo handbook/wiki stated; and then do a sym-link: ln -s /efi /boot
This is because kernelinstall (rc version) still looks for /boot and does not follow the wiki. (May 2024).
Is this a correct approach, or does the inatallation manual really intend a different approach, and is just vaguely written?
When all else failed, I found I could do a manual grub install (after hours of head banging) with:
grub-install --target-x86_64-efi --efi-directory=/efi
grub-mkconfig -o /efi/grub/grub.cfg
Note: The grub install switch for '--efi-directory' is actually looking for the partition mount point. There *is* another directory INSIDE the /boot or /efi directory mount point, which is EFI. /efi/EFI or /boot/EFI This capital EFI directory is NOT what that grub switch is about! (Documentation headache, and I'm not sure many people even realize there is an efi EFI ambiguity! )
#2 Getting hardware acceleration to work for openGL in the 'amdGPU' configuration for Radeon cards is a documentation nightmare. I still don't have it right. The Gentoo wiki page describing the firmware I need for Cezzane, (May 2024), has a first entry that implies a firmware name that is different from a second entry, that is right.
#3 even though I have a default stage 3 tarball, and Gentoo packages often use the compressed kernel config information from the kernel to identify which kernel options were set; Gentoo can't build the /sys version of the kernel config file on a stage3, virgin, partition AKA ( without the cpio package installed). What happens without cpio ? in /usr/src/linux, executing 'make' will act as if the kernel compiled correctly, with no error message at the end; even if cpio is not installed. BUT: The kernel will not be made. (and no final error message. )
It's only after a bit of inspiration that trying echo $? will yield a surprising nonzero, after the kernel compile.
#4 (side note)
The live-CD for Gentoo, although it runs on my laptop correctly, would drop wireless internet connection randomly and not restart it properly. ( Once I had my base install of the stage 3, and used wpa_supplicant, my install had NO PROBLEMS keeping the internet connection alive. I'm using the same firmware; so it's the live-CD's upgrades which are causing the problem )
#5 (side note)
There is still a problem when doing emerge -e @world, on a virgin stage3 install, with only the make.conf file posted above added; that I get an immediate dependency loop between fontfonfig and harfbuzz. Cmon folks! Shouldn't this be in a wiki on how to fix it? Anyone who is actually doing something in their gentoo install besides following a recipe, is going to hit this problem.
I used,
USE="-harfbuzz" emerge --oneshot fontconfig # This breaks the circular dependency
emerge --upgrade --deep --newuse --with-bdeps=y @world
Looking forward to comments/suggestions.
The immediately following poster wasted bandwidth, so I suggest you skip to:
viewtopic-p-8828213.html#8828213 , where I summarize my complaint, to which you may still reply; and I begin configuration files in the post that follow.



