#Custom profile experiments

1 messages · Page 1 of 1 (latest)

winter jungle
#

Hello. How difficult is it to create a custom profile for llvm + desktop/gnome/systemd/merged-usr?
I've read the Wiki article on the topic, but I'm still not sure about the parent file.
Is it going to look like this?

gentoo:default/linux/amd64/17.1/clang
gentoo:targets/desktop/gnome
gentoo:targets/systemd
gentoo:features/merged-usr
hollow heath
#

that looks fine

#

I have a very similar profile to you on my github

#

one second

winter jungle
#

Nice, I should try it soon then

winter jungle
#

Hmm

(chroot) livecd ~ # time emerge --ask --verbose --update --deep --newuse @world

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 0.89 s.


emerge: there are no ebuilds built with USE flags to satisfy "sys-libs/gpm[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?]".
!!! One of the following packages is required to complete your request:
- sys-libs/gpm-1.20.7-r5::gentoo (Change USE: +abi_x86_32)
(dependency required by "sys-libs/ncurses-6.4_p20230401::gentoo" [ebuild])
(dependency required by "sys-devel/gettext-0.21.1::gentoo[ncurses]" [ebuild])
(dependency required by "sys-devel/m4-1.4.19-r2::gentoo[nls]" [installed])
(dependency required by "sys-devel/autoconf-2.71-r6::gentoo" [installed])
(dependency required by "sys-devel/libtool-2.4.7-r1::gentoo" [installed])
(dependency required by "sys-apps/debianutils-5.8::gentoo" [installed])
(dependency required by "app-misc/ca-certificates-20230311.3.90::gentoo" [installed])
(dependency required by "dev-python/certifi-3021.3.16-r3::gentoo" [installed])
(dependency required by "dev-python/setuptools-68.1.2::gentoo" [installed])
(dependency required by "dev-python/setuptools-scm-7.1.0::gentoo" [installed])
winter jungle
#

I wonder if this means my profile lacks something for multilib
emerge --info: https://bpa.st/ZT6Q
profile things: https://bpa.st/UAYA
and selected profile:

(chroot) livecd ~ # ls -l /etc/portage/make.profile
lrwxrwxrwx 1 root root 71 Oct  6 16:40 /etc/portage/make.profile -> ../../var/db/repos/local/profiles/llvm-desktop-gnome-systemd-merged-usr
#

or should I just set ABI_X86="64 32" in make.conf genthonk

foggy dirge
#

You could create a profile to control that environment but it may not be lucrative to invest the time without multiple deployments

#

I've taken a different approach in the past - just track /etc/portage in git and having a few ignored files for local changes

#

It's not either or 🙂 just different techniques to solve the same problem

noble solstice
winter jungle
# noble solstice it's a bit of a sledgehammer fix as you will end compiling a lot of programs twi...

Would it be better to add this USE flag per-package in profile files (when requested by Portage), kind of like this (but I guess just package.use, not .force)?
https://github.com/gentoo/gentoo/blob/master/profiles/default/linux/amd64/17.1/clang/package.use.force

GitHub

[MIRROR] Official Gentoo ebuild repository. Contribute to gentoo/gentoo development by creating an account on GitHub.

hollow heath
#

don't be afraid of package.using multilib

#

if it's needed

#

I have like 40 entries in my package.use

#

for 32-bit support

winter jungle
#

Added abi_x86_32 for two packages in profile's package.use and Portage seems to be satisfied
We'll see how it goes )))

winter jungle
#

Hm, qtgui-5.15.10-r2 fails to build with this in build.log:

Incompatible processor. This Qt build requires the following features:
    fma f16c
Aborted. Incompatible processor: missing feature 0x810 - fma.

I've tried adding -mno-fma -mno-f16c to COMMON_FLAGS in make.conf, but it doesn't seem to fix the issue genthonk

hollow heath
#

what are your CPU_FLAGS_X86 and your CPU

#

also pls do not do stuff like that globally

winter jungle
#
(chroot) livecd ~ # cpuid2cpuflags 
CPU_FLAGS_X86: aes avx avx2 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3
(chroot) livecd ~ # cat /etc/portage/package.use 
*/* CPU_FLAGS_X86: aes avx avx2 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3
hollow heath
#

uhh

#

that really should not happen

winter jungle
#

this is in a VirtualBox VM, though

hollow heath
#

this is a virtual box issue

#

get rid of that "-mno" crap you have

#

and do -mno-avx2

winter jungle
#

k, will try now

hollow heath
#

then rebuild all your qt packages

winter jungle
hollow heath
#

no

#

well I forgot if and how

#

they inherit flags

#

try to rebuild just qtgui

winter jungle
#

still fails:

Incompatible processor. This Qt build requires the following features:
    fma f16c
Aborted. Incompatible processor: missing feature 0x810 - fma.
#
(chroot) livecd ~ # emerge --info | grep FLAGS=
CFLAGS="-march=x86-64-v3 -mno-avx2 -O3 -pipe -flto=thin"
CXXFLAGS="-march=x86-64-v3 -mno-avx2 -O3 -pipe -flto=thin"
FCFLAGS="-march=x86-64-v3 -mno-avx2 -O3 -pipe -flto=thin"
FFLAGS="-march=x86-64-v3 -mno-avx2 -O3 -pipe -flto=thin"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--as-needed"
hollow heath
#

let's see if it's inheriting those flags from anywhere

#

this is just an issue with qt and with virtualbox

#

I would also remove AVX2 from your CPU_FLAGS

#

that is big problematic it seems

winter jungle
#

yeah
only avx2?

hollow heath
#

that one seems to be causing you issues and has bug reports about it

#

also

#

that march

#

enables avx2

#

and a bunch of other stuff

#

I think a different generic march would be better

#

like -v2 or just x86-64

winter jungle
#

true
v2 has no avx, right?

hollow heath
#

I think so

winter jungle
#

so, this is what I have atm:

(chroot) livecd ~ # cat /etc/portage/make.conf | head -4
# Keep this setting intact when reporting bugs
LC_MESSAGES=C.utf8

COMMON_FLAGS="-march=x86-64-v2 -mno-avx2 -O3 -pipe -flto=thin"
(chroot) livecd ~ # cat /etc/portage/package.use 
*/* CPU_FLAGS_X86: aes avx mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3
hollow heath
#

let's see if qt stuff builds

#

bceause that should be it

winter jungle
#

damn it, same thing

hollow heath
#

is it inherting those flags from anywhere

#

can you show me the log

winter jungle
#

yeah, one moment

hollow heath
#

try to use a diff service

#

wgetpaste errord out

winter jungle
#

oh
I've also tried to emerge ansifilter, but now it requires a lot of merges

hollow heath
#

because of the USE="qt5" and dependencies you don't have satisfied

#

qtgui should probably build with USE="-vulkan"

#

as a workaround

winter jungle
winter jungle
hollow heath
#

hm

#

it's respecting your CFLAGS

#

it's just that

#

vulkan has a hard requirement

#

??

#

for some reason

winter jungle
#

oh, for avx2? all some other set of instructions?

hollow heath
#

I think so

winter jungle
#

-march should stay at v2?

hollow heath
#

yea

winter jungle
#

I guess in this test VM I can even try global -vulkan, if it would make things easier

hollow heath
#

I wanna see if qtgui builds without it

#

it shouldn'tbe doing this

#

I just don't know why

winter jungle
#

do I do USE="-vulkan" emerge -avDN dev-qt/qtgui?

hollow heath
#

USE="-vulkan" emerge -1 qtgui

winter jungle
#

would I like to merge these packages? trolley

#

(i'm not against it if it's necessary)

hollow heath
#

they are dependencies

#

you kinda need to

winter jungle
#

ok
let's see..

hollow heath
#

why does it keep forcing it

#

ughhh

#

where is it grabbing these

#

wait

#

can you compile

#

dev-qt/qtbase

#

and then qtgui

winter jungle
#

emerge -1 dev-qt/qtbase? or with -vulkan too?

hollow heath
#

just do qtbase

#

and then qtgui

winter jungle
#

there's qtqui in the list
is there a way to enforce a certain order?

hollow heath
#

I'm just trying to figure out which one it would inheirit those flags if it ever did tht

#

but all of them are new

#

virtualbox is crap is my conclusion

winter jungle
#

yeah
I only use it because it was installed for a Windows VM I had for a while

#

tbf it took only 1 hour to emerge 200 other packages
I guess I will just try it in QEMU
although I need to install it first simd

#

btw
should I set some LDFLAGS if I plan to use -march=x86-64-v3 -O3 -pipe -flto=thin?

hollow heath
#

you can, you don't have to

#

the profile sets some basic flags for you

winter jungle
#

Theoretically, I could try this profile on my host. I have automatic ZFS snapshots of root and home datasets, and it's easy to rollback to them right from the bootloader hmmm

So, the only question is how difficult is it to switch from default desktop/gnome/systemd/merged-usr to the custom one with clang?

winter jungle
#

I guess it's much easier and safer to just install it alongside, on a separate root dataset genthonk

winter jungle
#

Okay, it does seem to work wowlinux