Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
CFLAGS for gnome?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Bob P
Advocate
Advocate


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

PostPosted: Thu Jan 13, 2005 12:08 am    Post subject: CFLAGS for gnome? Reply with quote

i'm running an "~x86" intel platform. after depcleaning and revdep-rebuild, i've had to essentially rebuild all of by gnome files because of depclean errors. i've run into some real problems with gnome components not liking my CFLAGS.

originally, i had started out with the following CFLAGS that worked well for every app on my box:
Code:
CFLAGS="-O3 -march=pentium3 -mtune=pentium3 -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -ftracer -pipe"
CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden -fvisibility=hidden"


unfortunately, i've had to get rid of ALL OF THEM to make it through the gnome rebuild:
Code:
CFLAGS="-O2 -march=pentium3 -mtune=pentium3 -pipe"
CXXFLAGS=${CFLAGS}


is gnome really this b0rked? has anyone been able to get gnome to compile on a gcc 3.4.3 / intel platform with anything more than skinny CFLAGS?

emerge info: :-(
Code:
gentoo ~ # emerge info
Portage 2.0.51-r8 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.10-gentoo-r1 i686)
=================================================================
System uname: 2.6.10-gentoo-r4 i686 Pentium III (Coppermine)
Gentoo Base System version 1.6.8
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Dec 29 2004, 22:58:57)]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.8.5-r2, 1.5, 1.4_p6, 1.6.3, 1.7.9, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r2
sys-devel/libtool:   1.5.10-r2
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=pentium3 -mtune=pentium3 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium3 -mtune=pentium3 -pipe "
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://gentoo.netnitco.net http://gentoo.osuosl.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LDFLAGS=""
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="x86 X acl acpi alsa apm arts avi berkdb bitmap-fonts cdinstall cdparanoia cdr cdrom cgi chroot client crypt cups dvd dvdr dvdread encode esd fam flac foomaticdb fortran freetype gdbm gif gimp gimpprint gnome gnomedb gnuplot gpm gtk gtk2 gtkhtml hal ide imagemagick imlib ipv6 ithreads java javacomm javadoc javamail javascript jpeg jpeg2k kde ldap libwww mad mikmod motif mpeg mysql ncurses nls nptl oggvorbis opengl oss pam pdf pdflib perl png posix print pthreads python qt quicktime readline samba sdl shaper slang snmp spell ssl svga tcpd tiff truetype userlocales xine xinerama xmlxml2 xmms xscreensaver xv zlib"

_________________
.
Stage 1/3 | Jackass! | Rockhopper! | Thanks | Google Sucks
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: Thu Jan 13, 2005 2:40 am    Post subject: Reply with quote

I just got through a
Code:
emerge -e gnome
because I changed this box to ~x86 nptl and 3.4.3.I got jamed up a few times but did a
Code:
emerge sync
emerge -u gnome
again and it worked.It would start up the emerge in a different order.Then when I got to evolution I had to reemerge evolution-data server to finish the emerge.I have alot of stuff in /etc/make.conf but it is tame.I could post it but it is alot.I'm on a p-4.
I may never do a depclean,all I hear of is horror,I do use revdep-rebuild.
_________________
http://dev.gentoo.org/~dabbott/
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: Thu Jan 13, 2005 8:47 am    Post subject: Re: CFLAGS for gnome? Reply with quote

Bob P wrote:
i'm running an "~x86" intel platform. after depcleaning and revdep-rebuild, i've had to essentially rebuild all of by gnome files because of depclean errors. i've run into some real problems with gnome components not liking my CFLAGS.

originally, i had started out with the following CFLAGS that worked well for every app on my box:
Code:
CFLAGS="-O3 -march=pentium3 -mtune=pentium3 -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -ftracer -pipe"
CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden -fvisibility=hidden"


unfortunately, i've had to get rid of ALL OF THEM to make it through the gnome rebuild:
Code:
CFLAGS="-O2 -march=pentium3 -mtune=pentium3 -pipe"
CXXFLAGS=${CFLAGS}


is gnome really this b0rked? has anyone been able to get gnome to compile on a gcc 3.4.3 / intel platform with anything more than skinny CFLAGS?


well, just to say it before someone else does, "-O2 -march=pentium3 -pipe" are the recommened stable CFLAGS, so no, Gnome is not broken if it compiles with those flags.

now that that formaility is out of the way.. "-fvisibility-inlines-hidden -fvisibility=hidden" breaks a hell of a lot of packages from what i've read. other than that, i don't see why the rest of your flags should cause any problems...

-O3: probably the -finline-functions. maybe try -O2 -fweb -frename-registers? i ran that for a while, since IMO inlining usually doesn't live up to the hype. -frename-registers i didn't run for too long, but -fweb lasted at least a month.

-march=pentium3 -mtune=pentium3: -mtune is redundant. i know, you may say some ebuilds filter -march. but they usually do that for a reason though. :wink:

-fforce-addr: no comment, maybe try getting rid of this one first.

-momit-leaf-frame-pointer -fomit-frame-pointer: i may be mistaken, but i believe -fomit-frame-pointer includes leaf frame pointers. either one shouldn't kill a compile however.

-ftracer: also have been using this for months, no issues for me.

i'm on a PIII as well.

where exactly is the compile failing, ie. which packages? i'm running "skinny" (aka SANE :wink:) flags right now, but back when i ran gnome, it was with a few odds and ends included, and as i remember it compiled fine.

other than that the only advice i can give is to cascade your CFLAGS. by that i mean try this in make.conf:

Code:

CFLAGS="-march=pentium3 -pipe"
CFLAGS="${CFLAGS} -mtune=pentium3"
CFLAGS="${CFLAGS} -fomit-frame-pointer"
CFLAGS="${CFLAGS} -momit-leaf-frame-pointer"
CFLAGS="${CFLAGS} -fforce-addr"
CFLAGS="${CFLAGS} -ftracer"

# (choose one)
CFLAGS="${CFLAGS} -O3"
#CFLAGS="${CFLAGS} -O2"

# (use these only if -O2, they are included in -O3)
#CFLAGS="${CFLAGS} -fweb"
#CFLAGS="${CFLAGS} -frename-registers"

# (choose one)
CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden -fvisibility=hidden"
#CXXFLAGS="${CFLAGS}"


it just makes it much so much easier to manage. when you hit a snag, start commenting out lines. :lol:
_________________
by design, by neglect
for a fact or just for effect
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: Mon Jan 17, 2005 10:11 pm    Post subject: Reply with quote

thanks for your helpful reply. i had depeleaned and revdep-rebuilt the system, and i ran into all sorts of gnome-related problems. i'm not really a gnome guy, but i seem to have accumulated an awful lot of gnome packages as dependencies.

it appears that the depclean/rebuild choked on some of the gnome ebuilds becuase there were multiple versions of the same gnome packages installed on the system. i'm not exactly sure how that happened, unless they got pulled in as dependencies using --oneshot. at any rate, the presence of multiple ebuilds for each gnome package caused all sorts of problems during compilation. these problems cleared up remarkably once i used emerge -C to manually remove each of the multiple ebuild versions from the system. i've subsequently installed new ebuilds on a "clean slate." things seem to be working well enough now, so now its time to test the cflags.

thanks again.

btw, i like your method of nesting the cflags. its certainly quicker to just tag a line to comment out an individual cflag. i think that this tip is definitely a keeper! :wink:
_________________
.
Stage 1/3 | Jackass! | Rockhopper! | Thanks | Google Sucks
Back to top
View user's profile Send private message
nightfrost
Apprentice
Apprentice


Joined: 07 Dec 2004
Posts: 293
Location: Sweden

PostPosted: Tue Feb 15, 2005 9:05 am    Post subject: Reply with quote

Code:
CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden -fvisibility=hidden"


I was just wondering how unstable these flags are considered to be. They sure look nice when reading the gcc-manpage, and I have managed to install (almost) an entire system with those flags. Every now and then a package fails to emerge and remove that line and run a --oneshot if need be. But are they known to cause stability problems after compile as well?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments 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