I compiled glibc-2.3.5 with +nptl and -nptlonly to create both an nptl and linuxthread versions. To run old bin-only programs I use LD_ASSUME_KERNEL=2.4.19 and on glibc-2.3.4 this worked fine. I consulted the glibc message boards and got the following response: Run: readelf -s /lib/libc.so.6| grep errno When nptl is enabled, libc.so will have 343: 00000008 4 TLS GLOBAL DEFAULT 23 errno@@GLIBC_PRIVATE 7802: 00000008 4 TLS GLOBAL DEFAULT 23 errno With Linuxthreads, libc.so will have 1046: 0012c600 4 OBJECT GLOBAL DEFAULT 27 _errno@GLIBC_2.0 1174: 0012c600 4 OBJECT GLOBAL DEFAULT 27 errno@GLIBC_2.0 BUT ON MY SYSTEM: ================ My *NEW* libc-2.3.5.so 276: 000e9853 254 FUNC GLOBAL DEFAULT 11 clnt_perrno@@GLIBC_2.0 291: 00000008 4 TLS GLOBAL DEFAULT 19 errno@@GLIBC_PRIVATE 852: 0000001c 4 TLS GLOBAL DEFAULT 19 h_errno@@GLIBC_PRIVATE 1529: 000dd500 25 FUNC GLOBAL DEFAULT 11 __h_errno_location@@GLIBC_2.0 1843: 000156d0 25 FUNC GLOBAL DEFAULT 11 __errno_location@@GLIBC_2.0 2162: 000e9494 120 FUNC GLOBAL DEFAULT 11 clnt_sperrno@@GLIBC_2.0 My *OLD* libc-2.3.4.so 274: 000ce6bc 128 FUNC GLOBAL DEFAULT 11 clnt_perrno@@GLIBC_2.0 994: 0010d360 4 OBJECT GLOBAL DEFAULT 29 _errno@GLIBC_2.0 1120: 0010d360 4 OBJECT GLOBAL DEFAULT 29 errno@GLIBC_2.0 1527: 000c3594 40 FUNC GLOBAL DEFAULT 11 __h_errno_location@@GLIBC_2.0 1707: 0010ef70 4 OBJECT GLOBAL DEFAULT 29 h_errno@GLIBC_2.0 1842: 000157a0 40 FUNC GLOBAL DEFAULT 11 __errno_location@@GLIBC_2.0 2108: 0010ef70 4 OBJECT WEAK DEFAULT 29 _h_errno@GLIBC_2.0 2161: 000ce653 105 FUNC GLOBAL DEFAULT 11 clnt_sperrno@@GLIBC_2.0 When I posted these results to the glibc message board I got the following response: You built/installed your glibc wrong. If you are not VERY familiar with glibc, please use a Linux distribution. My FC 3 has bash-3.00$ readelf -s /lib/libc.so.6| grep errno@ 274: 00296010 262 FUNC GLOBAL DEFAULT 11 clnt_perrno@@GLIBC_2.0 991: 002d4320 4 OBJECT GLOBAL DEFAULT 29 _errno@GLIBC_2.0 1117: 002d4320 4 OBJECT GLOBAL DEFAULT 29 errno@GLIBC_2.0 1704: 002d5f34 4 OBJECT GLOBAL DEFAULT 29 h_errno@GLIBC_2.0 2105: 002d5f34 4 OBJECT WEAK DEFAULT 29 _h_errno@GLIBC_2.0 2158: 00295c50 133 FUNC GLOBAL DEFAULT 11 clnt_sperrno@@GLIBC_2.0 8354: 002d4320 4 OBJECT GLOBAL DEFAULT 29 _errno@GLIBC_2.0 8480: 002d4320 4 OBJECT GLOBAL DEFAULT 29 errno@GLIBC_2.0 9067: 002d5f34 4 OBJECT GLOBAL DEFAULT 29 h_errno@GLIBC_2.0 9468: 002d5f34 4 OBJECT WEAK DEFAULT 29 _h_errno@GLIBC_2.0 bash-3.00$ readelf -s /lib/tls/libc.so.6| grep errno@ 275: 0028e760 262 FUNC GLOBAL DEFAULT 11 clnt_perrno@@GLIBC_2.0 289: 00000008 4 TLS GLOBAL DEFAULT 20 errno@@GLIBC_PRIVATE 838: 0000001c 4 TLS GLOBAL DEFAULT 20 h_errno@@GLIBC_PRIVATE 2135: 0028e3a0 133 FUNC GLOBAL DEFAULT 11 clnt_sperrno@@GLIBC_2.0 Reproducible: Always Steps to Reproduce: 1. set +nptl -nptlonly 2. emerge glibc-2.3.5 3. export LD_ASSUME_KERNEL=2.4.19 3. Run older build of app such as Cadence or Matlab (linuxthreads) Actual Results: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference Program does not run at all. Expected Results: Just run without any errors Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r0, 2.6.11.10 i686) ================================================================= System uname: 2.6.11.10 i686 Mobile Intel(R) Pentium(R) 4 - M CPU 2.00GHz Gentoo Base System version 1.4.16 Python: dev-lang/python-2.3.5 [2.3.5 (#1, Jun 6 2005, 16:25:38)] dev-lang/python: 2.3.5 sys-apps/sandbox: [Not Present] sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.8.5-r3, 1.5, 1.7.9-r1, 1.6.3, 1.4_p6, 1.9.5 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.16 virtual/os-headers: 2.6.8.1-r2, 2.6.8.1-r1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=pentium4m -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /usr/share/texmf/ dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ / usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=pentium4m -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict" GENTOO_MIRRORS="ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://128.213.5.34/gentoo/ http://mirror.datapipe.n et/gentoo http://mirrors.tds.net/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X acl acpi alsa avi berkdb bitmap-fonts cdr crypt cups curl dvd emboss encode font-server foomaticdb fortran gdb m gif gpm gtk gtk2 icq imlib ipv6 java jpeg libg++ libwww mad mikmod mmx motif mp3 mpeg msn ncurses nls nptl nvidia ogg o ggvorbis opengl pam pcmcia pdflib perl pic png pnp ppds python quicktime readline samba sdl spell sse sse2 ssl svga tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts vorbis win32codecs xml2 xmms xv xvid zlib video_cards_nvidia userlan d_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Just re-emerged glibc with -nptl and -nptlonly to build a linuxthread glibc without any support for nptl. Same error. This was expected.
compat-2.0 was removed... Edit the ebuild and look for the line that says: ADDONS=$(echo ... | sed ...) remove '|glibc-compat' from the sed statement. Then you should have a glibc that plays nice with glibc-2.0 binaries. What binary is this? Why can't you just recompile it?
The package is from Cadence and is for designing integrated circuits. No way to re-compile as the sources are not available. This is a comercial product. From your statement is sounds like you intend to drop the 2.0 compatibility for good, is this so? -Raf
we could make it a USE flag option
That would be ideal and make me quite happy as this tool is a must for me (I'm an IC designer) and lack of 2.0 compatibility would basically halt any future updates to my gentoo box! Thanks alot -Raf
Ok, I'll make it a USE flag option in 2.3.5-r1, but can you just verify that adding in the glibc-compat addon (that is, not stripping it from the addons selected) fixes your problem and no other regressions are present with those old binaries.
I will do so right now and post back. Thanks for your help, Raf
Hi Jeremy, I looked at the ADDONS line in glibc-2.3.4.20050125-r1.ebuild (which works perfectly with all my binaries) and it is identical to the ADDONS line in glibc-2.3.5.ebuild: ADDONS=$(echo */configure | sed -e 's!/configure!!g;s!\(linuxthreads\|nptl\|rtkaio\|glibc-compat\)\( \|$\)!!g;s! \+$!!;s! !,!g;s!^!,!;/^,\*$/d') Either way I did what you suggested and edited the glibc-2.3.5.ebuild and removed '|glibc-compat'. My ADDONS line now is: ADDONS=$(echo */configure | sed -e 's!/configure!!g;s!\(linuxthreads\|nptl\|rtkaio\)\( \|$\)!!g;s! \+$!!;s! !,!g;s!^!,!;/^,\*$/d') The Cadence binary still returns the same error: "symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference" the command 'readelf -s /lib/libc.so.6| grep errno'returns the same result as my original post. -Raf
ok, that's what i was suspecting because I didn't think that addon was used in the previous versions either... Could you provide me with these packages, so I could test them out myself here? Did you change your nptl and nptlonly USE flag settings? When you say "my libc-2.3.5.so" in the initial comment, are you using /lib/libc-2.3.5.so (linuxthreads) or /lib/tls/libc-2.3.5.so (nptl)? Similar for 2.3.4
> Could you provide me with these packages, so I could test them out myself here? Can't do that. This software is huge (6GB) and it's comercial (licensed to server) > Did you change your nptl and nptlonly USE flag settings? I use +nptl and -nptlonly. But I have tried with -nptl and -nptlonly as well > When you say "my libc-2.3.5.so" in the initial comment, are you using > /lib/libc-2.3.5.so (linuxthreads) or /lib/tls/libc-2.3.5.so (nptl)? Both 'readelf -s /lib/libc.so.6| grep errno' and 'readelf -s /lib/tls/libc.so.6| grep errno' give the same result when I run glibc-2.3.5 which is: 275: 000ebadf 254 FUNC GLOBAL DEFAULT 11 clnt_perrno@@GLIBC_2.0 290: 00000008 4 TLS GLOBAL DEFAULT 20 errno@@GLIBC_PRIVATE 840: 0000001c 4 TLS GLOBAL DEFAULT 20 h_errno@@GLIBC_PRIVATE 1511: 000dfbf0 25 FUNC GLOBAL DEFAULT 11 __h_errno_location@@GLIBC_2.0 1823: 00015390 25 FUNC GLOBAL DEFAULT 11 __errno_location@@GLIBC_2.0 2138: 000eb720 120 FUNC GLOBAL DEFAULT 11 clnt_sperrno@@GLIBC_2.0 Raf
i glanced through the latest fedora patch (which we arent using atm) and there is additional logic in it for glibc 2.0 compat handling ...
The latest fedora glibc (2.3.5-10 and fedora-branch) is actually based off of 2.3.90, and I'm a bit more conservative when it comes to toolchain than our friends over at Fedora. So I'd rather continue basing our releases off of the glibc-2_3-branch (and specifically releases) than fedora_branch. Spanky, are you seeing these compatibility fixes just in fedora_branch, or have they been merged into HEAD or 2_3-branch?
Actually, I'm suspecting (in fact I'm almost certain) this is actually because of --with-__thread. I'll verify it over here and commit a fix (forcing --without-__thread when we have USE=glibc-compat20) in glibc-2.3.5-r1
yep. I just committed 2.3.5-r1. It's currently in package.mask because there are a few more things I want to look at before it's released. Please test it by adding 'glibc-compat20' to your USE flags and adding '=sys-libs/glibc-2.3.5-r1' to your /etc/portage/package.unmask file. I'd also recommend re-emerging it once it's removed from package.mask to make sure any additonal fixes reach your system.
Hi, I have emerged glibc-2.3.5-r1 with the new use flag you created and everything is fine now! Thanks for your help. Also the inclusion of the tls patch in this release made matlab work (which was not the case in the original glibc-2.3.5) so I'm golden! Great job. -Raf P.S. Is there any way to get portage to notify me when you remove the mask status from glibc-2.3.5-r1 so that I may emerge it again as you suggested?
> Spanky, are you seeing these compatibility fixes just in fedora_branch, or have > they been merged into HEAD or 2_3-branch? i wasnt reviewing the branches in glibc cvs, just their src rpms and rpm cvs repo > P.S. Is there any way to get portage to notify me when you remove the mask > status from glibc-2.3.5-r1 so that I may emerge it again as you suggested? no such feature exists :/
Stupid question ... does nptl actually work with --without-__thread ?
az: nope. compilation will fail somewhere in nptl code due to something like: #ifndef WANT__THREAD #error "Dummy, you need __thread" #endif Raf: Actually, it's looking like the only changes between what you have and what will be in the final 2.3.5-r1 are updated infopages and hopefully a fix for CHOST=i586-pl-linux-gnu, so likely nothing that would really effect you...
Hi Jeremy, Thanks for the info. Either way I'll probably emerge it anyways once you guys are all done with it just to have a nice up-to-date glibc. -Raf
*** Bug 137694 has been marked as a duplicate of this bug. ***
*** Bug 138028 has been marked as a duplicate of this bug. ***
Please re-open. root@kbe ~ # emerge --info Portage 2.1-r1 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.3.6-r4, 2.6.16-gentoo-r9-kbe i686) ================================================================= System uname: 2.6.16-gentoo-r9-kbe i686 Intel(R) Celeron(R) CPU 2.00GHz Gentoo Base System version 1.6.14 ccache version 2.3 [enabled] dev-lang/python: 2.4.2 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.3 dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1-r2 sys-devel/gcc-config: 1.3.13-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=pentium4 -pipe -O2 -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-march=pentium4 -pipe -O2 -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://ftp.romnet.org/gentoo/ http://ftp.lug.ro/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ http://gentoo.inf.elte.hu/" LANG="de_DE.utf8" LC_ALL="de_DE.utf8" LDFLAGS="-Wl,-O1 -Wl,--strip-all -Wl,--enable-new-dtags -Wl,--sort-common" LINGUAS="de" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X a52 aac acl acpi aim alsa arts audiofile automount avi bash-completion berkdb bitmap-fonts cdparanoia cdr crypt cups divx4linux dvd dvdr dvdread encode ffmpeg font-server foomaticdb freetype gdbm gif glibc-compat20 gstreamer gtk gtk2 icq imagemagick imlib java jpeg kde kdeenablefinal libwww lm_sensors logrotate mad maildir mmx motif mp3 mpeg msn ncurses nls nptl nsplugin nvidia ogg opengl pam pcre pdf pdflib perl pic png ppds python qt quicktime readline real reflection samba sasl sdl sse sse2 ssl tcpd truetype truetype-fonts type1-fonts udev unicode usb userlocales vcd vorbis win32codecs xine xmms xorg xscreensaver xv xvid yahoo zlib elibc_glibc kernel_linux linguas_de userland_GNU" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY Although I compiled glibc-2.3.6-r4 with the USE-flag mentioned, I get /usr/knox/bin/arkx: relocation error: /usr/knox/bin/arkx: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference BTW, I didn't use the USE-flag when building any of my glibc's on my system including glibc-2.3.6-r3, but I never got symbol errors. So the implementation of the USE-flag must be buggy and didn't work in later glibc-releases. Regards
no, see Bug 138028