Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
USE flags and FEATURES that are not shown!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Demo
Tux's lil' helper
Tux's lil' helper


Joined: 25 Nov 2022
Posts: 78

PostPosted: Tue Mar 19, 2024 9:38 pm    Post subject: USE flags and FEATURES that are not shown! Reply with quote

Hello folks!
Been a while ...

Why are some flags and features of some packages not shown or accessed unless some good search - sometimes research - is done, sometimes for the specific flag with it's specific characters?

For example:
Code:
euse -i cpu_flags_x86_aes cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_f16c cpu_flags_x86_mmx cpu_flags_x86_pclmul cpu_flags_x86_popcnt cpu_flags_x86_rdrand cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_sse4_1 cpu_flags_x86_sse4_2 cpu_flags_x86_sse4a cpu_flags_x86_ssse3
global use flags (searching: cpu_flags_x86_aes cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_f16c cpu_flags_x86_mmx cpu_flags_x86_pclmul cpu_flags_x86_popcnt cpu_flags_x86_rdrand cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_sse4_1 cpu_flags_x86_sse4_2 cpu_flags_x86_sse4a cpu_flags_x86_ssse3)
************************************************************
no matching entries found

local use flags (searching: cpu_flags_x86_aes cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_f16c cpu_flags_x86_mmx cpu_flags_x86_pclmul cpu_flags_x86_popcnt cpu_flags_x86_rdrand cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_sse4_1 cpu_flags_x86_sse4_2 cpu_flags_x86_sse4a cpu_flags_x86_ssse3)
************************************************************
no matching entries found


Some others have no practical effect on the system, like "static-pie"!

And it's harder to get package FEATURES!!

The question is open for discussion, I don't want to just get an answer and run ...
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1663

PostPosted: Tue Mar 19, 2024 10:08 pm    Post subject: Reply with quote

euse looks to have limitations. One of which seems to be finding information on USE_EXPAND descriptions as you have found.

FEATURES are documented in man make.conf. FEATURES are not part of the package specification. They are portage specific extensions.

"static-pie" *was* a USE flag for sys-libs/glibc that is dropped in recent releases.
Back to top
View user's profile Send private message
Demo
Tux's lil' helper
Tux's lil' helper


Joined: 25 Nov 2022
Posts: 78

PostPosted: Tue Mar 19, 2024 10:30 pm    Post subject: Reply with quote

Hi

Quote:
"static-pie" *was* a USE flag for sys-libs/glibc that is dropped in recent releases.


That's an update, I mean I ran equery and everything, but it took me a few hours to resolve the problem I needed that flag for, as I use gold linker instead of lld so I got errors emerging glibc ...

Quote:
FEATURES are documented in man make.conf. FEATURES are not part of the package specification. They are portage specific extensions.


Well yes ...
But then some packages support, or are helped by some features, and not the rest, there's no clue, and it's by trial and error ...

Quote:
euse looks to have limitations. One of which seems to be finding information on USE_EXPAND descriptions as you have found.


Which leads me to this question, does euse depend on a static database? Or extract USE flags from ebuild files?
I use emaint instead of emerge --sync/rsync, is this relevant?
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1663

PostPosted: Tue Mar 19, 2024 10:36 pm    Post subject: Reply with quote

Demo wrote:
Which leads me to this question, does euse depend on a static database? Or extract USE flags from ebuild files?
I use emaint instead of emerge --sync/rsync, is this relevant?

euse likely just reads profiles/use.desc and profiles/use.local.desc for USE info and bails if it does not find anything. The latter is generated from all of the metadata.xml files littered about the repository.
Back to top
View user's profile Send private message
Demo
Tux's lil' helper
Tux's lil' helper


Joined: 25 Nov 2022
Posts: 78

PostPosted: Wed Mar 20, 2024 6:58 pm    Post subject: Reply with quote

The replies don't seem to draw a very bright picture ...

Are there any possible additions to the discussion? Anyone?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54261
Location: 56N 3W

PostPosted: Wed Mar 20, 2024 9:20 pm    Post subject: Reply with quote

Demo,

FEATURES behaviour is controlled by the package manager.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1542

PostPosted: Thu Mar 21, 2024 7:16 am    Post subject: Reply with quote

Demo wrote:
I ran equery and everything


Equery uses shortcuts I've been told countless times. As an old user who missed 8 years of Gentoo developments, I tended to rely heavily on emerge and equery for all kinds of searches. Equery and I believe gentoolkit as a whole simply won't give you an answer for some questions in a way that you would think the answer is negative.

Euse has never been useful for me and I believe it's always been as useful as it is now.

In fact that's so old that I haven't even encountered commands from gentoolkit in the wiki for the past few years.

In the same time all of the flags you've asked euse for are self explanatory. Who in their right mind would go so far to describe what an mmx flag does? It enables the package to use mmx instructions of course!

Best Regards,
Georgi
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9532
Location: beyond the rim

PostPosted: Thu Mar 21, 2024 8:25 am    Post subject: Reply with quote

Demo wrote:
But then some packages support, or are helped by some features, and not the rest, there's no clue, and it's by trial and error ...

What do you mean with that?
Individual packages don't (or at least shouldn't) know anything about FEATURES flags. That you actually can define some FEATURES flags using package.env is more of an accident than a feature. Or are you not talking about the FEATURES variable at all and just package features (aka USE flags) in general?

As for your initial example, as already mentioned there simply isn't a description defined for cpu_flags_*, same goes for all USE_EXPAND derived flags as they're usually self-explanatory.
Back to top
View user's profile Send private message
Demo
Tux's lil' helper
Tux's lil' helper


Joined: 25 Nov 2022
Posts: 78

PostPosted: Thu Mar 21, 2024 12:21 pm    Post subject: Reply with quote

Thank you all for participation ...

Quote:
FEATURES behaviour is controlled by the package manager.


Quote:
Individual packages don't (or at least shouldn't) know anything about FEATURES flags.


Take an example of the test feature - which is and it's twin use flag are causing me headaches. I like to optimize and customize the builds and tests fail about 50% of the time - it's recognized by, or portage can use it for net-misc/rsync, and x11-base/xwayland, and app-arch/bzip2, for example. With most of other packages, it doesn't have any effect.

Now another example, which is related, the test-fail-continue feature, doesn't seem to work at all except for the packages that recognize, or the portage recognizes as users of the test feature.

Quote:
That you actually can define some FEATURES flags using package.env is more of an accident than a feature.


Yes, this is my point exactly, and there's no documentation to guide or troubleshoot for most of the scenarios ...

Quote:
As for your initial example, as already mentioned there simply isn't a description defined for cpu_flags_*, same goes for all USE_EXPAND derived flags as they're usually self-explanatory.


For the time being for example, I'm stuck unable to upgrade my gnome because gnome-extras/evolution-data-server won't compile regardless of what I do. Neither merging another version of binutils, nor upgrading cmake is solving the issue, and build.log is not pointing towards the cause. BTW this is not purpose of this thread.
For the time being for example, I'm stuck unable to upgrade my gnome because gnome-extras/evolution-data-server won't compile regardless of what I do. Neither merging another version of binutils, nor upgrading cmake is solving the issue, and build.log is not pointing towards the cause. BTW this is not purpose of this thread.

Yes, but then which packages require one or don't, at least the record should be available for the user to choose whether to apply it system wide, or only per package.

For example:
Code:
Found these USE flags for app-arch/snappy-1.1.10-r1:
 U I
 + - abi_x86_32         : 32-bit (x86) libraries
 + + cpu_flags_x86_avx  : Adds support for Advanced Vector Extensions instructions
 + + cpu_flags_x86_avx2 : Adds support for Advanced Vector Extensions 2 instructions
 + + test               : Enable dependencies and/or preparations necessary to run tests
                          (usually controlled by FEATURES=test but can be toggled
                          independently)


If euse doesn't know about it, then most users are in the dark. More over, many times emerge don't list all use flags recognized for a package, other times, it forces use flags despite being disabled, and sometimes masked, and they have to be profile masked in order to be recognized as disabled, which takes you through a totally different whirlpool. Take for example the llvm_targets group of use flags.

I just want to add that the mentioned flags and features are just real life examples, I don't have a complete list of what's not working, even for my own installation.


Quote:
Equery and I believe gentoolkit as a whole simply won't give you an answer for some questions in a way that you would think the answer is negative.

Euse has never been useful for me and I believe it's always been as useful as it is now.

In fact that's so old that I haven't even encountered commands from gentoolkit in the wiki for the past few years.


Thank you for touching that on point, and let me extend from it that the portage system overall seem to have the same issue in one way or another.

Now don't get me wrong, I stress on that I appreciate both the idea and the effort of having a smarter system to compile the whole desktop with it's services from scratch. But still there's much to be done to avoid a lot of the help requests through this forum or others!

Like for another example, why doesn't portage have a mechanism to disable some flags momentarily to avoid cyclic dependency problems then revert them to default in order to go successfully through the build?
Code:
 emerge  --ask --update --verbose --tree --with-bdeps=y --reinstall changed-use --keep-going --complete-graph --verbose-conflicts --backtrack=9999 --ignore-built-slot-operator-deps=y --rebuild-if-new-slot=y dev-build/cmake

 * IMPORTANT: 23 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.


 * IMPORTANT: 4 config files in '/etc/portage' need updating.
 * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
 * sections of the emerge man page to learn how to update config files.

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

Calculating dependencies... done!
Dependency resolution took 10.96 s (backtrack: 1/9999).



[nomerge       ] gnome-base/gnome-extra-apps-41.0:3.0::gentoo  USE="games share shotwell (-tracker)"
[nomerge       ]  gnome-extra/sushi-43.0::gentoo  USE="X wayland"
[nomerge       ]   app-text/evince-44.1:0/evd3.4-evv3.3::gentoo  USE="cups gnome gnome-keyring gstreamer introspection spell tiff -djvu -dvi -gtk-doc (-nautilus) -postscript -xps"
[nomerge       ]    app-text/poppler-24.03.0:0/135::gentoo  USE="boost cairo cxx debug introspection jpeg jpeg2k lcms nss png qt5 test tiff utils -cjk -curl -doc -gpgme -qt6 -verify-sig"
[nomerge       ]     dev-qt/qtxml-5.15.12:5/5.15::gentoo  USE="debug test"
[ebuild  N     ]      dev-qt/qtnetwork-5.15.12-r1:5/5.15::gentoo  USE="debug ssl test -gssapi -libproxy -sctp" 49,984 KiB
[nomerge       ] dev-build/cmake-3.28.3::gentoo [3.27.6-r1::gentoo] USE="gui ncurses test -dap -doc -qt6 -verify-sig (-emacs%)"
[nomerge       ]  dev-qt/qtgui-5.15.12-r2:5/5.15.12::gentoo  USE="X accessibility dbus debug egl jpeg libinput png test udev vulkan wayland -eglfs -evdev -gles2-only -ibus -linuxfb -tslib -tuio -vnc"
[ebuild  N     ]   dev-qt/qtwayland-5.15.12-r1:5/5.15.12::gentoo  USE="debug test vulkan -compositor" 604 KiB
[ebuild  N     ]    dev-qt/qttest-5.15.12:5/5.15::gentoo  USE="debug test" 323 KiB
[ebuild  N     ]     dev-qt/qtxml-5.15.12:5/5.15::gentoo  USE="debug test" 0 KiB
[ebuild  N     ]   dev-qt/qtdbus-5.15.12:5/5.15::gentoo  USE="debug test" 0 KiB
[ebuild     U  ] dev-build/cmake-3.28.3::gentoo [3.27.6-r1::gentoo] USE="gui ncurses test -dap -doc -qt6 -verify-sig (-emacs%)" 10,809 KiB
[nomerge       ] sys-apps/portage-3.0.52::gentoo  USE="gentoo-dev (ipc) native-extensions rsync-verify test xattr -apidoc -build -doc (-selinux)" PYTHON_TARGETS="pypy3 python3_10 python3_11 python3_12"
[nomerge       ]  app-crypt/gnupg-2.4.3::gentoo  USE="bzip2 nls readline smartcard ssl test tofu usb -doc -ldap (-selinux) -tools -tpm -user-socket -verify-sig -wks-server"
[nomerge       ]   app-crypt/pinentry-1.2.1-r3::gentoo  USE="X gtk keyring ncurses qt5 wayland -caps -efl -emacs -verify-sig"
[ebuild  N     ]    dev-qt/qtwidgets-5.15.12-r1:5/5.15::gentoo  USE="X dbus debug gtk png test -gles2-only" 0 KiB
[ebuild  N     ]     dev-qt/qtgui-5.15.12-r2:5/5.15.12::gentoo  USE="X accessibility dbus debug egl jpeg libinput png test udev vulkan wayland -eglfs -evdev -gles2-only -ibus -linuxfb -tslib -tuio -vnc" 0 KiB
[nomerge       ] media-video/pipewire-0.3.81:0/0.4::gentoo  USE="X bluetooth dbus echo-cancel extra ffmpeg gsettings gstreamer lv2 modemmanager pipewire-alsa readline sound-server ssl systemd test v4l zeroconf -doc -flatpak -ieee1394 -jack-client -jack-sdk -liblc3 -roc (-system-service)" ABI_X86="(64) -32 (-x32)"
[nomerge       ]  net-dns/avahi-0.8-r7::gentoo  USE="dbus gdbm gtk introspection ipv6 nls qt5 systemd -autoipd -bookmarks -doc -howl-compat -mdnsresponder-compat -mono -python (-selinux) -test" ABI_X86="(64) -32 (-x32)" PYTHON_SINGLE_TARGET="python3_10 -python3_9 -python3_11"
[ebuild  N     ]   dev-qt/qtcore-5.15.12-r2:5/5.15.12::gentoo  USE="debug icu test -old-kernel" 0 KiB

Total: 9 packages (1 upgrade, 8 new), Size of downloads: 61,718 KiB

 * Error: circular dependencies:

(dev-qt/qttest-5.15.12:5/5.15::gentoo, ebuild scheduled for merge) depends on
 (dev-qt/qtcore-5.15.12-r2:5/5.15.12::gentoo, ebuild scheduled for merge) (buildtime_slot_op)
  (dev-qt/qttest-5.15.12:5/5.15::gentoo, ebuild scheduled for merge) (buildtime)

It might be possible to break this cycle
by applying the following change:
- dev-qt/qtcore-5.15.12-r2 (Change USE: -test)

Note that this change can be reverted, once the package has been installed.

Note that the dependency graph contains a lot of cycles.
Several changes might be required to resolve all cycles.
Temporarily changing some use flag for all packages might be the better option.

!!! The following installed packages are masked:
- sys-kernel/gentoo-kernel-6.5.5::gentoo (masked by: package.mask)
- sys-kernel/git-sources-6.6_rc3::gentoo (masked by: package.mask)
- dev-util/intel-graphics-system-controller-0.8.9::gentoo (masked by: package.mask)
For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.
Back to top
View user's profile Send private message
Demo
Tux's lil' helper
Tux's lil' helper


Joined: 25 Nov 2022
Posts: 78

PostPosted: Thu Mar 21, 2024 12:23 pm    Post subject: Reply with quote

Quote:
For the time being for example, I'm stuck unable to upgrade my gnome because gnome-extras/evolution-data-server won't compile regardless of what I do. Neither merging another version of binutils, nor upgrading cmake is solving the issue, and build.log is not pointing towards the cause. BTW this is not purpose of this thread.
For the time being for example, I'm stuck unable to upgrade my gnome because gnome-extras/evolution-data-server won't compile regardless of what I do. Neither merging another version of binutils, nor upgrading cmake is solving the issue, and build.log is not pointing towards the cause. BTW this is not purpose of this thread.


This is a typo! It was meant to be at the end of the post ...
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1663

PostPosted: Thu Mar 21, 2024 12:40 pm    Post subject: Reply with quote

Demo wrote:
Quote:
FEATURES behaviour is controlled by the package manager.


Quote:
Individual packages don't (or at least shouldn't) know anything about FEATURES flags.


Take an example of the test feature - which is and it's twin use flag are causing me headaches. I like to optimize and customize the builds and tests fail about 50% of the time - it's recognized by, or portage can use it for net-misc/rsync, and x11-base/xwayland, and app-arch/bzip2, for example. With most of other packages, it doesn't have any effect.

Now another example, which is related, the test-fail-continue feature, doesn't seem to work at all except for the packages that recognize, or the portage recognizes as users of the test feature.

So this is really about FEATURE test and USE test.

The test USE exists to bring in extra packages that are otherwise not necessary for a build. It has no affect on actually running tests.

The test FEATURE triggers the package manager to run src_test if the ebuild defines it. It is not meant to be universally on in make.conf. The reason is that tests break all the time as the rest of the system progresses or a plethora of other situations. Portage itself triggers the test USE when the test FEATURE is on but this is a Portage specific quirk. Tests are encouraged to exist but may not if they are flat out missing or broken.
Back to top
View user's profile Send private message
Demo
Tux's lil' helper
Tux's lil' helper


Joined: 25 Nov 2022
Posts: 78

PostPosted: Thu Mar 21, 2024 12:51 pm    Post subject: Reply with quote

Quote:
So this is really about FEATURE test and USE test.


In a sense, yes, cause it's the star or the issues ...

But then focusing only on the test flag/feature hides the bigger picture. I need your opinion on the rest of the examples I posted as well!

Edit:
I do have a confession! I've been using gentoo solely for the past year and a half, I gathered a lot of information about it, from using it, and from previous experience with linux in general.

With that said, I didn't read the gentoo developer book yet. And the issues with gentoo are not helping cause they take time that I don't really have.
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1542

PostPosted: Thu Mar 21, 2024 1:14 pm    Post subject: Reply with quote

[quote="Genone"]
Demo wrote:
That you actually can define some FEATURES flags using package.env is more of an accident than a feature.


That doesn't sound correct. Might be a side effect but definitely not an accident. Features can influence the behavior of portage and portage is what actually runs the ebuilds. That's why it appears as ebuilds are aware of features while in reality they aren't. And it makes perfect sense some features to be available per package because they influence the execution of individual ebuilds as opposed to the behavior of portage in general. However, aside from keepwork I can't think of other feature that's actually useful for individual packages. I would go further and claim per-package features use case is very limited.

Test USE flag on the other hand is a completely different story. It influences how individual phases behave which is responsibility of the ebuild itself, not portage. So I guess historically test USE flag has been introduced to pull in dependencies and prepare the environment for tests. Because after all, dependencies needed for running tests are still dependencies and you naturally want to be able to avoid them.

The two things should not be mixed, they are different concepts and the fact that they have the same name does not mean anything at all.

Regarding the problem with evolution-data-server, open a new thread upload build.log somewhere and post it.

I'll repeat once again, please don't mix things. Featureas are features, use flags are use flags and build errors are something completely different.

Best Regards,
Georgi
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9532
Location: beyond the rim

PostPosted: Thu Mar 21, 2024 5:31 pm    Post subject: Reply with quote

[quote="logrusx"]
Genone wrote:
Demo wrote:
That you actually can define some FEATURES flags using package.env is more of an accident than a feature.


That doesn't sound correct. Might be a side effect but definitely not an accident. Features can influence the behavior of portage and portage is what actually runs the ebuilds.


Of course. My point was that package.env is used to modify the build environment in which ebuild execution takes place, and as some FEATURES are implemented on the bash side of portage that uses this modified environment they can be controlled that way. But as users don't know which flags fall into that group, and as it could theoretically change at any time, using package.env for that purpose is just asking for trouble. Esp. for flags like test that are only partially implemented on the bash side.

Quote:
And it makes perfect sense some features to be available per package because they influence the execution of individual ebuilds as opposed to the behavior of portage in general. However, aside from keepwork I can't think of other feature that's actually useful for individual packages. I would go further and claim per-package features use case is very limited.

Might want to reread that statement, it seems contradictory to me: "Makes perfect sense" vs. "can't think of".
There are quite a few FEATURES flags where per-package toggles could be useful (if implemented properly):
- ccache
- distcc
- downgrade-backup (and on a per-package base, a potential general backup flag)
- fakeroot
- icecream
- installsources
- keeptemp
- keepwork
- no*
- test
Even a few more if negation would work.

Quote:
Test USE flag on the other hand is a completely different story. It influences how individual phases behave which is responsibility of the ebuild itself, not portage. So I guess historically test USE flag has been introduced to pull in dependencies and prepare the environment for tests. Because after all, dependencies needed for running tests are still dependencies and you naturally want to be able to avoid them.

USE=test always was just a hack to use an existing mechanism while waiting for TDEPEND and corresponding ebuild functions to solve the underlying problem. The original discussions about this are over 15 years old.
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1542

PostPosted: Thu Mar 21, 2024 6:17 pm    Post subject: Reply with quote

Sorry about that, at times my thoughts are too complex to fit in my level of English. Combine that with the fact I learned some things in my own language and some in English and the mess is complete.

Yeas, actually I have used a few of those features, I just couldn't think of them at the moment. I don't do that anymore as nowadays I don't need to look for shortcuts to make up for the long compile times.

Best Regards,
Georgi
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum