Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Extreme CFLAGS problems...
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
ciaranm
Retired Dev
Retired Dev


Joined: 19 Jul 2003
Posts: 1719
Location: In Hiding

PostPosted: Wed Dec 22, 2004 7:08 pm    Post subject: Reply with quote

lightvhawk0 wrote:
I just wish there was a switch so I could turn it on or off, also with cflag filtering off I'd like to have a warinig displaying known bad cflags so I could know when it breaks what cflags to remove.

Flags that're safe, to the extent that we'll definitely filter them if we find that they break anything: -O2 -m{arch,cpu,tune}=whatever (arch dependent). On x86 you can add in -fomit-frame-pointer. On sparc you can add in -frename-registers. -pipe is safe too, of course.
Back to top
View user's profile Send private message
mcspiff
Tux's lil' helper
Tux's lil' helper


Joined: 24 Oct 2004
Posts: 109

PostPosted: Wed Dec 22, 2004 10:22 pm    Post subject: Reply with quote

My post was intended to be read with just a hint of sarcasm, which probably wasnt obvious. Its not that i dont understand why some people want to drop cflags filtering and just let whatever happen during the compile happen. Believe me, i feel the ricers are killing gentoo more than SCO or microsoft ever could hope. But sadly just letting them shoot themselves in the foot just isnt good systems design. Id hate to fuel the anti-gentoo fires by intentially breaking portage.

So why not inform the user that they are nuts, and disable compileing with those flags. Have this behivor be controlled by a setting in make.conf (or somewhere more hidden :wink: )
Back to top
View user's profile Send private message
ciaranm
Retired Dev
Retired Dev


Joined: 19 Jul 2003
Posts: 1719
Location: In Hiding

PostPosted: Wed Dec 22, 2004 10:27 pm    Post subject: Reply with quote

mcspiff wrote:
So why not inform the user that they are nuts, and disable compileing with those flags. Have this behivor be controlled by a setting in make.conf (or somewhere more hidden :wink: )

Because then we get massive hissy fits from the ricers, as can be seen earlier in this thread.
Back to top
View user's profile Send private message
mcspiff
Tux's lil' helper
Tux's lil' helper


Joined: 24 Oct 2004
Posts: 109

PostPosted: Wed Dec 22, 2004 10:27 pm    Post subject: Reply with quote

And dropping Cflags filtering wont get said hissy fight?
Back to top
View user's profile Send private message
Lokheed
Veteran
Veteran


Joined: 12 Jul 2004
Posts: 1295
Location: /usr/src/linux

PostPosted: Wed Dec 22, 2004 10:36 pm    Post subject: Reply with quote

mcspiff wrote:
So why not inform the user that they are nuts, and disable compileing with those flags. Have this behivor be controlled by a setting in make.conf (or somewhere more hidden :wink: )


Because I dont want hidden options...this isnt Windows where you have to hide things from users. I am a mature adult who makes logical decisions and does research and there are more of us then there are of "them". So I dont see why we should get punished because some ricer has a 4 page CFLAGS and does nothing but file stupid bug reports and prance around telling newbies how fast his system is which perpetuates the cycle...

You cant inform those that dont want to be informed. These ricers are the way they are because they dont read and they dont research. How are you going to inform them I wonder? Smoke signals? The entire point of this is ricers dont bother reading warning or take any advice into consideration. Look at the orginator of the thread. His replies still suggest he isnt going to trim down his CFLAGS despite being warned by what, 80% of the people in this thread? They dont listen and thats why they are where they are...

You talk about coddling a user, then hiding settings that disable CFLAGS? I doubt anyone is going to complain for dropping CFLAGS that are known to break 99% of the packages out there. I am sure the developers will be happy, the programmers wont mind dealing with less faulty bug reports and Gentoo starts to save face...

If the ricers complain they are met with a barrage of profanities as 95% of people know better...this will eventually stop the vicious cycle...

mcspiff, your points are whishy washy. You dont even seem like you have a solid argument here. You just seem to argue for the sake of arguing at this point.
Back to top
View user's profile Send private message
truekaiser
l33t
l33t


Joined: 05 Mar 2004
Posts: 801

PostPosted: Wed Dec 22, 2004 10:40 pm    Post subject: Reply with quote

mcspiff wrote:
And dropping Cflags filtering wont get said hissy fight?


good point.
Back to top
View user's profile Send private message
mcspiff
Tux's lil' helper
Tux's lil' helper


Joined: 24 Oct 2004
Posts: 109

PostPosted: Wed Dec 22, 2004 10:46 pm    Post subject: Reply with quote

Im going to outline this very clearly lockheed.

Not checking input from the user is bad. This is espically bad if it disruptes the fundemental functions of the program. This leads to security problems, segfaults and other nasties. Most programmers will tell you, either ignore the input if its non-vital, in the case with Cflags or die with a helpful error message.

If the user does not want this default, correct behivor, provide an option to over ride this error checking. If you do not, people with either realease "faster" ebuilds or copies or portage with the error checking disabled. This does help anyone.

If a user is not willing to listen to these forums, nothing can stop him from using his two pages of Cflags. At best, we can help those who were merely told to use these Cflags.
Back to top
View user's profile Send private message
Lokheed
Veteran
Veteran


Joined: 12 Jul 2004
Posts: 1295
Location: /usr/src/linux

PostPosted: Wed Dec 22, 2004 10:56 pm    Post subject: Reply with quote

mcspiff wrote:
Im going to outline this very clearly lockheed.

Not checking input from the user is bad. This is espically bad if it disruptes the fundemental functions of the program. This leads to security problems, segfaults and other nasties. Most programmers will tell you, either ignore the input if its non-vital, in the case with Cflags or die with a helpful error message.

If the user does not want this default, correct behivor, provide an option to over ride this error checking. If you do not, people with either realease "faster" ebuilds or copies or portage with the error checking disabled. This does help anyone.

If a user is not willing to listen to these forums, nothing can stop him from using his two pages of Cflags. At best, we can help those who were merely told to use these Cflags.


You should have outlined your argument. I dont need a lecture on filtering CFLAGS and the reason its necessary to keep programs running smoothly. But we arent talking about filtering out O3 for O2, etc. We are talking about filtering CFLAGS that should not be used under any circumstances. We are talking about trimming back CFLAGS to very safe and respectable levels...right?

I dont understand the second part of your second paragraph. Besides whats really the point in having 3 pages of CFLAGS when 80% of them are filtered anyway. It just creates more work for everybody. Work that could be spent on improving Gentoo, and not coddling ricers...

There isnt much point to what you suggest other then moving Gentoo along at the slowest pace. Gearing to the lowest common denominator doesnt work for me.

"Make a tool idiot proof and only an idiot will use it" Murphy's Law
Back to top
View user's profile Send private message
mcspiff
Tux's lil' helper
Tux's lil' helper


Joined: 24 Oct 2004
Posts: 109

PostPosted: Thu Dec 23, 2004 3:32 am    Post subject: Reply with quote

I had a long winded reply, but my browser crashed
For your first paragraph, yes have portage trim back to a list of safe Cflags

For your second, how does this make more work for anybody? its obvious there is a very small list of safe flags. Have portage filter everything else out. No mess no fuss. Saves developers time, as Cflags will no longer be the prime cause of bug reports. If someone wants to waste their time generating a three page Cflags list, with only 4 or 5 sane ones actually being used by portage and then rest silently being ignored, no one is harmed, and the ricer class will soon die out as people realize that all their magical flags are simply ignored.
Back to top
View user's profile Send private message
wdreinhart
Guru
Guru


Joined: 11 Jun 2003
Posts: 569
Location: 4QFJ12345678

PostPosted: Thu Dec 23, 2004 7:08 am    Post subject: Reply with quote

mcspiff wrote:
If someone wants to waste their time generating a three page Cflags list, with only 4 or 5 sane ones actually being used by portage and then rest silently being ignored, no one is harmed, and the ricer class will soon die out as people realize that all their magical flags are simply ignored.


That's not The Gentoo Way (tm).

Gentoo doesn't force a sane partition layout on you, or force you to use a developer approved filesystem or prevent you from using a love-sources kernel. Gentoo assumes that if you know what you're doing, and hands you enough rope to hang yourself with. Why should it force sane, developer-approved cflags? Users should learn for themselves why fewer cflags are usually better, and re-installing from stage1 after their whole system got hosed by building everything with "-O4 -funroll-loops -ffast-math -fomit-opcodes -mbreakstuff -fbreak-more -freplace-branch-predictions-with-random-gibberish" can be very instructive. :twisted:
Back to top
View user's profile Send private message
Lokheed
Veteran
Veteran


Joined: 12 Jul 2004
Posts: 1295
Location: /usr/src/linux

PostPosted: Thu Dec 23, 2004 7:22 am    Post subject: Reply with quote

Exactly what wdreinhart said. mcspiff, what's the point of giving this false sense of control to a user when 95% of USE Flags do nothing because they are filtered out, why then should we keep them in circulation? Whats the difference from elliminating the CFLAGS or filtering them out so they cannot be used?

The more you write the more you lose me. But that is not a solution to simply hide some setting somewhere to filter all of them out...besides its not as simple as that as its been stated. Some can use O3 and others cant, some can use -fomit-frame-pointer and some cant...its not as simple to filter out CFLAGS as you think as some do benefit some packages...but whatever, I said me piece, dont need to say anymore...

Conclusion=Ricers just plain suck.
Back to top
View user's profile Send private message
lightvhawk0
Guru
Guru


Joined: 07 Nov 2003
Posts: 388

PostPosted: Thu Dec 23, 2004 7:46 am    Post subject: Reply with quote

i've always just manually edited all the ebuilds making sure my cflags will work and I always read the bug reports making sure that I don't repeat a mistake. IE -fstack-protector-all kills python so I don't use it with python.

So I'd like to try and think of ways to make it so you can use your cflags and have the documented "bad" flags for that ebuild together, not filtered just in a place where you can check it and go "oops I'm a dumbass it's documented here that this flag breaks this package, duh"

Also this would help let us know when a cflag becomes usable again.

I'm gonna stick to this idea because I think it would be helpful to help the ricers , sane people and developers.

or even the idea of a package.cflags where you can use specific cflags for an application, like encoding makes heavy use of the fpu, you you could store some useful fpu sensitive cflags there.

and if this is just a cry in the dark at least sombody saw it :wink:
_________________
If God has made us in his image, we have returned him the favor. - Voltaire
Back to top
View user's profile Send private message
macawgumbo
Apprentice
Apprentice


Joined: 28 May 2004
Posts: 165

PostPosted: Thu Dec 23, 2004 8:54 pm    Post subject: Reply with quote

I have a computer acting as a server with command line only. It is running with an AMD K6-2 500MHz proc and needs to be as fast as possible with the cflags and etc.
Code:
CFLAGS="-mtune=k6-2 -pipe -fomitframepointer -02"

Any suggestions?

PS: Running SELinux
Back to top
View user's profile Send private message
spb
Retired Dev
Retired Dev


Joined: 02 Jan 2004
Posts: 2135
Location: Cambridge, UK

PostPosted: Thu Dec 23, 2004 10:40 pm    Post subject: Reply with quote

macawgumbo wrote:
Any suggestions?
Yes. Leave your CFLAGS as they are.

Quote:
PS: Running SELinux
Good man. :)
Back to top
View user's profile Send private message
virtual
Tux's lil' helper
Tux's lil' helper


Joined: 12 Aug 2004
Posts: 132
Location: Bergen

PostPosted: Sun Dec 26, 2004 12:07 pm    Post subject: Reply with quote

:D Hi,

These are my CFLAG settings and I have no problems, but I use KDE only except for gdm.

LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags"
CFLAGS="-O2 -march=pentium4 -pipe -ffast-math -fforce-addr -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"

My use flags:
USE="-gtk -gnome -f77 -fortran -oss qt kde dvd alsa cdr cups foomaticdb ppds usb nptl mmx sse sse2 pic doc"



I use gcc 3.4.3 and prelink. I think and hope these are optimal because I do not know what else can be done to increase performance. All hints are welcome. Why do many people write down every flag they use when most of the time they are implied by the -O2 or -O3 except for the -fomit-frame-pointer on the x86 arch.
_________________
The roots of education are bitter but it's fruit is sweet.
Back to top
View user's profile Send private message
rhill
Retired Dev
Retired Dev


Joined: 22 Oct 2004
Posts: 1629
Location: sk.ca

PostPosted: Tue Dec 28, 2004 2:08 pm    Post subject: Reply with quote

truekaiser wrote:
the only strange stuff i have in my make.conf is '-mmmx -msse' mainly cause i read that sometimes -mcpu=pentium4 doesn't pass those on. and i don't have -msse2 on cause it breaks some packages.


that's a myth. it's been proven many times on the gcc mailing lists. if i weren't so tired, i'd find you a reference(s).
Back to top
View user's profile Send private message
tnt
Veteran
Veteran


Joined: 27 Feb 2004
Posts: 1222

PostPosted: Thu Dec 30, 2004 4:27 pm    Post subject: Reply with quote

I've compiled my system with a lot of CFLAGS and had a lot of segfaults and hard lock-ups. Now that I've read this thread I want to switch to simple:
Code:
CFLAGS="-O2 -march=athlon64 -pipe"

How to do that?
Is it enough to set new CFLAGS in /etc/make.conf and run
Code:
emerge -e world

or run
Code:
emerge -eD world

or I sould do bootstraping and all other things I've done in the instalation process?
Back to top
View user's profile Send private message
gentoo_lan
l33t
l33t


Joined: 08 Sep 2004
Posts: 891
Location: Charles Town, WV

PostPosted: Thu Dec 30, 2004 4:52 pm    Post subject: Reply with quote

I would do an:

Code:
emerge -e system && emerge -e system && emerge -e world && emerge -e world
Back to top
View user's profile Send private message
tnt
Veteran
Veteran


Joined: 27 Feb 2004
Posts: 1222

PostPosted: Thu Dec 30, 2004 5:13 pm    Post subject: Reply with quote

OK, but can you just tell me why to run
Code:
emerge -e system

before
Code:
emerge -e world

if "system" is included in "world"

And even more confusing is why to run both of them twice?

:?
Back to top
View user's profile Send private message
TrueDFX
Retired Dev
Retired Dev


Joined: 02 Jun 2004
Posts: 1348

PostPosted: Thu Dec 30, 2004 5:56 pm    Post subject: Reply with quote

tnt wrote:
OK, but can you just tell me why to run
Code:
emerge -e system

before
Code:
emerge -e world

if "system" is included in "world"

And even more confusing is why to run both of them twice?

:?

robmoss wrote:
The first command ensures my toolchain is in order; the second ensures it's been compiled with a clean and current toolchain; the third recompiles all my packages with a clean and current toolchain; the fourth ensures that all my packages are compiled against packages compiled with a clean and current toolchain.
HTH
Back to top
View user's profile Send private message
tnt
Veteran
Veteran


Joined: 27 Feb 2004
Posts: 1222

PostPosted: Thu Dec 30, 2004 8:21 pm    Post subject: Reply with quote

Well, I doubt that...
Let's see: package-X depends on package-Y and will compile against it.
With command "emerge -e world" all packages in the system would be compiled in order that satisfies all dependencies.
So, package-Y would compile BEFORE package-X and package-X would be compiled against clean, new package-Y.
Same situation with "emerge -e system". There would be no packages wich compiles against some other package that is not already clean (recompiled with new flags).
All about dependencies and order of compilation...
Back to top
View user's profile Send private message
racoontje
Veteran
Veteran


Joined: 19 Jul 2004
Posts: 1290

PostPosted: Thu Dec 30, 2004 8:26 pm    Post subject: Reply with quote

Dude.

O. T. T.

Don't give the "Gentoo is Rice" people a reason :D
Back to top
View user's profile Send private message
irf2003
Veteran
Veteran


Joined: 10 Sep 2003
Posts: 1078

PostPosted: Thu Dec 30, 2004 8:52 pm    Post subject: Reply with quote

what robmoss recommended is extreme, this dev plays with fire, so he has to be cautious.
in most cases:
Code:

emerge -e system
etc-update && env-update && source /etc/profile
emerge -e world
etc-update && env-update && source /etc/profile

the above should do.
hth
happy new year
PS this step is very important
Code:

etc-update && env-update && source /etc/profile
Back to top
View user's profile Send private message
TrueDFX
Retired Dev
Retired Dev


Joined: 02 Jun 2004
Posts: 1348

PostPosted: Thu Dec 30, 2004 9:02 pm    Post subject: Reply with quote

tnt wrote:
Well, I doubt that...
Let's see: package-X depends on package-Y and will compile against it.
With command "emerge -e world" all packages in the system would be compiled in order that satisfies all dependencies.
So, package-Y would compile BEFORE package-X and package-X would be compiled against clean, new package-Y.
Same situation with "emerge -e system". There would be no packages wich compiles against some other package that is not already clean (recompiled with new flags).
All about dependencies and order of compilation...
In most situations, you're probably right. However, not so with indirect dependencies on the package itself. For example, libsdl can depend on directfb, and directfb can depend on libsdl. Which should be compiled first?
Back to top
View user's profile Send private message
Lokheed
Veteran
Veteran


Joined: 12 Jul 2004
Posts: 1295
Location: /usr/src/linux

PostPosted: Fri Dec 31, 2004 9:23 pm    Post subject: Reply with quote

racoontje wrote:
Dude.

O. T. T.

Don't give the "Gentoo is Rice" people a reason :D


LOL, thats funny. I dont think you know why they call them "ricers" ;)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
Page 3 of 10

 
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