Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
After NPTL migration, strange gcc-3.4.3-20050110 message
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3435
Location: Gainesville, Florida

PostPosted: Sun Apr 10, 2005 5:53 pm    Post subject: After NPTL migration, strange gcc-3.4.3-20050110 message Reply with quote

[I posted this in poprtage/programming, and got 80 reads, but 0 responses. I figured since I'm ~x86 and run unsupported kernels, maybe I was in the wrong forum, so I deleted it there, and am re-posting here, in hopes someone knows what's going on, and if i need to take any corrective action]

I just migrated to NPTL NPTLONLY (followed wiki instructions), and rebuilt glibc, gcc-config, binutils, and gcc. All went OK, except I get the following message after I emerge sync'd and found a new upgrade for gcc from 3.4.3-20050110-r1 to -r2 (had to rebuild libtool twice to get -r2 to compile). I had used -r1 since it came out, with no problems. So- I rebuilt both -r1 and then -r2 AFTER setting NPTL, and both had the following message- I don't recall seeing it when I emerged r1 originally some weeks ago, without NPTL set.

Anyway, what does this message mean- about it saying 20050110 doesn't exist anymore, when it does exist, and is my default gcc version? Things seem to be working OK so far. I haven't had any of the old libstdc++.la problems yet.
------------------------------------------------------------------------------------------------------------------
>>> /usr/libexec/gcc/i686-pc-linux-gnu/3.4.3-20050110/cc1plus
--- /sbin/
>>> /sbin/fix_libtool_files.sh
* The currently selected specs-specific gcc config,
* 20050110, doesn't exist anymore. This is usually
* due to enabling/disabling hardened or switching to a version
* of gcc that doesnt create multiple specs files. The default
* config will be used, and the previous preference forgotten.
* Switching to i686-pc-linux-gnu-3.4.3-20050110 compiler ... [ ok ]

* If you intend to use the gcc from the new profile in an already
* running shell, please remember to do:

* # source /etc/profile


* If you have issues with packages unable to locate libstdc++.la,
* then try running 'fix_libtool_files.sh' on the old gcc versions.

>>> Regenerating /etc/ld.so.cache...
* Caching service dependencies ... [ ok ]
>>> sys-devel/gcc-3.4.3.20050110-r2 merged.

sys-devel/gcc
selected: 3.4.3.20050110-r1
protected: 3.4.3.20050110-r2 3.3.4-r1
omitted: none
-----------------------------------------------
MY INFO:

wrc@mymachine ~ $ gcc-config -l
[1] i686-pc-linux-gnu-3.3.4
[2] i686-pc-linux-gnu-3.4.3-20050110 *
[3] i686-pc-linux-gnu-3.4.3-20050110-hardened
[4] i686-pc-linux-gnu-3.4.3-20050110-hardenednopie
[5] i686-pc-linux-gnu-3.4.3-20050110-hardenednossp

mymachine wrc # emerge --info
Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.4.3-20050110, glibc-2.3.4.20050125-r1, 2.6.12-rc1-vivid1 i686)
=================================================================
System uname: 2.6.12-rc1-vivid1 i686 AMD Athlon(tm) XP 1800+
Gentoo Base System version 1.6.10
Python: dev-lang/python-2.2.3-r1,dev-lang/python-2.3.5 [2.3.5 (#1, Feb 17 2005, 20:00:36)]
dev-lang/python: 2.2.3-r1, 2.3.5
sys-devel/autoconf: 2.59-r6, 2.13
sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5
sys-devel/binutils: 2.15.92.0.2-r8
sys-devel/libtool: 1.5.14
virtual/os-headers: 2.6.8.1-r4
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=athlon-xp -ftracer -fweb -frename-registers -ffast-math -fomit-frame-pointer -fprefetch-loop-arrays -pipe -falign-functions=64 -momit-leaf-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/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="-O3 -march=athlon-xp -ftracer -fweb -frename-registers -ffast-math -fomit-frame-pointer -fprefetch-loop-arrays -pipe -falign-functions=64 -momit-leaf-frame-pointer -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://gentoo.osuosl.org/distfiles http://mirror.gentoo.no/ http://gentoo.chem.wisc.edu/gentoo/ ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow X alsa apm arts avi berkdb bitmap-fonts caps cdr crypt cups curl emboss encode esd fam flac fluidsynth foomaticdb fortran gaim gdbm gif gnome gpm gstreamer gtk gtk2 imagemagick imlib ipv6 jack jack-tmpfs jpeg kde ladspa libg++ libwww mad mikmod mmx motif mp3 mpeg ncurses nls nptl nptlonly oggvorbis opengl oss other_var1 other_var2 pam pdflib perl png ppds python qt quicktime readline sdl slang spell sse ssl svga tcltk tcpd tiff truetype truetype-fonts type1-fonts xml2 xmms xv zlib"
Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL
_________________
Abit KX7-333, MSI KT3 Ultra 2
AthlonXP 1700+ Thoroughbred B's,
512MB Crucial PC2700 DDR
Maxtor ATA133 40GB 7200rpm drives
ATI Radeon 9000 Pro, Audigy 2 ZS sound
Gentoo ~x86, VidaLinux, winXP Pro-sp2
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.36-r7, gcc-13.2.1_p20230304
kernel-6.8.4 USE=experimental python3_11
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3435
Location: Gainesville, Florida

PostPosted: Mon Apr 11, 2005 5:15 pm    Post subject: Reply with quote

184 views and zero responses? Hasn't anyone else wondered about this, or had it show up in their emerge output?
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.36-r7, gcc-13.2.1_p20230304
kernel-6.8.4 USE=experimental python3_11
Back to top
View user's profile Send private message
steve_d555
Guru
Guru


Joined: 07 Nov 2004
Posts: 458
Location: Belmont, Massachusetts

PostPosted: Tue Apr 12, 2005 4:46 am    Post subject: Reply with quote

Try taking out the use flag NPTLONLY, sometimes that can lead to problems with some programs. I have no idea, but since that is one of the things that has changed, why not.
_________________
rubyforums | blog | boxwhore
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3435
Location: Gainesville, Florida

PostPosted: Tue Apr 12, 2005 6:17 am    Post subject: Reply with quote

Hmmmmm. I had tried that first thing, as I had read about various problems. However, I couldn't recompile glibc after going with NPTL without it, so I had to leave it in.

I'm starting to think my system might have a very slight misconfiguration somehow relating to gcc, glibc, and/or xorg-x11. Everything works well. but i sometimes get these types of weird messages on emerge updates.

steve_d555,
Thanks for the suggestion! First response to this in hundreds of views.
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.36-r7, gcc-13.2.1_p20230304
kernel-6.8.4 USE=experimental python3_11
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: Tue Apr 12, 2005 9:22 am    Post subject: Reply with quote

i dunno jack about athlons, but i have a few opinions that may or may not be helpful.

first, i think you've got to be one brave soul to put ~x86 in your accept keywords, given the current state of flux in the GCC 343 toolkit. there have been huge problems with gcc-config lately that the devs have been trying to silently fix. my preferred method is to selectively use ~arch only for specific packages, enabling it on a per package basis via package.keywords.

your cflag settings are rather aggessive. fast-math is a known troublemaker. i would back off on a few of them and reduce the optimization level, and rebuild.

if you have a statically retained library, then no amount of recompiling the toolkit components in isolation is going to help you. you have to rebuild the entire system redundantly in order to fix the toolchain problem.

NPTLONLY causes problems. i'd get rid of it.

i would also remove the LDFLAGS.

so my recommendation would be:

CFLAGS="-O2 -march=athlon-xp -ftracer -fweb -frename-registers -fomit-frame-pointer -pipe -momit-leaf-frame-pointer -force-addr"

ACCEPT_KEYWORDS="x86"

and then i would do this:

emerge -e system
emerge -e system
emerge -e world
emerge -e world

if you do all of these things, i guarantee that your system will work.
_________________
.
Stage 1/3 | Jackass! | Rockhopper! | Thanks | Google Sucks
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: Tue Apr 12, 2005 9:23 am    Post subject: Reply with quote

btw, Portage & Programming was the right place to post for your problem. sometimes it just takes time. :wink:
_________________
.
Stage 1/3 | Jackass! | Rockhopper! | Thanks | Google Sucks
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3435
Location: Gainesville, Florida

PostPosted: Tue Apr 12, 2005 1:47 pm    Post subject: Reply with quote

Bob P,
Many thanks for your feedback. I've read many of your posts, and have always learned a lot, and can't wait to see how the Jackass Project turns out. Let me briefly address your points, as to my experience so far. BTW, I only run AMD athlon systems, so maybe that's a factor in my experiences so far. I sync my main box about once a week.

In my case, I've used ~x86 since I started Gentoo, and really have had far less problems than I've ever had with any other distro. I came from Mandrake, and have installed and tested many many others (source and binary), including freebsd. Any hiccup (usually self-inflicted) with ~x86 has always been resolved quickly , but they are so few and far between, I can't imagine x86 would make noticable improvement in my system stability. I would describe my Gentoo boxes as consistently "rock solid," working fine for what I use them for. I would think in running hybrid x86/~x86 systems, it would be hard to keep track of things. I'll still swear by ~x86 for my usage, which admittedly is basically just home desktop office/multimedia/internet, so I might not run into problems other users might have.

Isn't -force-addr redundant, as it is enabled at levels -O2, -O3, -Os? I've also read recently that in most cases it actually degrades performance. I did use it previously, but dropped it about a year ago.

On my boxes, I've so far never traced any problem to -O3, as opposed to -O2.

Most of the recent info I've seen (and my own experience) about -ffast-math and recent gcc versions supports the position that previous problems with floating point no longer apply. At least in my case, I've used it for over a year, and have run into only 2 or 3 problems. The benchmarks I've seen definitely support it being one of the best performancing enhancing optimization flags available.

After reading your other thread, I have adopted

emerge -e system
emerge -e system
emerge -e world
emerge -e world

On the NPTLONLY thing, I wanted to not use it, but glibc wouldn't compile without it (I tried dropping cflags, but no luck- it really appeared to be that glibc needed NPTLONLY). And, the NPTL wiki still says to use it. However, next time I do emerge -e I'll try dropping it again.

I tried prelink, and noticed perhaps slightly faster loading of apps. I then read about LDFLAGS, and so then I tried them, with essentially the same results- perhaps subjectively perceived as slightly better. I'm curious as to why would you recommend dropping them?
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.36-r7, gcc-13.2.1_p20230304
kernel-6.8.4 USE=experimental python3_11
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: Tue Apr 12, 2005 2:10 pm    Post subject: Reply with quote

the reason that you've been as successful with -O3 as i have is because many of the critical ebuilds filter the flag out, and replace it with -O2.

one reason for naming clfags redundantly is to circumvent their removal by the ebuild maintainers who like to strip -O3 and replace it with -O2. if you specify -O3 AND you manually and redundantly specifcy the cflags that are added when you go from the -O2 to the -O3 specification, then you preserve some of the -O3 optimizations when the ebuild strips -O3 off and replaces it with -O2. i've grepped the portage tree to list the ebuilds that perform this replacement, and none of them filter these individual flags. until the ebuild guys figure this out, we've got a good thing going for us.

building your toolkit with -O3 is really a waste of time. glibc and gcc filter -O3. if you have any doubts, watch the screen when glibc compiles, and you'll see that all of the flags displayed onscreen are -O2. so you might as well just use -O2 and manually enter the flags that are included in the upgrade from 2 to 3.

one problem with ~x86 is that there are some ebuilds that get linked by the toolkit that you may not expect to play a critical role. personally, i do not trust toolkit components that are in the testing branch very much, so i keep a close eye on them, and i force the stable branch for everything else. i am very aggressive in my gentoo builds, and i won't use the ~x86 flag. it just causes too many problems. to avoid these kinds of problems, and to maximize stability, jackass! uses x86 exclusively, save for a few critical toolkit packages.

in working on Jackass!, one of our guys has sworn that -ffast-math is still a troublemaker, so we avoid it. we've rebuilt the toolkit at least 10-20 times for 4 architectures in the past week without one single failure, so its hard to argue with success. IMHO, you're already at the point of diminishing returns, and fast math offers lots of risk for little reward.

NPTLONLY is BAD, regardless of what the wiki says.

LDFLAGS are another one of those diminishing returns optimizations. plenty of risk, little reward.

hth.
_________________
.
Stage 1/3 | Jackass! | Rockhopper! | Thanks | Google Sucks
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3435
Location: Gainesville, Florida

PostPosted: Tue Apr 12, 2005 4:08 pm    Post subject: Reply with quote

Thanks for the info. You make some good points, and I'll rethink LDFLAGS and NPTLONLY. My objective was to go pure NPTL, and get away from the old linuxthreads, but perhaps that isn't the wisest course? My thinking came from reading several items like this:
Quote:

"Note: Because once we build gcc, glibc, and gcc-config we're going to rebuild them using optimizations that only gcc 3.4.x has. Before we start however, I highly recommend that you add the following two options to your USE flag: nptl nptlonly. These options specify that you will compile gcc and glibc, and thus all programs with the Next Generation Posix Threading Library and without native linux threading support(believe me, you won't regret it). The option nptlonly is very important for a number of reasons, foremost being that without you will end up building 2 versions of glibc and gcc(which once bootstrapped you'll understand why you this is a very annoying thing), and because without it you'll get errors building the base system as the programs will improperly choose which threading version to build for (arghh libperl ...)."


After seeing things like that, and then glibc not compiling without it, NPTLONLY did seem necessary. Is the above quote invalid? But of course you are correct- I am already at the point of diminishing returns.

I just googled around (hadn't done so in many months) and reviewed some more recent benchmarks and -ffast-math, which has to do with floating-point code. Also looked at several AMD vs. Intel floating-point papers. Since athlon-xp, AMD appears to have significantly better floating-point handling than Intel, maybe that's a factor as to why -ffast-math seems to present no problems on my AMD systems. As I understand it, not strictly adhering to floating-point standards was the main problem with -ffast-math, but now with athlon-xp and newer gcc versions, that doesn't really apply anymore, at least with modern AMD cpus. I'm no expert, but I can definitely say -ffast-math isn't causing me any perceivable problems, and the benchmarks I've seen lead me to believe it's very worthwhile. Naturally, if it started breaking things, I'd reconsider, but so far that hasn't happened. Perhaps it's a different situation for Intel cpus.

On some ebuilds stripping -O3, I did recently became aware of that, which is why I added the redundant -fweb -frename-registers. However, since -force-addr is enabled with -O2 anyway (man gcc), isn't it actually redundant with -O2?

IIRC, the only other opt flag -O3 adds vs. -O2 is -finline-functions, so "-O2 -fweb -frename-registers -finline-functions" is the same set of opts as -O3. Thus, it appears the only -O3 flag left out in your -O2 recommendation is -finline-functions, which as I understand it produces significantly larger binaries.

Once again, on my boxes, ~x86 is rock solid 99.999% of the time, but of course YMMV applies, and I'm certainly not recommending my setup for everyone.
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.36-r7, gcc-13.2.1_p20230304
kernel-6.8.4 USE=experimental python3_11
Back to top
View user's profile Send private message
steve_d555
Guru
Guru


Joined: 07 Nov 2004
Posts: 458
Location: Belmont, Massachusetts

PostPosted: Tue Apr 12, 2005 6:47 pm    Post subject: Reply with quote

I have had nptlonly out of my useflags from when I switched over and everything has been fine. Its worth compiling twice if you dont have problems. Also it doesnt really look like the error has anything to do with your CFlags, though if you do have problems down the road compiling, try taking out the more extreme ones.
_________________
rubyforums | blog | boxwhore
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3435
Location: Gainesville, Florida

PostPosted: Tue Apr 12, 2005 10:02 pm    Post subject: Reply with quote

In my recent extensive reading on the NPTL subject, I've run across many hundreds of statements like these:

Quote:
Note that LinuxThreads has been integrated with the GNU C library (glibc) since
version 2.0
.

Quote:
LinuxThreads are obsolete. Kernel 2.6 / glibc 2.3 use NPTL, which launches new threads four times faster than LinuxThreads, allows you to have more than 8192 threads per process, doesn't require you to have lots of manager threads that don't do anything useful, delivers signals to threads as opposed to processes, and is actually more-or-less POSIX compliant.


Quote:
I've been using NPTL on my workstation for 12 months, and I haven't looked back
.

Quote:
If you use not-so-recent binary only commercial applications that don't work with NPTL, re-emerge glibc without the nptlonly USE flag, so you will be able to use linuxthreads with these apps.


From an in-depth NPTL/Linuxthreads overview article:
http://linuxdevices.com/articles/AT6753699732.html

Quote:
LinuxThreads has a variety of performance, scalability, and usability limitations. It uses a compile-time setting for the number of threads that a single process can create, and uses a per-process manager thread to create and coordinate between all threads owned by each process. This significantly increases the overhead of creating and destroying threads. Signal handling is done on a per-process, rather than a per-thread, basis, though each thread has a separate process ID. Issues such as these, in combination with design issues such as an asymmetric relationship between kernel and user-space threads, and the lack of per-thread synchronization primitives for inter-thread communication and resource sharing, places some fundamental limitations on the number of threads that can simultaneously be created and do meaningful work in a LinuxThreads implementation.


Quote:
NPTL brings high-performance threading support to Linux, and provides the foundation required by multi-threaded enterprise applications such as database systems, high-capacity and high-load web and mail servers, and so on. NPTL was developed as part of the 2.5 kernel development process and was integrated with Linux run-time elements such as glibc at that time. NPTL is the strategic direction for Linux threading in the future.


My conclusion would be:
Since I don't have any of these type of apps (binaries that don't work with NPTL), only run 2.6.x kernels (since 2.5.67), use the latest glibc/gcc, etc., why would I still need to keep the old linuxthreads around, especially if NPTLONLY is giving me no real problems? My Gentoo boxes are meant to be kept as current as possible, and I completely abandoned 2.4 kernels last year. I realize NPTL improvements are probably more noticable on a server as opposed to desktop systems, but I really like keeping up with the latest innovations nonetheless. And, after all, I do run ~x86 boxes, and don't mind an ocassional hiccup.:lol:

Bob P- if there's still a serious downside to NPTLONLY under my circumstances I'm unaware of, please enlighten me.
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.36-r7, gcc-13.2.1_p20230304
kernel-6.8.4 USE=experimental python3_11
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software 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