Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Question on USE Flags and a call for a better guide!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
MHenry676
Tux's lil' helper
Tux's lil' helper


Joined: 02 Aug 2004
Posts: 125

PostPosted: Fri Jan 07, 2005 2:55 am    Post subject: Question on USE Flags and a call for a better guide! Reply with quote

Gentoo's way of installing linux is wonderfull. I love the idea behind how it installs, takes a bit of time, but love it. I've tried to get into linux several times with Red Hat and Mandrake, but nothing has kept my interest more than Gentoo. How you can actually build it for YOUR system and not the general PC and how more involved the install is makes you learn more as you go. I've taken courses on Linux in college, and the non M$ approach is very appealing, but never kept my interest in Linux. But after learning about Gentoo and working on a LEAF firewall for work, my interest couldn't be higher.

The question of USE flags seems to come up constantly. The installaion manual (which is great by the way, Thank You) just glances over this subject and points you to a simple list of what the USE flags mean. The only more involved guide is on the Wiki site, but is no more than links to the sites for those USE flags.

I think there needs to be a more in depth manual on this subject. I understand that using flags like "-gnome" and "kde" make my system a KDE only system (which is what I want) and I figured that using flags like mmx, 3dnow and sse tailor compilation more to your cpu and flags such as nvidia and 3dfx tailor to your video, but most of the other flags kinda confuse me.

For example, flags like dvdr and cdr. Does that mean when I install a burning program, that if I have not included these flags that I can't burn discs? If I don't include aim, does that mean that gaim and AOL's linux AIM won't work? If mozilla isn't in my USE variable, is firefox unable to run?

I think a more expanded chart should be made, one that gives a little more detail than just saying for example "ctype - Enables ctype functions." A small list of the more widely used programs that need this flag. And maybe something of a class of use for each flag, like developer, database server, gaming, etc.

If anything else, maybe just something that kinda answers my main question above...

Quote:
... flags like dvdr and cdr. Does that mean when I install a burning program, that if I have not included these flags that I can't burn discs? If I don't include aim, does that mean that gaim and AOL's linux AIM won't work when I install them? If mozilla isn't in my USE variable, is firefox unable to run?


I know someday I'll figure it all out and when I do, I hope to be answering the noobs questions on USE flags and other things Gentoo, but for now I'm the noob seeking the answers.
Back to top
View user's profile Send private message
robet
l33t
l33t


Joined: 06 Sep 2004
Posts: 807
Location: Earth/NorthAmerica/USA/NY

PostPosted: Fri Jan 07, 2005 4:44 am    Post subject: Reply with quote

For the most part, you want to have one set of USE flags you always want, in your case maybe just a few: USE="alsa [for sound] cdr [cdburning] dvd [dvd reading] -gnome kde". That is all that you really need. When you are going to emerge a package, type "emerge -pv [packagename]" to see what USEs it will be compiled with. If you see something you don't want or see something that it is being compiled with that you don't want, edit /etc/portage/package.use and add a line such as "net-im/gaim -crypt" [takes away cryptography support from GAIM]. Don't worry about mmx, 3dnow, sse etc USE flags. They don't matter very much at all, I never even knew they existed.
_________________
no software patents in europe! | adopt an unanswered post.
Back to top
View user's profile Send private message
robet
l33t
l33t


Joined: 06 Sep 2004
Posts: 807
Location: Earth/NorthAmerica/USA/NY

PostPosted: Fri Jan 07, 2005 4:46 am    Post subject: Reply with quote

Following up: if you don't put something in your USE flags, say "aim", things will almost certainly work anyway. If you emerge GAIM without "aim" in your USE flags, AOL IM will work fine. Explicitly ADDING a USE flag compiles in support where it is optional. I hardly pay attention to USE flags really... maybe I should, but probably not.
Hope that helps.
_________________
no software patents in europe! | adopt an unanswered post.
Back to top
View user's profile Send private message
c0balt
Guru
Guru


Joined: 04 Jul 2004
Posts: 441
Location: Germany

PostPosted: Fri Jan 07, 2005 4:50 am    Post subject: Reply with quote

Hi

youre right, I noticed this too when I first installed gentoo, the excellent Handbook jumps right over this subject. Back then I just used the standart USE Flags, and then adjusted them constantly over time to my needs.
And to a certain amount I think its better to let people figure it out themselves, instead of providing them with a complete guide tu USE-flags.

to answer your questions:
dvdr - Without this flag you wont be able to burn DVD's in burning programs like xcdroast or k3b
cdr - same for CD's, cdr is set by default so you would have to set "-cdr" in /etc/make.conf to disable it
aim - Im not quite sure about this one, gaim has no "aim" flag, so its not affected anyways
mozilla - This one does _not_ have to be set for firefox/thunderbird/mozilla to work, It adds mozilla support for other programms (in which way im not quite sure). I dont have it enabled, and everything is working finge ;)
Back to top
View user's profile Send private message
c0balt
Guru
Guru


Joined: 04 Jul 2004
Posts: 441
Location: Germany

PostPosted: Fri Jan 07, 2005 4:52 am    Post subject: Reply with quote

robet wrote:
Following up: if you don't put something in your USE flags, say "aim", things will almost certainly work anyway. If you emerge GAIM without "aim" in your USE flags, AOL IM will work fine. Explicitly ADDING a USE flag compiles in support where it is optional. I hardly pay attention to USE flags really... maybe I should, but probably not.
Hope that helps.


have a look, gaim doesnt even have "aim" in its USE flags ;)

if you want to now which packages are affected by a use flag u can use:
USE="XYZ" emerge -pv --newuse world (or -XYZ)
Back to top
View user's profile Send private message
ttuttle
Tux's lil' helper
Tux's lil' helper


Joined: 03 Oct 2004
Posts: 131

PostPosted: Fri Jan 07, 2005 12:55 pm    Post subject: What "aim" is for. Reply with quote

I'm pretty sure "aim" enables the AIM Transport in the Jabber server. This brings me to what *I* hate about use flags. A lot of them are nicely global, like "gnome -kde"... they affect lots of things, and have easy-to-understand descriptions. But things like "aim", labeled as "Enables AIM protocol support" or something similarly vague, are meaningless outside the context of the package they are used in, and can be, as this one is, misleading. Another horrible one is "cgi", which adds CGI support to one random web server. Perhaps these local use flags should not be listed in the global list of USE flags. I would be glad to help make a more user-friendly list of USE flags, what they do, and what major packages they apply to.
Back to top
View user's profile Send private message
Bob P
Advocate
Advocate


Joined: 20 Oct 2004
Posts: 3355
Location: Jackass! Development Labs

PostPosted: Fri Jan 07, 2005 5:49 pm    Post subject: Re: Question on USE Flags and a call for a better guide! Reply with quote

MHenry676 wrote:
I think there needs to be a more in depth manual on this subject. I understand that using flags like "-gnome" and "kde" make my system a KDE only system (which is what I want) and I figured that using flags like mmx, 3dnow and sse tailor compilation more to your cpu and flags such as nvidia and 3dfx tailor to your video, but most of the other flags kinda confuse me.

welcome go Gentoo! although there are lots of things about Gentoo that are well-documented, there are still plenty of gaps that need to be filled. these gaps only become filled when people like you realize that there is a shortcoming in the documentation, and learn what they have to learn to solve the problem on their system. the truly great contributors in the Gentoo community are the people who take the extra step to document what they've learned and share it with everyone else.

my personal recommendation is that if you find a shortcoming in Gentoo documentation, learn how to fix your problem and document it for everyone else. its a great way to learn more about linux and the best way to increment your postcount.
_________________
.
Stage 1/3 | Jackass! | Rockhopper! | Thanks | Google Sucks
Back to top
View user's profile Send private message
Huey1
n00b
n00b


Joined: 23 Dec 2004
Posts: 44

PostPosted: Fri Jan 07, 2005 10:40 pm    Post subject: Reply with quote

Hi Gentoo Folks

Getting confused about the USE flag.
I have a working Stage1. Yay! Whew! but USE-flags is still a problem for me.

Firstly - about the default set of permanant USE-flags
(/handbook-x86.xml.htm#book_part1_chap8 2.b. Using USE-flags)
Supposedly, it resides in.. /etc/make.profile/make.defaults - with the warning..

Quote:
Do not alter the /etc/make.profile/make.defaults file to tailor the USE variable to your needs: changes in this file will be undone when you update Portage!

Well my file contains absolutely nothing..zilch..0 bytes! Erm.. What??
How come system didn't quit and die when I tried "emerge --sync"?

So, further down, we look to "Inheriting USE-flags"

Quote:
Inheriting USE-flags

Some packages don't only listen to USE-flags, but also provide USE-flags. When you install such a package, the USE-flag they provide is added to your USE setting. To view the list of packages that provide a USE-flag, check /etc/make.profile/use.defaults


OK.. but my /etc /make.profile does not have any "use.defaults" there. It does have a "make.defaults" with zero bytes in it. Hmm..

So where might be the file where the real list of USE flags is, that gets invoked when we try "emerge"? A bit worrying that some packages can put in their own USE-flag dependancies, and some might not, and the list of good guys is not there!

There is a list of "global" flags (/usr/portage/profiles/use.desc)
There is a list of "local" flags (/usr/portage/profiles/use.local.desc)

Thats nice! Is this a shopping list of USE flags one might fancy? Does one put some into The important" file before the "emerge .." That I am floundering around on this is not because I failed to attempt to read up on it. I read until my eyes droop. The Gentoo documentation is way better than nearly all other Linux related stuff, but I still find it hard going.

I would love to type
Code:
# emerge qmail
but I am aware of the preceeding paragraph.

Quote:
Before emerging anything, you will need the following USE variables enabled. If you've already emerged any of these packages, you may have to re-emerge them. USE="maildir ssl imap mysql". Additionally, if you want to use horde/imp foryour webmail then you will need USE="nls" before emerging mod_php.


Wow! Now I am aware that we "re-emerge" stuff. The USE variable again!
Where, and how exactly do we invoke these little extras? I must use nano to edit a (that) file, and let them join the crew? I can't think it very useful to simply type them into the command line once, and know that they are then included along with all else in the file (somewhere), until we power down?
I thought that typing "emerge qmail would invoke a process where the dependancies were calculated. qmail, (or any other package) must have a list of USE stuff that it needs. So what have I missed? To the Guru types, I just know I must be sounding like an ignorant klutz, but I will settle for a pointer to a clear and lucid explanation of the actual practical acts one goes through in setting, using and losing USE variables.

As for "that" file. It was once /etc/make.profile/make.defaults, and what we put in/etc/make.conf would be added to it when we built the system. So where is it now?

Huey1
Back to top
View user's profile Send private message
Kagerato
Tux's lil' helper
Tux's lil' helper


Joined: 01 Dec 2004
Posts: 81

PostPosted: Wed Jan 19, 2005 11:06 pm    Post subject: Reply with quote

Quote:
Well my file contains absolutely nothing..zilch..0 bytes! Erm.. What??


Three possibilites I can think of:

1.) You mistyped the path or filename, leading nano (or whatever text editor) to create a blank file at that location.
2.) Your make.profile symlink doesn't point to the correct profile.
3.) The portage installation is somehow incomplete or corrupt. "emerge --sync" should repair it.

Quote:
How come system didn't quit and die when I tried "emerge --sync"?


I've never seen emerge sync fail, regardless of the environment situation.

Quote:
OK.. but my /etc /make.profile does not have any "use.defaults" there. It does have a "make.defaults" with zero bytes in it. Hmm..


I have no use.defaults there either. I don't believe one is supposed to be there.

use.defaults are located in /port/tree/profiles/x/ for me, where x is a variety of different profiles such as default-x86-2004.0, default-x86-2004.2, and so on. The default equivalent of my /port/tree is /usr/portage .

You really shouldn't be concerned about use.defaults, though. There's no good reason to change that file.

Quote:
So where might be the file where the real list of USE flags is, that gets invoked when we try "emerge"? A bit worrying that some packages can put in their own USE-flag dependancies, and some might not, and the list of good guys is not there!


make.conf sets all important portage variables. You set global use flags for the system by writing

Code:
USE=" (flags here) "


into it.

Try "nano -w /etc/make.conf.example" to get some good information about the numerous portage-relevant variables.

Packages don't arbitrarily set or unset USE flags. There's a well defined process that determines USE settings at build time.

Primarily, the default USE flags are merged with user settings (in /etc/make.conf and /etc/portage/package.use). If any flag in the user-defined configuration contradicts the default, it will override the default.

use.defaults simply sets some USE flags if you already have certain packages installed. This too is easily overridden by /etc/make.conf and /etc/portage/package.use .

/etc/make.profile for my system points to /port/tree/profiles/default-linux/x86/2004.3 [/usr/portage/profiles/default-linux/x86/2004.3 for the default].

Inside that folder lies make.defaults, which defines the original USE setting before modification by actual user configuration overrides.

Quote:
I thought that typing "emerge qmail would invoke a process where the dependancies were calculated. qmail, (or any other package) must have a list of USE stuff that it needs.


Try "emerge -vp qmail". -v is the same as --verbose, and will provide a use flag list for all packages to merge. -p is equivalent to --pretend, and will not actually merge the specified packages.

Quote:
So what have I missed? To the Guru types, I just know I must be sounding like an ignorant klutz


Your post wasn't really completely clear to me.

I'm guessing the reason you didn't get any replies until now is that basically everything you asked about is actually in the manual.

Quote:
As for "that" file. It was once /etc/make.profile/make.defaults, and what we put in/etc/make.conf would be added to it when we built the system. So where is it now?


Where did you get the idea that either moved?
Back to top
View user's profile Send private message
Ard Righ
Guru
Guru


Joined: 24 Jun 2002
Posts: 337
Location: Wellington, NZ

PostPosted: Thu Jan 20, 2005 3:04 am    Post subject: Reply with quote

Kagerato wrote:
Packages don't arbitrarily set or unset USE flags. There's a well defined process that determines USE settings at build time.


That's not 100% correct. When I installed the xorg-x11 package, it added about 4 USE flags to the default USE flags on my machine. They all related to the use of fonts (bitmap-fonts, truetype, truetype-fonts etc).

These flags were not part of my USE setting before installing xorg-x11, but they appeared afterwards. You can check by running a --newuse after installing xorg, and see what new flags appear.

Note: I'm not sure if it's the xorg-x11 package directly, or one of the dependancies that creates these new USE defaults, but they are definitely added without any user interaction (ie I saw no message about them, nor any prompt to accept/refuse them).

And I agree that the use.desc file is basically useless. I only check the USE flags I explicitly know will be used in the packages I install.

One way of getting a list of USE flags for all packages you have installed currently I believe:
Code:
# emerge -uDpv system > system.txt
# emerge -uDpv world > world.txt

Then read through each file to see if there are any USE flags you want to find more information on. That is how I tweak my USE flags when installing packages.
_________________
Answer a simple question with a simple answer!
Back to top
View user's profile Send private message
Kagerato
Tux's lil' helper
Tux's lil' helper


Joined: 01 Dec 2004
Posts: 81

PostPosted: Sun Jan 23, 2005 12:24 am    Post subject: Reply with quote

Ard Righ wrote:
That's not 100% correct. When I installed the xorg-x11 package, it added about 4 USE flags to the default USE flags on my machine. They all related to the use of fonts (bitmap-fonts, truetype, truetype-fonts etc).

These flags were not part of my USE setting before installing xorg-x11, but they appeared afterwards. You can check by running a --newuse after installing xorg, and see what new flags appear.

Note: I'm not sure if it's the xorg-x11 package directly, or one of the dependancies that creates these new USE defaults, but they are definitely added without any user interaction (ie I saw no message about them, nor any prompt to accept/refuse them).


xorg-x11 provides the "X" USE flag, because of use.defaults (which I've mentioned earlier).

It does not, to my knowledge, provide any USE flags regarding fonts. If it did, I would think they would only be activated if you explicitly built the font server [+font-server]. Since that functionality is not useful to me, I do not build it.
Back to top
View user's profile Send private message
comprookie2000
Retired Dev
Retired Dev


Joined: 25 Jul 2004
Posts: 925
Location: Sun City Center, Florida

PostPosted: Sun Jan 23, 2005 3:07 am    Post subject: Reply with quote

I use ufed,seems to work fine,give's a basic explaination on each flag.
_________________
http://dev.gentoo.org/~dabbott/
Back to top
View user's profile Send private message
Sven Vermeulen
Retired Dev
Retired Dev


Joined: 29 Aug 2002
Posts: 1345
Location: Mechelen, Belgium

PostPosted: Sun Jan 23, 2005 8:59 am    Post subject: Reply with quote

Huey1 wrote:

Firstly - about the default set of permanant USE-flags
(/handbook-x86.xml.htm#book_part1_chap8 2.b. Using USE-flags)
Supposedly, it resides in.. /etc/make.profile/make.defaults - with the warning..

Quote:
Do not alter the /etc/make.profile/make.defaults file to tailor the USE variable to your needs: changes in this file will be undone when you update Portage!

Well my file contains absolutely nothing..zilch..0 bytes! Erm.. What??


Err, part 1, chapter 8 of the installation instructions don't talk about USE flags, part 2 chapter 2 does. Anyway, it's okay that this file is empty. That means that the profile you're using inherits all its USE information from the parent profiles, such as default-linux/x86, default-linux and base.

I've updated the documentation to make this more clear.

Huey1 wrote:

Quote:
Inheriting USE-flags

Some packages don't only listen to USE-flags, but also provide USE-flags. When you install such a package, the USE-flag they provide is added to your USE setting. To view the list of packages that provide a USE-flag, check /etc/make.profile/use.defaults


OK.. but my /etc /make.profile does not have any "use.defaults" there. It does have a "make.defaults" with zero bytes in it. Hmm..


Same here, it's the accumulation of use.defaults.

Huey1 wrote:

So where might be the file where the real list of USE flags is, that gets invoked when we try "emerge"? A bit worrying that some packages can put in their own USE-flag dependancies, and some might not, and the list of good guys is not there!

There is a list of "global" flags (/usr/portage/profiles/use.desc)
There is a list of "local" flags (/usr/portage/profiles/use.local.desc)

Thats nice! Is this a shopping list of USE flags one might fancy? Does one put some into The important" file before the "emerge .." That I am floundering around on this is not because I failed to attempt to read up on it. I read until my eyes droop. The Gentoo documentation is way better than nearly all other Linux related stuff, but I still find it hard going.


It's difficult to document USE flags since their function is declared by the ebuilds themselves (and therefore by the package maintainers). Some USE flags give a clear description of their use, such as "threads", which enables threading in the applications that support (de)activating of threading support. "cdr" is a bit more questionable, because you might ask if, for DVD-R, you need "cdr" support? You probably do, but you'll need to verify this with the ebuild itself.

There is no way we can document and maintain a full list of USE flags with a complete description, a list of where the USE flags are used, etc unless we are happy with an incomplete document.

We had incomplete documents once. We got filled with requests for "add this", "change that", ... and it got unmaintainable. We dropped the guides.

Huey1 wrote:

I thought that typing "emerge qmail would invoke a process where the dependancies were calculated. qmail, (or any other package) must have a list of USE stuff that it needs.


A package doesn't need a USE flag, it uses it (the IUSE variable declared within the ebuild), and it uses it optionally, which is the entire point of USE flags. You can enable support for certain features in an ebuild if you enable the correct USE flags. And which USE flags you need is documented in the guide that reflects the use of those features. We can't document that in a "Summum of USE flags Guide" since it depends highly on what you want to achieve.

If you're not sure what to use, the default USE flag setting is more than fine enough - enables you to do most things.
Back to top
View user's profile Send private message
Sven Vermeulen
Retired Dev
Retired Dev


Joined: 29 Aug 2002
Posts: 1345
Location: Mechelen, Belgium

PostPosted: Sun Jan 23, 2005 9:02 am    Post subject: Reply with quote

Ard Righ wrote:
[
That's not 100% correct. When I installed the xorg-x11 package, it added about 4 USE flags to the default USE flags on my machine. They all related to the use of fonts (bitmap-fonts, truetype, truetype-fonts etc).

These flags were not part of my USE setting before installing xorg-x11, but they appeared afterwards. You can check by running a --newuse after installing xorg, and see what new flags appear.


Check the various use.defaults files in your profile and parent profiles (most interesting is /usr/portage/profiles/base/use.defaults). Suppose that CUPS isn't in your USE flag and you didn't explicitly disable it in /etc/make.conf, then installing CUPS will add the cups USE flag to your USE variable:

Code:

cups        net-print/cups
Back to top
View user's profile Send private message
lazyleopard
n00b
n00b


Joined: 06 Nov 2003
Posts: 58

PostPosted: Sun Jan 23, 2005 11:09 am    Post subject: Reply with quote

One of the tricky things I'm finding with USE flags is that sometimes I want a flag set for one package but not set for another. For example, I was trying to get the apache manual to install. I discovered I needed "doc" set, but the subsequent emerge tripped the addition of maybe a dozen other packages, and a re-build of half a dozen more...
Back to top
View user's profile Send private message
kimchi_sg
Advocate
Advocate


Joined: 26 Nov 2004
Posts: 2969

PostPosted: Sun Jan 23, 2005 11:12 am    Post subject: Reply with quote

lazyleopard wrote:
One of the tricky things I'm finding with USE flags is that sometimes I want a flag set for one package but not set for another.

This calls for the usage of package.use. Each line will contain one package and the USE flag(s) to be used for that package only. Using apache as an example, if I wanted the doc USE flag to be set for only apache I would do:
Code:
echo "apache doc" >> /etc/portage/package.use
emerge apache
Back to top
View user's profile Send private message
Sven Vermeulen
Retired Dev
Retired Dev


Joined: 29 Aug 2002
Posts: 1345
Location: Mechelen, Belgium

PostPosted: Sun Jan 23, 2005 11:59 am    Post subject: Reply with quote

lazyleopard wrote:
One of the tricky things I'm finding with USE flags is that sometimes I want a flag set for one package but not set for another. For example, I was trying to get the apache manual to install. I discovered I needed "doc" set, but the subsequent emerge tripped the addition of maybe a dozen other packages, and a re-build of half a dozen more...



See Declaring USE flags for individual packages, part of the USE flags chapter.
Back to top
View user's profile Send private message
lazyleopard
n00b
n00b


Joined: 06 Nov 2003
Posts: 58

PostPosted: Mon Jan 24, 2005 11:24 pm    Post subject: Reply with quote

Thanks. Somehow I'd found the stuff about use.defaults but completely missed package.use. :oops:
Back to top
View user's profile Send private message
Foobat
n00b
n00b


Joined: 02 Nov 2004
Posts: 25

PostPosted: Tue Jan 25, 2005 11:04 am    Post subject: Reply with quote

don't think this has been mentioned yet but.....So much confusion for so little reason

if you emerge one thing today make it gentoolkit!

http://www.gentoo.org/doc/en/gentoolkit.xml

Code:
equery uses packagename


on the down side, the package needs to be installed :p
_________________
women love to see a man recompile his kernel.....
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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