Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 78320 - glibc failed to detect TLS on sparc with 3.3.5-r1
Summary: glibc failed to detect TLS on sparc with 3.3.5-r1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: Sparc Linux
: High normal (vote)
Assignee: Jeremy Huddleston (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-17 01:09 UTC by persson
Modified: 2005-02-02 10:18 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description persson 2005-01-17 01:09:36 UTC
I used to have a NPTL glibc on this sparc system, but now (after upgrading linux26-headers) I wanted to recompile glibc. It fails with the following error:

[Mon Jan 17 10:53:34 root@blackbox ~]# emerge -Dav glibc

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] sys-libs/glibc-2.3.3.20040420-r2  -build -debug -erandom -hardened +nls +nptl (-pic) 0 kB

Total size of downloads: 0 kB

Do you want me to merge these packages? [Yes/No] y
>>> emerge (1 of 1) sys-libs/glibc-2.3.3.20040420-r2 to /
>>> md5 src_uri ;-) glibc-2.3.2.tar.bz2
>>> md5 src_uri ;-) glibc-linuxthreads-2.3.2.tar.bz2
>>> md5 src_uri ;-) glibc-2.3.3-branch-update-20040420.patch.bz2
>>> Unpacking source...

nptl
 * Checking for sufficient version kernel headers ... yes
 * Checking kernel headers for broken sysctl.h ... no
nptl
 * Checking gcc for __thread support ... no

 * Could not find a gcc that supports the __thread directive!
 * please update to gcc-3.2.2-r1 or later, and try again.

!!! ERROR: sys-libs/glibc-2.3.3.20040420-r2 failed.
!!! Function glibc_setup, Line 230, Exitcode 0
!!! No __thread support in gcc!
!!! If you need support, post the topmost build error, NOT this status message.

is this nptl-related? and if the answer is yes, is nptl working on sparc? should I revert to non-nptl and (possibly) linux 2.4 headers? Thank you.


Reproducible: Always
Steps to Reproduce:
1.emerge glibc
2.
3.

Actual Results:  
Error messages (see above)

Expected Results:  
Build without problems.

[Mon Jan 17 10:54:09 root@blackbox ~]# emerge info
Portage 2.0.51-r3 (default-linux/sparc/sparc64/2004.3/26headers, gcc-3.3.5,
glibc-2.3.3.20040420-r2, 2.6.7 sparc64)
=================================================================
System uname: 2.6.7 sparc64 sun4u
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.92.0.2-r1
Headers:  sys-kernel/linux26-headers-2.6.8.1-r2
Libtools: sys-devel/libtool-1.5.2-r7
ACCEPT_KEYWORDS="sparc"
AUTOCLEAN="yes"
CFLAGS="-O2 -mcpu=ultrasparc"
CHOST="sparc-unknown-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -mcpu=ultrasparc"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox"
GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo
ftp://ftp6.uni-erlangen.de/pub/mirrors/gentoo
ftp://vlaai.snt.ipv6.utwente.nl/pub/os/linux/gentoo/
http://gentoo.mirror.solnet.ch
http://vlaai.snt.ipv6.utwente.nl/pub/os/linux/gentoo/"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="arts avi berkdb bitmap-fonts crypt cups encode esd f77 fbcon font-server
foomaticdb fortran gcc64 gdbm gif gtk2 imlib ipv6 jpeg libwww mad mikmod motif
mpeg ncurses nls nptl nptlonly oggvorbis opengl oss pam pdflib perl png python
readline sdl spell ssl truetype truetype-fonts type1-fonts xml2 xmms xv zlib"
Comment 1 SpanKY gentoo-dev 2005-01-17 10:56:30 UTC
what does `gcc -c /usr/portage/sys-libs/glibc/files/test-__thread.c` show
Comment 2 persson 2005-01-17 12:29:11 UTC
# gcc -c /usr/portage/sys-libs/glibc/files/test-__thread.c
/usr/portage/sys-libs/glibc/files/test-__thread.c:1: error: thread-local storage not supported for this target
Comment 3 SpanKY gentoo-dev 2005-01-17 15:17:19 UTC
i'll update the glibc ebuild then to remove sparc from the nptl list

i doubt any of the sparc guys are interested in tracking nptl atm
Comment 4 Jeremy Huddleston (RETIRED) gentoo-dev 2005-01-18 00:49:01 UTC
This is specific to 3.3.5-r1.  3.3.4 and the 3.4.x work fine... 
Comment 5 Jeremy Huddleston (RETIRED) gentoo-dev 2005-01-31 13:50:23 UTC
In 3.3.4-r2 (and others before it), lv used a redhat snapshot which backported some work from 3.4.  This included some patches that got tls working on sparc.  In 3.3.5{,-r1} lv used mainline over redhat, so those patches were lost.

I'm making a new 3.3 release with an updated mainline and reintegrating those fedora changes.  You can get it from http://dev.gentoo.org/~eradicator/gcc

I'm just waiting on some pie updates from Peter before I add it in, so if you want to test it, you need to disable the pie patches.
Comment 6 persson 2005-02-02 03:40:33 UTC
I would gladly try the fix, but last night the hard disk decided to die, and I'm waiting for a replacement, so I'm stuck now.
I will try it ASAP, thanks for the fix.
Comment 7 Jeremy Huddleston (RETIRED) gentoo-dev 2005-02-02 10:18:58 UTC
Fixed in portage.  3.3.5.20050130 (~sparc).