# 2.6 Kernel (and headers) + NPTL Guide

## ka0ttic

2.6 Kernel (and headers) + NPTL Guide

Introduction

This guide will attempt to give instructions  on doing a fresh install from stage 1 using 2.6 headers and the nptl USE flag set.  Beware that this is still considered testing/unstable, so use at your own risk.  Instead of repeating basic installation steps, I will refer to the Gentoo 1.4 Installation Instructions: http://www.gentoo.org/doc/en/gentoo-x86-install.xml.

make.conf

Follow all installation instructions until you get to the section on editing make.conf.  Add nptl to the USE flags along with whatever else you use.  This is the only thing different you need to do with make.conf.  

Editing the linux-headers ebuild

At the time of this writing, the most current 2.6 headers ebuild is linux-headers-2.6.1.

```
# nano /usr/portage/sys-kernel/linux-headers/linux-headers-2.6.1.ebuild
```

Find the line that says KEYWORDS="-*" and change to:

```
KEYWORDS="-* x86"
```

Starting the bootstrap process

The most annoying part of installing Gentoo, IMO (Especially the time I installed Gentoo from stage 1 on a P233).  Anyways, to start the bootstrap process, type:

```
# /usr/portage/scripts/bootstrap-2.6.sh
```

Go find something to do for a while, but I would recommend checking back every once in a while just to make sure its still chugging along (like the time a bootstrap failed 5 minutes after I started it and went to bed  :Smile:  ).

emerge system

Just a few notes on stage 2. 

1.  Add the following to make.conf:

```
ACCEPT_KEYWORDS="~x86"
```

You must do this in order to compile some programs with 2.6 headers.

2.  The last couple of time I have done this, emerge system failed while compiling iputils.  For some reason a couple dependencies weren't installed first.  If it fails, try emerge flex (it complains abow -lfl not existing).  I also found that it will fail because autoconf isn't installed yet, so emerge autoconf.  Then continue with emerge system.

Follow the rest of the installation instructions.  NOTE: don't forget to install a 2.6 kernel

First boot

Hopefully the install went smoothly.  The first thing I would recommend that you do is re-emerge glibc, so that NPTL support will be compiled in.  I didn't realize this at first (I thought that because I had nptl in the use flags before bootstrap, that it would built it with NPTL support).  You can check by running:

```

# /lib/libc.so.6

GNU C Library stable release version 2.3.3, by Roland McGrath et al.Copyright (C) 2004 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.

There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR

A PARTICULAR PURPOSE.

Compiled by GNU CC version 3.3.2 20040119 (Gentoo Linux 3.3.2-r7, propolice-3.3-7).

Compiled on a Linux 2.6.1 system on 2004-02-13.

Available extensions:

     GNU libio by Per Bothner       

     crypt add-on version 2.1 by Michael Glad and others       

     NPTL 0.60 by Ulrich Drepper       

     BIND-8.2.3-T5B       

     NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk

     Thread-local storage support included.

Report bugs using the `glibcbug' script to <bugs@gnu.org>.

```

Notice the line NPTL 0.60 by Uldrich Drepper.  This means that glibc has NPTL support enabled.  If you do not see this (and instead see linux-threads), re-emerge glibc and remember to make sure that the nptl USE flag is set.

Hint

If you are unable to get some package to compile successfully, make sure you look in the ebuild directory for that package, to see if there is a newer ebuild.  Just because ACCEPT_KEYWORDS is set to ~x86 doesn't mean there isn't a newer version.  Some ebuilds (for example, linux-headers-2.6.1)  are unmasked for everything. 

Any problems, feedback, corrections, etc are encrouraged.

Have fun.

--

Aaron

----------

## snakattak3

If you don't want to do a fresh install, can you just put USE="nptl" and emerge glibc?

----------

## ka0ttic

 *Quote:*   

> 
> 
> If you don't want to do a fresh install, can you just put USE="nptl" and emerge glibc?
> 
> 

 

I've never done it that way, so I cannot say for sure.  I'm sure the system would still work, but I do not know if you can use NPTL w/o using the 2.6 headers.  Maybe someone a little more knowledgable can extend on that?

----------

## Deepu Sudhakar

 *ka0ttic wrote:*   

>  *Quote:*   
> 
> If you don't want to do a fresh install, can you just put USE="nptl" and emerge glibc?
> 
>  
> ...

 

I've been using NPTL without the 2.6 headers, and I haven't run into any problems. Still...I'm not sure if there are any adverse effects to this setup.

----------

## Cerement

seen several arguments back and forth over whether you need 2.6 headers or to just be running a 2.6 kernel -- currently, I'm of the latter opinion, someone else in another nptl thread pointed out a way to do a quick check:

```
# /lib/libc.so.6
```

should return several lines including:

```
Available extensions:

        ...

        NPTL 0.60 by Ulrich Drepper

        ...
```

Before I had enabled nptl, this line read linuxthreads by ...

----------

## corefile

what is nptl?

----------

## Boris27

native posix threading library.

its a way to handle concurrent processes. it appears to be a bit faster than the linuxthreads system that has been used so far.

----------

## jpalko

I got stuck at the point where:

```
>>> emerge (1 of 34) net-misc/iputils-021109-r1 to /

>>> md5 src_uri ;-) iputils-ss021109-try.tar.bz2

>>> Unpacking source...

>>> Unpacking iputils-ss021109-try.tar.bz2 to /portage/tmp/portage/iputils-021109-r1/work

ipv6

>>> Source unpacked.

...

parse.y: In function `setkeymsg':

parse.y:635: warning: dereferencing type-punned pointer will break strict-aliasing rules

parse.y:651: warning: dereferencing type-punned pointer will break strict-aliasing rules

gcc -o setkey setkey.o parse.o token.o pfkey.o pfkey_dump.o key_debug.o ipsec_strerror.o -L../libipsec -lipsec -lfl

rm token.c

configure.in:1: error: possibly undefined macro: dnl

      If this token and others are legitimate, please use m4_pattern_allow.

      See the Autoconf documentation.

configure.in:138: error: do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'

!!! ERROR: net-misc/iputils-021109-r1 failed.

!!! Function src_compile, Line 52, Exitcode 1

!!! (no error message)

```

Any ideas on how to proceed as this did not aid me: Bug #38774?

----------

## GurliGebis

 *jpalko wrote:*   

> I got stuck at the point where:
> 
> ```
> >>> emerge (1 of 34) net-misc/iputils-021109-r1 to /
> 
> ...

 

I know it is a difficult way to do it, but try this:

```
emerge system -p
```

and then emerge every package you can (one by one), and then emerge system when done (to install the packages that failed before), thats how I did it.

----------

## ka0ttic

 *Quote:*   

> 
> 
> !!! ERROR: net-misc/iputils-021109-r1 failed.
> 
> !!! Function src_compile, Line 52, Exitcode 1
> ...

 

Did you not read my whole post?  You need to emerge flex and go ahead and emerge autoconf because it will fail on that too.. then reissue the emerge system command.

--

Aaron

----------

## jpalko

 *ka0ttic wrote:*   

>  *Quote:*   
> 
> !!! ERROR: net-misc/iputils-021109-r1 failed.
> 
> !!! Function src_compile, Line 52, Exitcode 1
> ...

 

Tried it, did not work...  :Sad: 

----------

## ka0ttic

Sorry, I failed to check out the link to bugs.gentoo.org until AFTER I posted.  My apologies.  I didn't seem to have any problems with openssl..  If you have tried emerging those 3 and then re-doing emerge system, to no avail, then I don't really know what else to tell you other than to do what the other poster said and manually emerging everything.

--

Aaron

----------

## jpalko

Oh well, I started the installation from beginning, now doing bootstrap-2.6.sh. I propably messed up somethings on my machine last time, so will see how things go now with it.  :Smile: 

----------

## GurliGebis

If emerge system fails again, then try my methode.

----------

## jpalko

This try it got stuck at iputils again, to which merging:

```
# emerge autoconf flex

# emerge system
```

helped. Whonder what went wrong last time... I know for sure that I merged autoconf and flex both on last attempt as well, but I must have been tired in the evening and messed up something.  :Wink:  This time though I used the newest experimental stage1 tarball...

Currently proceeding on 

```
emerge (15 of 54) sys-fs/e2fsprogs-1.34-r1 to /
```

Looking good.  :Smile: 

The machine got stuck while doing genkernel all, so I had to push reset on the machine during it and continue from that after restarting the installation. Interesting effect, but it could have been caused by the old hard disc from which I had a partition mounted and it had started to have a lot of UncorrectableError's in messages...

Definite success:

```
$ /lib/libc.so.6 

GNU C Library stable release version 2.3.3, by Roland McGrath et al.

Copyright (C) 2004 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.

There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A

PARTICULAR PURPOSE.

Compiled by GNU CC version 3.3.2 20040119 (Gentoo Linux 3.3.2-r7, propolice-3.3-7).

Compiled on a Linux 2.6.1 system on 2004-02-16.

Available extensions:

        GNU libio by Per Bothner

        crypt add-on version 2.1 by Michael Glad and others

        NPTL 0.60 by Ulrich Drepper

        BIND-8.2.3-T5B

        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk

Thread-local storage support included.

Report bugs using the `glibcbug' script to <bugs@gnu.org>.
```

----------

## ka0ttic

jpalko,

Glad to see ya got it up and running   :Very Happy:    I almost have my machine back to the way 'twas before reinstalling...  (I wrote the guide write after I did it).   Anyways, glad you got it working.

--

Aaron

----------

## jpalko

It appears that Bug #41856 is on the way to my completion in installation. Though I have a feeling that it is a duplicate of Bug #35088 in a way or another...

Well, but my bit onto the bug information in order to aid the cause.  :Wink: 

```
>>> emerge (7 of 105) sys-apps/eject-2.0.13 to /

>>> md5 src_uri ;-) eject-2.0.13.tar.gz

>>> Unpacking source...

>>> Unpacking eject-2.0.13.tar.gz to /portage/tmp/portage/eject-2.0.13/work

 * Applying eject-2.0.13-kernel25-support.patch...                                                                                                                                                                                             [ ok ]

>>> Source unpacked.

creating cache ./config.cache

checking for a BSD compatible install... /bin/install -c

checking whether build environment is sane... yes

checking whether make sets ${MAKE}... yes

checking for working aclocal... found

checking for working autoconf... found

checking for working automake... found

checking for working autoheader... found

checking for working makeinfo... found

checking for gcc... gcc

checking whether the C compiler (gcc -mcpu=athlon-xp -march=athlon-xp -msse -mmmx -m3dnow -O2 -fomit-frame-pointer -frerun-loop-opt -pipe ) works... yes

checking whether the C compiler (gcc -mcpu=athlon-xp -march=athlon-xp -msse -mmmx -m3dnow -O2 -fomit-frame-pointer -frerun-loop-opt -pipe ) is a cross-compiler... no

checking whether we are using GNU C... yes

checking whether gcc accepts -g... yes

checking how to run the C preprocessor... gcc -E

checking for ANSI C header files... yes

checking for sys/wait.h that is POSIX.1 compatible... yes

checking for fcntl.h... yes

checking for sys/ioctl.h... yes

checking for unistd.h... yes

checking for working const... yes

checking for regcomp... yes

checking for strdup... yes

checking for strerror... yes

updating cache ./config.cache

creating ./config.status

creating Makefile

Making all in po

make[1]: Entering directory `/portage/tmp/portage/eject-2.0.13/work/eject-2.0.13/po'

make[1]: Nothing to be done for `all'.

make[1]: Leaving directory `/portage/tmp/portage/eject-2.0.13/work/eject-2.0.13/po'

make[1]: Entering directory `/portage/tmp/portage/eject-2.0.13/work/eject-2.0.13'

gcc -DPACKAGE=\"eject\" -DVERSION=\"2.0.13\" -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_UNISTD_H=1 -DHAVE_REGCOMP=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1  -I. -I.   -I/usr/src/linux -I/usr/src/linux/include -DDEFAULTDEVICE=\"cdrom\" -DGETOPTLONG  -Wall -O3  -mcpu=athlon-xp -march=athlon-xp -msse -mmmx -m3dnow -O2 -fomit-frame-pointer -frerun-loop-opt -pipe -c eject.c

gcc -DPACKAGE=\"eject\" -DVERSION=\"2.0.13\" -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_UNISTD_H=1 -DHAVE_REGCOMP=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1  -I. -I.   -I/usr/src/linux -I/usr/src/linux/include -DDEFAULTDEVICE=\"cdrom\" -DGETOPTLONG  -Wall -O3  -mcpu=athlon-xp -march=athlon-xp -msse -mmmx -m3dnow -O2 -fomit-frame-pointer -frerun-loop-opt -pipe -c volname.c

volname.c: In function `main':

volname.c:58: warning: implicit declaration of function `exit'

gcc -Wall -O3  -mcpu=athlon-xp -march=athlon-xp -msse -mmmx -m3dnow -O2 -fomit-frame-pointer -frerun-loop-opt -pipe  -o volname  volname.o  

In file included from /usr/src/linux/include/linux/cdrom.h:14,

                 from eject.c:68:

/usr/src/linux/include/asm/byteorder.h:14: error: syntax error before "__u32"

/usr/src/linux/include/asm/byteorder.h:28: error: syntax error before "__u64"

In file included from /usr/src/linux/include/linux/byteorder/little_endian.h:11,

                 from /usr/src/linux/include/asm/byteorder.h:57,

                 from /usr/src/linux/include/linux/cdrom.h:14,

                 from eject.c:68:

/usr/src/linux/include/linux/byteorder/swab.h:133: error: syntax error before "__u16"

/usr/src/linux/include/linux/byteorder/swab.h:146: error: syntax error before "__u32"

/usr/src/linux/include/linux/byteorder/swab.h:160: error: syntax error before "__u64"

make[1]: *** [eject.o] Error 1

make[1]: Leaving directory `/portage/tmp/portage/eject-2.0.13/work/eject-2.0.13'

make: *** [all-recursive] Error 1

!!! ERROR: sys-apps/eject-2.0.13 failed.

!!! Function src_compile, Line 418, Exitcode 2

!!! emake failed

```

----------

## ka0ttic

 *Quote:*   

> 
> 
> It appears that Bug #41856 is on the way to my completion in installation. Though I have a feeling that it is a duplicate of Bug #35088 in a way or another... 
> 
> 

 

Yeah, I had this problem too.. looks like it doesn't get along with 2.6 headers.  I just injected the package for now so I could get gnome installed.  I'll have to try out that 2.6 patch when I get a chance.

----------

## jpalko

Decided to skip compiling gnome required packages and just compile the normal setup of gdm + xfree + fvwm2, which seem to go okay.

DirectFB needed this for compiling (I have a nvidia based card, some others appear to have problems still)

```
# VIDEO_CARDS=nvidia emerge DirectFB
```

The following get stuck on my compilation attempts:

-aalib fails in the beginning

```
# emerge xine-ui

...

cd . && autoconf

FATAL ERROR: Autoconf version 2.50 or higher is required for this script

make: *** [configure] Error 2

make: *** Waiting for unfinished jobs....

!!! ERROR: media-libs/aalib-1.4_rc4-r2 failed.

!!! Function src_compile, Line 52, Exitcode 2

!!! (no error message)

# emerge -s autoconf

...

*  sys-devel/autoconf

      Latest version available: 2.59-r2

      Latest version installed: 2.59-r2

      Size of downloaded files: 1,336 kB

      Homepage:    http://www.gnu.org/software/autoconf/autoconf.html

      Description: Used to create autoconfiguration files

      License:     GPL-2

```

-alsa-tools gets pretty far, but fails on

```
In file included from /lib/modules/2.6.3-rc3/build/include/sound/ainstr_fm.h:29,

                 from sbiload.c:23:

/lib/modules/2.6.3-rc3/build/include/asm/byteorder.h:14: error: syntax error before "__u32"

/lib/modules/2.6.3-rc3/build/include/asm/byteorder.h:28: error: syntax error before "__u64"

In file included from /lib/modules/2.6.3-rc3/build/include/linux/byteorder/little_endian.h:11,

                 from /lib/modules/2.6.3-rc3/build/include/asm/byteorder.h:57,

                 from /lib/modules/2.6.3-rc3/build/include/sound/ainstr_fm.h:29,

                 from sbiload.c:23:

/lib/modules/2.6.3-rc3/build/include/linux/byteorder/swab.h:133: error: syntax error before "__u16"

/lib/modules/2.6.3-rc3/build/include/linux/byteorder/swab.h:146: error: syntax error before "__u32"

/lib/modules/2.6.3-rc3/build/include/linux/byteorder/swab.h:160: error: syntax error before "__u64"

make: *** [sbiload.o] Error 1

!!! ERROR: media-sound/alsa-tools-1.0.2 failed.

!!! Function src_compile, Line 51, Exitcode 2

!!! make failed

```

----------

## jpalko

 *jpalko wrote:*   

> 
> 
> ```
> # emerge xine-ui
> 
> ...

 

Quoting myself, this was already fixed with Bug #40926.

----------

## GTVincent

I have had success building a gentoo system with the 2.6 kernel-headers from stage 1, using the experimental livecd and stage1-x86-20040128.tar.bz2. The only package I've had to emerge with ~x86 was xfsprogs. system and Gnome emerged without a problem.on a Dell Dimension 4550.

[make.conf[

USE="-qt -kde -arts nptl gtk2"

CFLAGS="-O3 -mcpu=pentium4 -mmmx -pipe -msse -msse2 -mfpmath=sse -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"

CSSFLAGS=$CXXFLAGS

----------

## sebweb

I have this :

 *Quote:*   

> 
> 
> # /lib/libc-2.3.2.so
> 
> Inconsistency detected by ld.so: rtld.c: 1252: dl_main: Assertion `_rtld_local._dl_rtld_map.l_prev->l_next == _rtld_local._dl_rtld_map.l_next' failed!
> ...

 

glibc compiled with ntpl use flag.

What does it mean ?

----------

## sekh

i'm running into this problem too:

```
configure.in:1: error: possibly undefined macro: dnl

      If this token and others are legitimate, please use m4_pattern_allow.

      See the Autoconf documentation.

configure.in:138: error: do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'

!!! ERROR: net-misc/iputils-021109-r1 failed.

!!! Function src_compile, Line 52, Exitcode 1

!!! (no error message)

```

I've tried emerging flex and autoconf too. That didn't help the problem it keeps coming up. ACCEPT_KEYWORDS are set to ~x86

Like jpalko i've also checked out the bug in bugzilla, unfortunately the info in there didn't help either  :Sad: 

Any ideas on what can be done to get around this?

----------

## sekh

ok, i wasn't about to let some borked sourcecode for unstable ebuild of ip utils stop my install.

Apparently the old iputils-020927.ebuild works fine for me. So i went ahead and edited the two files

/usr/portage/net-misc/iputils/iputils-021109-r1.ebuild

/usr/portage/net-misc/iputils/iputils-021109.ebuild

removing ~x86 from the keyword listing in each.

This makes portage take the old 020927 version instead which works

i let emerge system run and then it installs this old version without any problems. Now i just hope that wont come back to bite me in the ass later  :Razz: 

After letting emerge system pass the iputils thing, i redited the two ebuilds putting ~x86 into the keywords list again.

This workaround seems ok for me so far (still emerging, it might fuck up later), but i guess as soon as my system gets running and i do an emerge -u world, it'll want to upgrade ip utils to the fubar versions again.

Does anyone know a solution to this, or do we just have to pray for an updated ebuild which doesn't have these errors?

----------

## yamakawa

Another success report w/o 2.6 headers, not from scratch.

I am using sys-kernel/linux-headers-2.4.22.

```
# uname -r

2.6.3-rc3
```

Still I get

```
# /lib/libc.so.6

GNU C Library stable release version 2.3.3, by Roland McGrath et al.

Copyright (C) 2004 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.

There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A

PARTICULAR PURPOSE.

Compiled by GNU CC version 3.3.2 20040119 (Gentoo Linux 3.3.2-r7, propolice-3.3-7).

Compiled on a Linux 2.6.2 system on 2004-02-09.

Available extensions:

        GNU libio by Per Bothner

        crypt add-on version 2.1 by Michael Glad and others

        NPTL 0.60 by Ulrich Drepper

        BIND-8.2.3-T5B

        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk

Thread-local storage support included.

Report bugs using the `glibcbug' script to <bugs@gnu.org>.
```

All I did was just jump into 2.6 kernels, emerged glibc w/ nptl flag set.  :Wink: 

----------

## sekh

my system finished installing too  :Smile: 

checking the libc.so.6 after boot i can also confirm that i have the NPTL in there  :Smile:  Now i just need to figure out a solution to that iputils thing  :Sad: 

----------

## jpalko

 *jpalko wrote:*   

> It appears that Bug #41856 is on the way to my completion in installation.
> 
> Well, but my bit onto the bug information in order to aid the cause. 
> 
> 

 

Got further with the patch in bug #41856 comment 3. Nice.

----------

## jmbaldwin

I'm having a simple problem.

bootstrap-2.6.sh gives me:

"Your portage version is too old. Please use a later stage1."

I'm using what I think is the latest Basic boot CD.

----------

## ka0ttic

 *jmbaldwin wrote:*   

> I'm having a simple problem.
> 
> bootstrap-2.6.sh gives me:
> 
> "Your portage version is too old. Please use a later stage1."
> ...

 

Are you using the stage 1 tar ball off the cd or are you downloading it?

----------

## jpalko

Nice, got through the whole compile.  :Smile: 

Only funny bit was once again cdrtools bug #30798 of removing the /usr/src/linux symlink for a moment and then compiling cdrtools and then resuming the gnome compilation...

----------

## panther

nice, i do the bootstraping now, no problems until now

----------

## MighMoS

I'm sorry if this has already been answered, but do NPTL and Nvidia still not play nicely, or is it safe for me to use NPTL now (with nvidia binary drivers)?

----------

## Lowspirit

 *MighMoS wrote:*   

> I'm sorry if this has already been answered, but do NPTL and Nvidia still not play nicely, or is it safe for me to use NPTL now (with nvidia binary drivers)?

 

Nvidia drivers (or rather the glx extension) works fine with NPTL since a couple of versions back so it's perfectly safe.

----------

## gcasillo

After a few minor obstacles, I'm up and running with 2.6.3-r1 and linux-headers-2.6.1. I had linux-headers-2.6.3 installed but had to drop down to 2.6.1 to get reiserfsprogs to compile. I also had to nuke some lines in the iputils ebuild that were choking on a m4 macro and preventing that package from installing at all. This is detailed and already corrected in bug report #42135.

I have successfully booted to console, and will begin the quest of making a workstation out of this box now. Thanks for the tips!

----------

## clockwise

 *sebweb wrote:*   

> I have this:

 

```

# /lib/libc-2.3.2.so

Inconsistency detected by ld.so: rtld.c: 1252: dl_main: Assertion `_rtld_local._dl_rtld_map.l_prev->l_next == _rtld_local._dl_rtld_map.l_next' failed!

```

anyone got an answer for this one yet? just found out my system is doing the same thing.[/code]

----------

## MighMoS

 *Lowspirit wrote:*   

>  *MighMoS wrote:*   I'm sorry if this has already been answered, but do NPTL and Nvidia still not play nicely, or is it safe for me to use NPTL now (with nvidia binary drivers)? 
> 
> Nvidia drivers (or rather the glx extension) works fine with NPTL since a couple of versions back so it's perfectly safe.

 Thank you very much!  This helps a lot!

----------

## Kow

I get the same error to clockwise.

----------

## ka0ttic

 *gcasillo wrote:*   

> After a few minor obstacles, I'm up and running with 2.6.3-r1 and linux-headers-2.6.1. I had linux-headers-2.6.3 installed but had to drop down to 2.6.1 to get reiserfsprogs to compile. I also had to nuke some lines in the iputils ebuild that were choking on a m4 macro and preventing that package from installing at all. This is detailed and already corrected in bug report #42135.
> 
> I have successfully booted to console, and will begin the quest of making a workstation out of this box now. Thanks for the tips!

 

You might want to try linux-headers-2.6.3-r1 (which if I'm not mistaken was only put in portage yesterday or the day before).  I also couldn't get reiserfsprogs compiled, but upgrading the headers did the trick.

HTH,

Aaron

----------

## jeffrice

 *clockwise wrote:*   

>  *sebweb wrote:*   I have this: 
> 
> ```
> 
> # /lib/libc-2.3.2.so
> ...

 

You should be able to fix this by doing

ACCEPT_KEYWORDS="~x86" emerge glibc

----------

## SkiCat

I get an error back when I try to emerge glibc.

     * You have "nptl" in your USE, but your kernel version or 

     * architecture does not support it!

  Using kernel 2.6.3-r1 and linux-headers 2.6.3.

 Any clues???

SkiCat

----------

## tweakt

Just a tip for those of you with portag 2.50+ (which SHOULD be all of you by now):

If you are running 2.6 you should do this:

Create '/etc/portage/package.keywords' and put this line in it:

```
sys-kernel/linux-headers -*
```

In addition, I have:

```
sys-libs/zlib ~x86

sys-kernel/linux-headers -*

sys-devel/gcc ~x86

x11-base/xfree ~x86

sys-libs/glibc ~x86

sys-devel/binutils ~x86

sys-devel/automake ~x86

app-emulation/wine ~x86

```

This automatically applies the ~x86 keyword to portage for any of those pakages. Also notice I apply the '-*' keyword for linux headers. No more editing the ebuild! 

Currently I have the following (all running perfectly stable):

```
gcc-3.3.3

glibc-2.3.3

xfree-4.3.99.902-r2

binutils-2.14.90.0.8-r1

automake-1.8.2

zlib-1.2.1-r2

wine-20040213 

linux-headers-2.6.3-r1

```

The bonus here is you will no longer need to do 'emerge --upgradeonly world', the packages will not get downgraded, in fact they will be automatically upgraded to their latest ~x86 versions, along with the rest of the world packages.

This in essence allows you to live _on_ the edge but not fly off of it (with a full ~x86 system)  :Smile: 

----------

## ka0ttic

tweakt, 

Great tip.  I've been wondering for a while how to do this.  I run an all ~x86 system so I don't have to worry about certain packages.  But editing the linux-headers ebuild was getting annoying   :Wink: 

Aaron

----------

## sebweb

 *Quote:*   

> 
> 
> You should be able to fix this by doing
> 
> ACCEPT_KEYWORDS="~x86" emerge glibc
> ...

 

Worked for me !

Thanks

----------

## DeTard

Ok, I THINK I got NPTL working correctly... to a point anyhow.  Everything seems stable, things are compiling without error (except for the obvious probs with unpatched ebuilds for kernel 2.6).  My problem though is that when I went to go verify that my glibc did indeed use NPTL I get this message:

# /lib/libc.so.6

Inconsistency detected by ld.so: rtld.c: 1252: dl_main: Assertion `_rtld_local._dl_rtld_map.l_prev->l_next == _rtld_local._dl_rtld_map.l_next' failed!

Now, I have seen that there was a suggestion (somewhere...  might have been one of my google searches) that I should "reemerge ld.so".

Well anyhow...  I did go ahead and reemerge binutils, glibc, and binutils once more to be on the safe side and I'm getting exactly the same message.  Well, at least it's consistent!    :Surprised: 

Anyhow, here's what I used:

binutils 2.14.90.0.7-r4

gcc 3.3.2-r5

glibc 2.3.2-r9

linux-headers 2.6.3-r1

Now, I DID do one strange thing on my computer...  I am running an Athlon 64 3000+ but seeing as how I've had problems here and there with compiling everything with 64-bit support, and especially since I don't have any drivers I can use for my R9700, I just did everything 32-bit.  BUT I did compile my kernel using the Opteron/Athlon64 CPU type.  I figured what the hell...  should hurt anything.  Now, if this is actually causing this error, that would baffle me considering that everything was compiled from the 2004.0 x86 LiveCD.

Any tips?  hints?

----------

## irf2003

since you brave gentooers have jumped into the nptl

bandwagon, it would very interesting to point out

the downside of such a move i.e. what gets broken in

this enviroment etc..

TIA

----------

## corsair

for me ALL packages work (xine only ~x86; all others x86)

Markus

----------

## ares

Problem compile DirectFB

VIDEO_CARDS='radeon' USE='-fusion' emerge DirectFB

```

ipe -march=athlon-xp -O3 -pipe -mcpu=athlon-xp -m3dnow -ffast-math -msse -fexpensive-optimizations -mfpmath=sse -falign-functions=4 -funroll-loops -mmmx -fomit-frame-pointer -DFUSION_FAKE -Werror-implicit-function-declaration -c fbdev.c  -fPIC -DPIC -o .libs/fbdev.o

In file included from fbdev.c:42:

/usr/include/linux/fb.h:345: error: syntax error before "atomic_t"

make[4]: *** [fbdev.lo] Error 1

make[4]: Leaving directory `/var/tmp/portage/DirectFB-0.9.20/work/DirectFB-0.9.20/src/core/fbdev'

make[3]: *** [all-recursive] Error 1

make[3]: Leaving directory `/var/tmp/portage/DirectFB-0.9.20/work/DirectFB-0.9.20/src/core'

make[2]: *** [all-recursive] Error 1

make[2]: Leaving directory `/var/tmp/portage/DirectFB-0.9.20/work/DirectFB-0.9.20/src'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/var/tmp/portage/DirectFB-0.9.20/work/DirectFB-0.9.20'

make: *** [all-recursive-am] Error 2

 

!!! ERROR: dev-libs/DirectFB-0.9.20 failed.

!!! Function src_compile, Line 70, Exitcode 2

!!! (no error message)

```

----------

## SmilyBorg

Hi all

I am building a new system using 2.6 and ntpl with the 2004.0 stage 1 tarball.  Rather than boot from cd and have my PC down for a while, I am running on top of my current gentoo system that runs a 2.4.22-gentoo-r7 kernel.

I have run into a few errors.

The first 2 times I tried, the install failed while configuring bash, saying that it could not test when cross compiling. I thought I had done somthing wrong so I tried again. During the lest attempt it failed configuring nano. The error is pasted bellow.

checking termios.h presence... yes

checking for termios.h... yes

checking for unistd.h... (cached) yes

checking for regex.h... (cached) yes

checking for broken regexec... configure: error: cannot run test program while cross compiling

See `config.log' for more details.

!!! ERROR: app-editors/nano-1.2.2 failed.

!!! Function econf, Line 365, Exitcode 1

!!! econf failed

I am running on an Athlon XP and am compiling for another athlon XP system so the cflags etc. are the same. 

Any ideas as to why it is complaining? Bellow is the output of emerge info from within the chroot if that helps.

Thanks

assassin portage # emerge info

Portage 2.0.50-r1 (hardened-x86-2004.0, gcc-3.3.2, glibc-2.3.2-r9, 2.4.22-gentoo-r7)

=================================================================

System uname: 2.4.22-gentoo-r7 i686 AMD Athlon(tm) XP 2000+

Gentoo Base System version 1.4.3.13

Autoconf: sys-devel/autoconf-2.58-r1

Automake:

ACCEPT_KEYWORDS="x86"

AUTOCLEAN="yes"

CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"

COMPILER="gcc3"

CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"

CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"

CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"

DISTDIR="/usr/portage/distfiles"

FEATURES="autoaddcvs ccache sandbox sfperms strict"

GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY=""

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="acl acpi alsa apm berkdb bidi caps cdr crypt cups curl dedicated dga directfb dvd dvdr ethereal fam fbcon foomaticdb gd gdbm icc icq imagemagick imap imlib innodb ipv6 jabber java jpeg kerberos krb4 lcms ldap libwww maildir mbox mcal mmx mpi msn mysql nas ncurses nls nocd nptl odbc oggvorbis oscar oss pam pdflib perl pic png postgres ppds prelude python readline samba sasl scanner slp snmp speex spell sqlite sse ssl svga tclck tcpd theora tiff truetype unicode usb wmf x86 xml xml2 yahoo zeo zlib"

----------

## ares

 *Quote:*   

> Automake: 

 

automake ?

----------

## calhoun

bump

----------

## OneOfMany

From SkiCat

 *Quote:*   

> I get an error back when I try to emerge glibc. 
> 
> * You have "nptl" in your USE, but your kernel version or 
> 
> * architecture does not support it! 
> ...

 

I'm seeing the same thing (with 2.6.1 headers and 2.6.3-r2 kernel).  Any ideas why?  I'm trying to fix a Seg violation on boot by recompiling glibc...

Could it be because I'm booting with the 2004.0 CD (which has a 2.4 kernel) to do the compile?

----------

## stonent

That error is appearing because you are running it on a system that does not have a 2.6.x kernel.  Remember when you bootstrap it compiles things using whatever headers that you emerged, so if you compile stuff using a 2.6 set of headers with nptl but have chrooted from a 2.4.x boot, the apps are going to crash after they are compiled.  

Also I tried using the old 2.6 live CD and things segfault in the middle of merging.  The only thing so far seems to work is to boot from a system that already has a working 2.6 kernel and chroot the target and compile.

I wish the 2004.0 livecd had 2.6 kernels instead of 2.4.x

Also compiling without nptl using 2.6 headers seems to work ok when chrooting from a 2.4.x system.  In that case, do the bootstrap-2.6.sh and get your system booting (i.e. bootstrap-2.6 emerge system, emerge your 2.6.x kernel, set up grub and reboot from the drive) then re-emerge glibc with nptl enabled or even better, emerge -D -e world to recompile everything. (May not really matter if glibc has been recompiled but I'm doing it just the same)

----------

## Sipi

Hi!

I've got a strange error after emerging glibc-2.3.3_pre20040207 with nptl enabled.

I've done this on two machine. On first one, everything works well. On second one (my home PC) everything went into ruin. Emerge went well, glibc installed. Everything works.

But after rebooting, devfsd didn't start, it complained about something devfs-se.so, which is part of selinux-small package, which doesn't exists now in portage, so I've removed it. But error is the same: it complains that libc.so.6 has undefined symbol, it is something GLIBC_2_xxxx, I don't remember exactly...  :Embarassed: 

I had to manually copy back libc.so.6 (libc-2.3.3) from old install without nptl). I found that when it was in non-working state, in /lib there was libpthread-0.10.so AND libpthread-0.60.so. I had to delete the 0.60 one to fully repair the system. I thought that it is some stupid remaining file, but now I see that on the working nptl system there is ONLY 0.60, with softlink libpthread.so.0 pointing to it. No 0.10...

So, what is going on here? I was unable to install glibc with nptl (kernel is 2.6). I tried with kernel-headers 2.4 and now installed 2.6. No success.

Is there some stalled files in /lib which confuses the system?!?

Sipi

----------

## Kow

Everything is running fine here using the "official" kernel sources from kernel.org (2.6.4-rc2-bk1), glibc 2.3.3_pre20040207.ebuild compiled on a 2.6.3 kernel running with no errors, in fact I have less errors than what I used to have.  :Smile: 

Also if you have Linux 2.4 headers installed the ebuild might have a problem understanding that it has to use 2.6 headers in your /usr/src directory and not the 2.4 headers...

If you are using NPTL I recommend using the 2.6 kernel header ebuilds and not keeping 2.4 and having glibc compile against the kernel headers straight from kernel.org as they have a few things here and there that cause things to break, specifically the sysctl.h patch, however there is a safeguard against this in the ebuilds but not everything else.

----------

## irf2003

 *stonent wrote:*   

> I wish the 2004.0 livecd had 2.6 kernels instead of 2.4.x

 

actually the 2004.0 livecd does have a 2.6x kernel

when booting, specify either

2.6 kernel with framebuffer

```

smp

```

2.6 kernel no framebuffer

```

smp-nofb

```

HTH

----------

## itkovian

Hello,

If anybody has problems with KDE when glibc is compiled with nptl, then you should (it worked for me, your mileage may vary) simply re-emerge QT.

The complete story:

I compiled 2.6.3-rc3 from gentoo-dev-sources with the linuxthreads glibc, then rebooted. Then I emerged glibc with nptl use flag set. Then I emerged gcc, and re-emerged glibc with the nptl use flag set. It turned out KDE segfaulted at a futex call, other apps (self-compiled, SPECcpu, java, Firefox, ...) were doing just fine. Then I re-emerged QT, and lo' for now, all is working once more. I did use the latest glibc (2.3.3-pre-blub).

Hope this can help some people out.

----------

## Sharpy

NPTL seems especially useful when you're running programs which access lots of small files, for example pan and if you've ever tried to play Vegastrike you will see the difference. I've had no trouble with NPTL, except with xmms, refused to run for some reason.

Nvidia's drivers work just fine with NPTL.

I would recommend enabling NPTL.

----------

## rieger

emerged glibc with nptl fine, systems seems to be running fine (mplayer, mozilla, everything works, except for WSAD...)

I even got the NPTL message when doing /lib/libc.so.6 works.

Then got interested and tried some other libX.so in the /lib dir

I did some random ones (libuuid.so, libnsl.so, libncurses.so)

everything  returns a "segmentation fault"!

But my system is working fine (as it seems, xmms fails f.e.)

What to do with this, are only a very few lib's needed, or should I do a emerge system?

info: kernel 2.6.3

----------

## sirro

 *rieger wrote:*   

> Then got interested and tried some other libX.so in the /lib dir
> 
> I did some random ones (libuuid.so, libnsl.so, libncurses.so)
> 
> everything  returns a "segmentation fault"!

 

Are you shure, that they should return something else? The libs in a stage1-chroot returned the same for me. (my own libs too of course)

 *rieger wrote:*   

> What to do with this, are only a very few lib's needed, or should I do a emerge system?

 

If this is not expected behavior, than emerge system does not fix this, cause I actually have reemerged system...

----------

## rieger

So from what I understand, the lib's return segfault's for your system too.

I can live with that, if it's normal behaviour.

Strange that 

libc.so.6 returns

```

GNU C Library stable release version 2.3.3, by Roland McGrath et al.

Copyright (C) 2004 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.

There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A

PARTICULAR PURPOSE.

Compiled by GNU CC version 3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7).

Compiled on a Linux 2.6.3 system on 2004-03-17.

Available extensions:

        GNU libio by Per Bothner

        crypt add-on version 2.1 by Michael Glad and others

        NPTL 0.60 by Ulrich Drepper

        BIND-8.2.3-T5B

        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk

Thread-local storage support included.

Report bugs using the `glibcbug' script to <bugs@gnu.org>.

```

and for as far as I know other .so or .so.[number]  files return the segfaults....

Hey, this one  /lib/libc-2.3.3.so, works too!

 :Question: 

strange 'expected'  behaviour, if you ask me

----------

## sirro

What I mean is: Are these files really expeded to run stand-alone?

ok the libc*.o seems to be an exception (for information-purpose), but should these files really return something when called from the shell?

----------

## Meaulnes

 *Quote:*   

> I get an error back when I try to emerge glibc.
> 
> * You have "nptl" in your USE, but your kernel version or
> 
> * architecture does not support it! 
> ...

 

I am also getting this. I did a stage one install using nptl and ~x86 where necessary. The bootstrap-2.6.sh seemd to work and when I do emerge -p linux-headers it tells me that i currently have linux-headers-2.6.4 installed and uname shows 2.6.4 for the kernel version. Even with the above error, I let the glibc recompile go through and /lib/libc.so.6 still didn't show NPTL. I did this this past weeknd on another machine and it worked nicely (not a single problem.) This time everything that everyone has talked about in this thread has happened. I am stumped ....

Here is an excerpt from my make.conf:

```

USE="nptl"

ACCEPT_KEYWORDS="~x86"

```

Is there a POSIX option somewhere in the kernel that I missed?

Any help will be appreciated.

----------

## laffel

@Meaulnes

Same error here with linux-headers 2.6.x until I changed the CHOST variable to i686-pc-linux-gnu in /etc/make.conf and re-emerged glibc again.

```

Available extensions:

        GNU libio by Per Bothner

        crypt add-on version 2.1 by Michael Glad and others

        NPTL 0.60 by Ulrich Drepper

        BIND-8.2.3-T5B

        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk

Thread-local storage support included.

```

----------

## Gentree

 *sebweb wrote:*   

> I have this :
> 
>  *Quote:*   
> 
> # /lib/libc-2.3.2.so
> ...

 

Yeah, can anyone tell us what this is all about ? I get a similiar thing when I tried /lib/libc.so.6  to check if I had NTPL.

I am doing a lot of system updating and kerenl mods and I want to know I'm not building on shakey foundations.

What's it all about?

----------

## Proton

 *Gentree wrote:*   

>  *sebweb wrote:*   I have this :
> 
>  *Quote:*   
> 
> # /lib/libc-2.3.2.so
> ...

 

Same thing here, I've tried some glibc rebuilds and it always spits out that error...

----------

## Meaulnes

Well I finally did get it. I ended up starting the stage 1 again from the beginning. The weird thing is that nothing went wrong the second time. IPutils built fine, and everything sailed right through. I am pretty sure that I did everything exactly the some (but I was working on about 6 things during the first try, so it is hard to say). That 2 successful bulds out of three attempts ....

----------

## phitoo

Picked that up on Google from a Linux From Scratch mailing list:

<quote>

if you try running /tools/lib/libc.so.6, you'll see it won't work due to

some assertions failing. http://ttervo.vectorstar.net/nptl contains a patch,

which fixes this problem. This is merely a cosmetic issue, and is optional.

<\quote>

I'll wait for 2.3.3 to go stable. Hopefully it's been fixed in that branch.

 *Proton wrote:*   

>  *Gentree wrote:*    *sebweb wrote:*   I have this :
> 
>  *Quote:*   
> 
> # /lib/libc-2.3.2.so
> ...

 

----------

## Bowyakka

 *rieger wrote:*   

> 
> 
> I even got the NPTL message when doing /lib/libc.so.6 works.
> 
> Then got interested and tried some other libX.so in the /lib dir
> ...

  i get this too for most libs

i think this one is funny though 

```

/lib/libSegFault.so

Segmentation fault

```

----------

## yngwin

Another success story here. I did a normal stage3 install, compiled the latest gentoo-dev-sources, reboot, add nptl useflag, emerge glibc, emerge gcc (to get the latest version), then emerge -e system. Worked fine! After that I did KDE, KOffice, OpenOffice-Ximian, Gimp2, wine - all compiled and work fine.   :Very Happy: 

----------

## Gentree

Hi yngwin,

glad to hear you had a nice clean run. Sounds like a couple of problems I had in recently moving to 2.6 kernel have been sorted out in the ebuilds. 

I'd be very interested to know if you have DMA on you drives. My system was fine under 2.4.2 but since I moved up to 2.6 both my disks come up without DMA

Could you check hdparm /dev/hda (or whatever) to see if you have dma active.

I have seen a few posts with the same pb, it seems we all have VIA based mobos. What's yours?

Thanks

----------

## Selecter

http://linuxdevices.com/articles/AT6753699732.html

It is written in this article that all apps should be compiled after compiled glibc with nptl

----------

## Gentree

Thanks for the link, that is a useful article.

In fact the DMA pb I was having was a due to a missgin kernel option . I detailed the solution in another thread.

I have rebuild most major packages but due to some annoying and difficult to resolve pbs with propolice I have been unable to do a full emerge system.

This may explain a few oddities where I am getting seg faults.

Thanks again for the link.

----------

## gungholady

 *Quote:*   

> I am also getting this. I did a stage one install using nptl and ~x86 where necessary. The bootstrap-2.6.sh seemd to work and when I do emerge -p linux-headers it tells me that i currently have linux-headers-2.6.4 installed and uname shows 2.6.4 for the kernel version. Even with the above error, I let the glibc recompile go through and /lib/libc.so.6 still didn't show NPTL. I did this this past weeknd on another machine and it worked nicely (not a single problem.) This time everything that everyone has talked about in this thread has happened. I am stumped ....
> 
> 

 

I tried the linux-headers-2.6.4 last night the recompile of glibc-2.3.3_pre20040207 did not complete. There were two errors. I checked https://bugs.gentoo.org and could find nothing there about this combination. I'll have to try it again to tell you just what the errors were. What do you have in your make.conf that could be different than mine that allowed glibc to finish compiling with these headers? 

Here is the relevant portions of mine:

USE="X gtk gtk2 gnome alsa kde cups samba arts nptl qt doc tetex"

CHOST="i686-pc-linux-gnu"

CFLAGS="-march=pentium3 -O2 -funroll-loops -pipe"

ACCEPT_KEYWORDS="~x86"

----------

## gungholady

I couldn't recreate the errors I was getting last night when I re-emerged glibc after changing my linux-headers to 2.6.4. The only thing I know of that was different this morning compared to last night was an update for file. I got that update. Re-emerged linux-headers-2.6.4 and then did emerge glibc. Glibc compiled without a problem.

----------

## irf2003

hey you guys have prompted me to jump into th nptl bandwagon.

i am building an image in a chrooted environment for mass deployment,

started with stage1 from the 2004.0 live cd, bootstraped

with ~x86, linux-headers-2.6.3-r1, and nptl.

everything went flowlessly so far, the only hick-ups

i had where not 2.6.x headers or npl related.

so far, kde, and mozilla have emerged, OOo1.1.1-rc1

currently emerging.  I cannot wait to test ride the image

when it's all done.

from what i could descern, for a smoother ride, one has to

go ~arch ab initio.

will let you guys know how it goes.

better go out and have some fun while OOo compiles.

good luck to everyone, and many thanks for all the hints

provided in this thread.

happy gentooing

----------

## øxygen

I think you should reemerge your whole system after upgrading glibc and gcc to ~x86 and nptl. Else you probably get some assertions fails while starting normal programms e.g. xmms.

----------

## irf2003

 *øxygen wrote:*   

> I think you should reemerge your whole system after upgrading glibc and gcc to ~x86 and nptl. Else you probably get some assertions fails while starting normal programms e.g. xmms.

 

there is no system to re-emerge, i am bootstrapping from

a stage1 tarbar, going ~arch, 2.6.x linux headers, and nptl.

the image built successfully, and it has been deployed on one of

the boxes for testing before mass deployment.

/lib/libc.so.6 yields:

```

bash-2.05b# /lib/libc.so.6

GNU C Library stable release version 2.3.3, by Roland McGrath et al.

Copyright (C) 2004 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.

There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A

PARTICULAR PURPOSE.

Compiled by GNU CC version 3.3.3 20040217 (Gentoo Linux 3.3.3, propolice-3.3-7).

Compiled on a Linux 2.6.3 system on 2004-03-26.

Available extensions:

        GNU libio by Per Bothner

        crypt add-on version 2.1 by Michael Glad and others

        NPTL 0.60 by Ulrich Drepper

        BIND-8.2.3-T5B

        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk

Thread-local storage support included.

Report bugs using the `glibcbug' script to <bugs@gnu.org>.

```

i will be using the nptl box this whole week to see how things go.

again many thanks to everyone who contributed to this thread

without which a move to nptl would never have been contemplated.

----------

## øxygen

sorry, my post shouldn't refer to yours, was just an general statement  :Wink: 

----------

## cca93014

I cant seem to get the NPTL stuff to compile. 

root@gentoo /usr/portage # ACCEPT_KEYWORDS="~x86" emerge glibc

Calculating dependencies ...done!

>>> emerge (1 of 1) sys-libs/glibc-2.2.5-r9 to /

>>> md5 src_uri  :Wink:  glibc-2.2.5.tar.bz2

>>> md5 src_uri  :Wink:  glibc-linuxthreads-2.2.5.tar.bz2

>>> Unpacking source...

>>> Unpacking glibc-2.2.5.tar.bz2 to /var/tmp/portage/glibc-2.2.5-r9/work

I have

USE="-gtk libgd nptl gd jpeg png gif xml tiff gd-external ssl apache2 -apache postgres -gnome -kde 3dnow mmx innodb -X -alsa"

in my make.conf, and 

sys-kernel/linux-headers -*

in my /etc/portage/package.keywords. I'm running a 2.6.1 kernel:

root@gentoo /etc/portage # uname -a

Linux gentoo 2.6.1 #5 Wed Feb 4 12:33:51 GMT 2004 i686 Pentium III (Coppermine) GenuineIntel GNU/Linux

Any ideas?

----------

## Talornin

I recompiled glibc with nptl use flags. Everything seemed to work fine, xmms and other apps with several threads where using only one. I did get this error as many otheres do:

# /lib/libc-2.3.2.so 

Inconsistency detected by ld.so: rtld.c: 1252: dl_main: Assertion `_rtld_local._dl_rtld_map.l_prev->l_next == _rtld_local._dl_rtld_map.l_next' failed!

But found from the article posted previously in this thread that "getconf GNU_LIBPTHREAD_VERSION" will return what threading libs you are using. So it seems that the inconsistency error is just cosmetical.

My problems started when I tried to run mplayer. Segfault (I did get a seg fault when closing xmms too, even after recompiling, but it didnt affect anything so I didnt bother to investigate more). No matter what version or with which cflags/user flags I used I gor the same error.

mplayer was the only app I couldnt get working, but recompiling of xorg xserver and XFree86 4.3 and 4.4 also failed (but the xorg xserver I had installed worked). After some time I decided to recompile glibc with -nptl and go back. I need mplayer and since the xservers did not want to recompile something is obviously not working right.

I usualy like new and bleeding edge things, but im gonna leave nptl for a while  :Smile: 

Info: kernel 2.6.4 (bootsplash patched), glibc: 2.3.2-r9, GCC: 3.3.2-r5, Headers: 2.4.21

If anyone have any ideas on how I could solve/work around my problems id apprechiate any help and be happy to try again  :Very Happy: 

----------

## bombcar

I was getting that segfault in xmms too, so I went to xmms-1.2.9-r2.ebuild

(1.2.10 died for me, dunno why).

This was without nptl, mind you. I'll report back after this recompile of everything.  :Smile: 

----------

## Kow

At the end of the ./configure progress you should see "Configuring in NPTL", it goes by fast when emerging so scroll the scrollbar up a little and look around where it makes the makefiles. At first I thought it wasnt either when it was downloading linux-threads, but it doesnt even touch the package after the downloading and extracting part.  :Smile: 

----------

## cca93014

Hmmm. Still cant get it working. What version of the headers do I need? Do I need to be careful about where the /usr/src/symlink is pointing? 

Any further ideas?

----------

## jonaswidarsson

umm...

I've got an interesting one:

```
bash-2.05b# /lib/libc.so.6

Inconsistency detected by ld.so: rtld.c: 1252: dl_main: Assertion `_rtld_local._dl_rtld_map.l_prev->l_next == _rtld_local._dl_rtld_map.l_next' failed!

bash-2.05b# ldconfig

bash-2.05b# /lib/libc.so.6

Inconsistency detected by ld.so: rtld.c: 1252: dl_main: Assertion `_rtld_local._dl_rtld_map.l_prev->l_next == _rtld_local._dl_rtld_map.l_next' failed!

bash-2.05b#

```

And I have NOT tried to do anything with nptl yet.

Hmm...

I am in this thread because of this:

https://forums.gentoo.org/viewtopic.php?p=999779

I am wondering if just reemerging glibc will do for me...

----------

## irf2003

 *cca93014 wrote:*   

> Hmmm. Still cant get it working. What version of the headers do I need? Do I need to be careful about where the /usr/src/symlink is pointing? 
> 
> Any further ideas?

 

it is not clear where you are starting from.

for a smooth ride, boot from a 2004.0 cd, specify smp, so that you will boot with a 2.6 kernel, start from a stage1 tarbar, umask the 2.6

headers, modify your /etc/make.conf i.e. CHOST, C(XX)FLAGS,

ACCEPT_KEYWORDS="~x86" USE="nptl" and other use flags etc...

then do

```

/usr/portage/scripts/bootstrap-2.6.sh

emerge system

```

as well as the usual stuff to complete the install of gentoo.

it is not a good idea to have "=sys-kernel/linux-headers -*" in

your /etc/portage/package.keywords, it is wiser to be more specific,

if you are sure that the masked linux headers

are known to work and not break many packages later on

then by all means add it to your /etc/portage/package.keywords

file.  FYI I have the followings in package.keywords:

=sys-kernel/linux-headers-2.6.3-r1 -*

the reason,  I find the 2.6.4 kernels broken, and I have

hard masked them.

hth

PS should you have any further problems, please peruse the forum,

if this should not resolve it, be specific and am sure that many

a gentooer on this or other threads will be eager to assits.

good luck, and happy gentooing

----------

## cca93014

Hi There,

Apologies; I should have stated that this is not a new machine build, but an upgrade of glibc. Is this doable? I am running kernel 2.6.1 at the moment...

Ben

----------

## BNoise

wouldnt be better to do(i did it like this):

```

/etc/portage/package.keywords

sys-libs/zlib ~x86

sys-kernel/linux-headers -*

sys-devel/gcc ~x86

x11-base/xfree ~x86

sys-libs/glibc ~x86

sys-devel/binutils ~x86

sys-devel/automake ~x86

app-emulation/wine ~x86

/etc/portage/package.mask

=sys-kernel/linux-headers-2.6.4

```

or is it the same?

----------

## bombcar

NOTE!

The Assertion failed error you get when trying to execute:

```

/lib/libc.so.6

Inconsistency detected by ld.so: rtld.c: 1252: dl_main: Assertion `_rtld_local._dl_rtld_map.l_prev->l_next == _rtld_local._dl_rtld_map.l_next' failed!

```

 is a harmless bug in the latest unmasked version in portage!

It shouldn't hurt anything, but if you upgrade to the masked version of glibc it goes away.

----------

## irf2003

 *cca93014 wrote:*   

> Hi There,
> 
> Apologies; I should have stated that this is not a new machine build, but an upgrade of glibc. Is this doable? I am running kernel 2.6.1 at the moment...
> 
> Ben

 

if it is doable, i am afraid i don't know how this may be done,

to re-iterate it is wiser to startt from scratch, you will have less

problems this way.  in any case, you will have to re-emerge

your whole system, so you might as well start with bootstrapping.

you may want to backup whatever config files you hand crafted

for later use, this will save you from tinkering with them again.

should you have any other issues i would just like you to know

that we all are more than eager to help

hth

and the very best of luck.

----------

## sapphirecat

I did a stage 1 install from a working system with 2.6. (Changed root FS type, moved its partition, general cleanup, etc.) Problems I ran into:

valgrind appears broken with 2.6 headers, even ~x86.

strace works only with ~x86.

gtk-engines dependencies are stuffed up: https://bugs.gentoo.org/show_bug.cgi?id=24439

And for anyone wondering, NPTL cannot be built against 2.4 headers. The glibc ebuild cheats and pokes around in /usr/src/linux to find the 2.6 headers when building with NPTL. (This information courtesy rac in #gentoo.)

----------

## BNoise

 *cca93014 wrote:*   

> Hi There,
> 
> Apologies; I should have stated that this is not a new machine build, but an upgrade of glibc. Is this doable? I am running kernel 2.6.1 at the moment...
> 
> Ben

 

Yes its doable, i am running from an old instalation.

----------

## jonaswidarsson

So, the glibc is used by other things. I just don't know to which extent or how it is used. I assume everything in the system depends on it, and that most things use it dynamically.

If so, it should be sufficient to rebuild glibc, and the rest of the system should gain performance from glibc's new behaviour.

Yet, it must be at least one case where the glibc cannot be dynamically used, in the kernel, because it is loaded before the root file system is mounted.

So that makes me believe I really have to rebuild the kernel to let everything gain performance.

Still there is two more possibilities:

If programs depend on glibc in a static way, they have to be rebuilt as soon as I rebuild the glibc with nptl support.

If the compilers output depend on the nptl features of glibc, every program using threads in the system has to be rebuilt to take advantage of the new threading characteristics.

Please, enlighten me.

I am trying to enable nptl from a fully installed system, and I won't reinstall.

I have recompiled glibc, and it seems working:

```
bash-2.05b# getconf GNU_LIBPTHREAD_VERSION

NPTL 0.60

bash-2.05b#
```

I am about to rebuild the kernel again.

After that I hope there is not much more need to rebuild anything, for this matter.

EDIT:

BTW, I have not enabled ~arch anywhere yet.

----------

## Remenic

It's not working really well for me... xmms crashes and so does mplayer. Will an 'emerge -e system' fix this?

----------

## Talornin

Wohoo!

Decided to try a fresh install and used bootstrap-2.6.sh and 2.6.4 headers. This time everything works like a charm! NPTL is enabeled and everything compiles and works great!  :Very Happy:  Not even segfault with xmms! 

Maybe its better and safer to just do a fresh install than remerge glibc.

----------

## øxygen

 *Talornin wrote:*   

> 
> 
> Maybe its better and safer to just do a fresh install than remerge glibc.

 

i already recommended to recompile the whole world, that does also work  :Cool: 

----------

## Talornin

 *øxygen wrote:*   

>  *Talornin wrote:*   
> 
> Maybe its better and safer to just do a fresh install than remerge glibc. 
> 
> i already recommended to recompile the whole world, that does also work 

 

Well, I couldnt do that. Several packaged, Pango, Libglade, Mplayer to mention some, failed, If I where to emerge -e world Id have to sit and stare at the whole process to find which packaged that failed. 

But whatever! Everything is working smooth for me now  :Smile: 

----------

## irf2003

 *øxygen wrote:*   

>  *Talornin wrote:*   
> 
> Maybe its better and safer to just do a fresh install than remerge glibc. 
> 
> i already recommended to recompile the whole world, that does also work 8)

 

if i am not mistaken, emerge -e world will not do it.

you will end up with a semi-broken system, and it will be

suttle and hard to detect, you may later on get all sort of weird problem.  it is analgous to changing the CHOST, and doing

say emerge -e world.  the safest and easiest way to go about

it is with a clean stage1 bootstrap install

i stand to be corrected of course

hth

----------

## øxygen

I've done emerge -e system and after emerge -e world. Everything runs fine now.

----------

## Remenic

If xmms, mplayer, glxgears or ANY opengl-supporting app segfaults, try re-emerging nvidia-glx. That fixed it for me. emerge -e is NOT needed.

----------

## Ultrix

NPTL is now working for me.  I did a fresh install, 2004.0 CD, the SMP kernel, and under the recomendation of this thread, I unmasked linux-headers-2.6.3-r1 and not 2.6.4.  The only thing that I did not do was build my system with ARCH="~x86", everything was build as x86.  I do get the cosmetic issue with libc.so.6, but "getconf GNU_LIBPTHREAD_VERSION" works fine.  Mplayer and xmms both work fine, and I am having no problems otherwise.

I'm Running:

linux-headers-2.6.3-r1

gcc-3.3.2-r5

glibc-2.3.2-r9

gentoo-dev-sources 2.6.3-r2

----------

## Kow

IMPORTANT:

When I tried doing a bootstrap-2.6 or just simple glibc compile using glibc-2.3.3_pre20040207 during a 2004.0 install on a x86_64 architecture (amd64) using 2.6.4 headers it failed with a bunch of already defined errors, however using 2.6.3-r1 it worked fine. I recommend using 2.6.3-r1 headers for now, as it fixed all my glibc compilation errors which were not correct by any CFLAG or arch mask or even glibc version changing modifications.

----------

## brettlpb

Hmm, last night I did a new install.

I added the use flag, I unmasked headers-2.6.3-r1, I used ~x86 and I did bootstrap-2.6

```

/lib/glibc.so.6

GNU C Library stable release version 2.3.3, by Roland McGrath et al.

Copyright (C) 2004 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.

There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A

PARTICULAR PURPOSE.

Compiled by GNU CC version 3.3.3 20040217 (Gentoo Linux 3.3.3, propolice-3.3-7).Compiled on a Linux 2.6.3 system on 2004-04-07.

Available extensions:

        GNU libio by Per Bothner

        crypt add-on version 2.1 by Michael Glad and others

        linuxthreads-0.10 by Xavier Leroy

        BIND-8.2.3-T5B

        libthread_db work sponsored by Alpha Processor Inc

        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk

Report bugs using the `glibcbug' script to <bugs@gnu.org>.

```

I guess I don't really mind if nptl isn't working... the question is, since I don't see it here, should I take it out of my use flags?  Are there any apps that use the nptl flag that won't compile right for non-nptl systems?

----------

## irf2003

brettlpb, are you sure you had nptl in your USE falgs when

you bootstrapped?

can you post the output of

```

emerge info

```

hth

----------

## monkey89

Just a little success report:

Installed Gentoo by adding nptl to the use flags as the original doc said, emerge sync'd, made the /etc/portage directory, made a text file package.keywords and added:

sys-libs/zlib ~x86

sys-kernel/linux-headers -*

sys-devel/gcc ~x86

x11-base/xfree ~x86

sys-libs/glibc ~x86

sys-devel/binutils ~x86

sys-devel/automake ~x86

app-emulation/wine ~x86 

(Actually, I removed the wine and xfree lines, since this is a server machine)

Then, I used bootstrap-2.6.sh, did an emerge system, and for the kernel, used "emerge =development-sources-2.6.5", since it was going to install 2.6.6_rc2 and I prefer stability (and matching headers), but 2.6.6_rc2 should be fine.  Rebooted and things worked fine, so I did "emerge glibc", restarted when finished, and when I turned it back on, did "/lib/libc.so.6" and it showed nptl as installed.

Just keeping people who are just now reading this thread up to date on what can be done to install nptl at this point, since there are quite a few posts in here.

----------

## jonaswidarsson

 *monkey89 wrote:*   

> Just a little success report:

 I have managed to do it as well, on an existing install.

I have not bootstrapped with the 2.6 script. I used the 2.4 script when installing it some months ago.

I added those lines in that file too, except for gcc. Then a simple emerge -e world made a success.

----------

## nadin

Why do I only get the benefit if I do a emerge -e world?

Nadin

----------

## t_2199

 *nadin wrote:*   

> Why do I only get the benefit if I do a emerge -e world?
> 
> Nadin

 

No, you only need to recompile glibc and all progs which are using linuxthreads. After you have recompiled them theyll use NPTL (correct me If Im wrong)

----------

## nadin

So I would use emerge -e world since I have no idea whcih programs are using linuxthreads?

Nadin

----------

## Gentree

Just be caseful doing update world. It can be catastrophic.

do emerge -p world to see what can be updated and search forum for threads about update world going wrong . Best to do bit by bit.

HTH

----------

## nadin

Is there any way of getting it to work correctly when boostraping or do I have to wait for a 2.6 live cd to come out?

I wonder if Knoppix with the 2.6 kernel might save me the trouble have having to reemerge everything after ther initial reboot

----------

## ka0ttic

 *nadin wrote:*   

> Is there any way of getting it to work correctly when boostraping or do I have to wait for a 2.6 live cd to come out?
> 
> I wonder if Knoppix with the 2.6 kernel might save me the trouble have having to reemerge everything after ther initial reboot

 

Just boot the 'smp' or 'smp-nofb' kernel on the gentoo livecd.  This will provide you with a 2.6 kernel.

----------

## nadin

crap, I just finished stage 3 on my laptop

oh well,

at least ill know for next time

Thanks,

Nadin

----------

## seltrus

Hi all!  I have a couple of gentoo boxen and I decided to give the 2.6 headers a try.  Everything went smoothly until I tried to emerge xorg-x11 which produced the following errors.  This is the xorg-x11-6.7.0-r1 build, but the 6.7.0 build fails as well.  It seems to be complaining about the headers.  I built the box using the guide in this thread as a reference.

```
gcc -c -march=athlon-xp -O2 -pipe -fomit-frame-pointer -fno-strict-aliasing -ansi -pedantic -Wno-return-type -w    -fno-merge-constants -I../../../../../../programs/Xserver/hw/xfree86/common -I../../../../../../programs/Xserver/hw/xfree86/os-support -I. -I../../../../../../programs/Xserver/include            -I../../../../../../exports/include/X11 -I../../../../../../include/extensions -I../../../../../../programs/Xserver/hw/xfree86/os-support/shared  -I../../../../../.. -I../../../../../../exports/include   -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE                          -D_BSD_SOURCE -D_SVID_SOURCE                             -D_GNU_SOURCE                           -DSHAPE -DXINPUT -DXKB -DLBX -DXAPPGROUP       -DXCSECURITY -DTOGCUP   -DXF86BIGFONT -DDPMSExtension    -DPIXPRIV -DPANORAMIX   -DRENDER -DRANDR -DGCCUSESGAS -DAVOID_GLYPHBLT -DPIXPRIV -DSINGLEDEPTH                                 -DXFreeXDGA -DXvExtension                               -DXFree86LOADER  -DXFree86Server       -DXF86VIDMODE                            -DXvMCExtension                        -DSMART_SCHEDULE                                 -DBUILDDEBUG -DXResExtension   -DX_BYTE_ORDER=X_LITTLE_ENDIAN                           -DXORG_VERSION_CURRENT="(((6) * 10000000) + ((7) * 100000) + ((0) * 1000) + 0)" -DNDEBUG   -DFUNCPROTO=15 -DNARROWPROTO   -DHAS_MTRR_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC  -DXVENDORNAME='"The X.Org Foundation"' -DXVENDORNAMESHORT='"X.Org"'  lnx_KbdMap.c

In file included from /usr/include/linux/bitops.h:4,

                 from /usr/include/asm/cpufeature.h:10,

                 from /usr/include/asm/processor.h:18,

                 from /usr/include/linux/prefetch.h:14,

                 from /usr/include/linux/list.h:5,

                 from /usr/include/linux/wait.h:12,

                 from /usr/include/linux/keyboard.h:4,

                 from lnx_KbdMap.c:108:

/usr/include/asm/bitops.h:242: error: syntax error before "int"

In file included from /usr/include/asm/cpufeature.h:10,

                 from /usr/include/asm/processor.h:18,

                 from /usr/include/linux/prefetch.h:14,

                 from /usr/include/linux/list.h:5,

                 from /usr/include/linux/wait.h:12,

                 from /usr/include/linux/keyboard.h:4,

                 from lnx_KbdMap.c:108:

/usr/include/linux/bitops.h:12: error: syntax error before "int"

/usr/include/linux/bitops.h:87: error: syntax error before "unsigned"

/usr/include/linux/bitops.h:96: error: syntax error before "unsigned"

/usr/include/linux/bitops.h:104: error: syntax error before "unsigned"

/usr/include/linux/bitops.h:111: error: syntax error before "unsigned"

/usr/include/linux/bitops.h:127: error: syntax error before "unsigned"

In file included from /usr/include/asm/processor.h:19,

                 from /usr/include/linux/prefetch.h:14,

                 from /usr/include/linux/list.h:5,

                 from /usr/include/linux/wait.h:12,

                 from /usr/include/linux/keyboard.h:4,

                 from lnx_KbdMap.c:108:

/usr/include/asm/msr.h:27: error: syntax error before "void"

In file included from /usr/include/asm/processor.h:20,

                 from /usr/include/linux/prefetch.h:14,

                 from /usr/include/linux/list.h:5,

                 from /usr/include/linux/wait.h:12,

                 from /usr/include/linux/keyboard.h:4,

                 from lnx_KbdMap.c:108:

/usr/include/asm/system.h:134: error: syntax error before "unsigned"

/usr/include/asm/system.h:166: error: syntax error before "void"

/usr/include/asm/system.h:182: error: syntax error before "void"

/usr/include/asm/system.h:190: error: syntax error before "void"

/usr/include/asm/system.h:211: error: syntax error before "unsigned"

/usr/include/asm/system.h:246: error: syntax error before "unsigned"

In file included from /usr/include/linux/prefetch.h:14,

                 from /usr/include/linux/list.h:5,

                 from /usr/include/linux/wait.h:12,

                 from /usr/include/linux/keyboard.h:4,

                 from lnx_KbdMap.c:108:

/usr/include/asm/processor.h:130: error: syntax error before "void"

/usr/include/asm/processor.h:143: error: syntax error before "unsigned"

/usr/include/asm/processor.h:153: error: syntax error before "unsigned"

/usr/include/asm/processor.h:163: error: syntax error before "unsigned"

/usr/include/asm/processor.h:173: error: syntax error before "unsigned"

/usr/include/asm/processor.h:211: error: syntax error before "void"

/usr/include/asm/processor.h:221: error: syntax error before "void"

/usr/include/asm/processor.h:273: error: syntax error before "void"

/usr/include/asm/processor.h: In function `__monitor':

/usr/include/asm/processor.h:277: error: `asm' undeclared (first use in this function)

/usr/include/asm/processor.h:277: error: (Each undeclared identifier is reported only once

/usr/include/asm/processor.h:277: error: for each function it appears in.)

/usr/include/asm/processor.h:277: error: syntax error before "volatile"

/usr/include/asm/processor.h: At top level:

/usr/include/asm/processor.h:282: error: syntax error before "void"

/usr/include/asm/processor.h: In function `__mwait':

/usr/include/asm/processor.h:285: error: `asm' undeclared (first use in this function)

/usr/include/asm/processor.h:285: error: syntax error before "volatile"

/usr/include/asm/processor.h: At top level:

/usr/include/asm/processor.h:457: error: syntax error before "void"

/usr/include/asm/processor.h:554: error: syntax error before "void"

/usr/include/asm/processor.h:629: error: syntax error before "void"

/usr/include/asm/processor.h: In function `prefetch':

/usr/include/asm/processor.h:631: error: `asm' undeclared (first use in this function)

/usr/include/asm/processor.h:631: error: syntax error before "volatile"

/usr/include/asm/processor.h: At top level:

/usr/include/asm/processor.h:643: error: syntax error before "void"

/usr/include/asm/processor.h: In function `prefetchw':

/usr/include/asm/processor.h:645: error: `asm' undeclared (first use in this function)

/usr/include/asm/processor.h:645: error: syntax error before "volatile"

In file included from /usr/include/linux/list.h:5,

                 from /usr/include/linux/wait.h:12,

                 from /usr/include/linux/keyboard.h:4,

                 from lnx_KbdMap.c:108:

/usr/include/linux/prefetch.h: At top level:

/usr/include/linux/prefetch.h:58: error: syntax error before "void"

In file included from /usr/include/linux/wait.h:12,

                 from /usr/include/linux/keyboard.h:4,

                 from lnx_KbdMap.c:108:

/usr/include/linux/list.h:45: error: syntax error before "void"

/usr/include/linux/list.h:63: error: syntax error before "void"

/usr/include/linux/list.h:76: error: syntax error before "void"

/usr/include/linux/list.h:87: error: syntax error before "void"

/usr/include/linux/list.h:113: error: syntax error before "void"

/usr/include/linux/list.h:134: error: syntax error before "void"

/usr/include/linux/list.h:147: error: syntax error before "void"

/usr/include/linux/list.h:159: error: syntax error before "void"

/usr/include/linux/list.h:190: error: syntax error before "void"

/usr/include/linux/list.h:200: error: syntax error before "void"

/usr/include/linux/list.h:211: error: syntax error before "void"

/usr/include/linux/list.h:222: error: syntax error before "void"

/usr/include/linux/list.h:233: error: syntax error before "int"

/usr/include/linux/list.h:250: error: syntax error before "int"

/usr/include/linux/list.h:256: error: syntax error before "void"

/usr/include/linux/list.h:275: error: syntax error before "void"

/usr/include/linux/list.h:288: error: syntax error before "void"

/usr/include/linux/list.h:495: error: syntax error before "int"

/usr/include/linux/list.h:500: error: syntax error before "int"

/usr/include/linux/list.h:505: error: syntax error before "void"

/usr/include/linux/list.h:514: error: syntax error before "void"

/usr/include/linux/list.h:540: error: syntax error before "void"

/usr/include/linux/list.h:546: error: syntax error before "void"

/usr/include/linux/list.h:556: error: syntax error before "void"

/usr/include/linux/list.h:586: error: syntax error before "void"

/usr/include/linux/list.h:599: error: syntax error before "void"

/usr/include/linux/list.h:608: error: syntax error before "void"

In file included from /usr/include/linux/spinlock.h:39,

                 from /usr/include/linux/wait.h:15,

                 from /usr/include/linux/keyboard.h:4,

                 from lnx_KbdMap.c:108:

/usr/include/asm/spinlock.h:72: error: syntax error before "void"

/usr/include/asm/spinlock.h:104: error: syntax error before "int"

/usr/include/asm/spinlock.h:114: error: syntax error before "void"

/usr/include/asm/spinlock.h:172: error: syntax error before "void"

/usr/include/asm/spinlock.h: In function `_raw_read_lock':

/usr/include/asm/spinlock.h:177: error: `asm' undeclared (first use in this function)

/usr/include/asm/spinlock.h:177: error: syntax error before "volatile"

/usr/include/asm/spinlock.h: At top level:

/usr/include/asm/spinlock.h:180: error: syntax error before "void"

/usr/include/asm/spinlock.h: In function `_raw_write_lock':

/usr/include/asm/spinlock.h:185: error: `asm' undeclared (first use in this function)

/usr/include/asm/spinlock.h:185: error: syntax error before "volatile"

/usr/include/asm/spinlock.h: At top level:

/usr/include/asm/spinlock.h:191: error: syntax error before "int"

In file included from /usr/include/linux/keyboard.h:4,

                 from lnx_KbdMap.c:108:

/usr/include/linux/wait.h:56: error: syntax error before "void"

/usr/include/linux/wait.h:62: error: syntax error before "void"

/usr/include/linux/wait.h:69: error: syntax error before "void"

/usr/include/linux/wait.h:77: error: syntax error before "int"

/usr/include/linux/wait.h:86: error: syntax error before "void"

/usr/include/linux/wait.h:94: error: syntax error before "void"

/usr/include/linux/wait.h:100: error: syntax error before "void"

/usr/include/linux/wait.h:206: error: syntax error before "void"

/usr/include/linux/wait.h:216: error: syntax error before "void"

make[7]: *** [lnx_KbdMap.o] Error 1

make[7]: Leaving directory `/var/tmp/portage/xorg-x11-6.7.0-r1/work/xc/programs/Xserver/hw/xfree86/os-support/linux'

make[6]: *** [linux] Error 2

make[6]: Leaving directory `/var/tmp/portage/xorg-x11-6.7.0-r1/work/xc/programs/Xserver/hw/xfree86/os-support'

make[5]: *** [all] Error 2

make[5]: Leaving directory `/var/tmp/portage/xorg-x11-6.7.0-r1/work/xc/programs/Xserver/hw/xfree86'

make[4]: *** [hw/xfree86] Error 2

make[4]: Leaving directory `/var/tmp/portage/xorg-x11-6.7.0-r1/work/xc/programs/Xserver'

make[3]: *** [all] Error 2

make[3]: Leaving directory `/var/tmp/portage/xorg-x11-6.7.0-r1/work/xc/programs'make[2]: *** [all] Error 2

make[2]: Leaving directory `/var/tmp/portage/xorg-x11-6.7.0-r1/work/xc'

make[1]: *** [World] Error 2

make[1]: Leaving directory `/var/tmp/portage/xorg-x11-6.7.0-r1/work/xc'

make: *** [World] Error 2

 

!!! ERROR: x11-base/xorg-x11-6.7.0-r1 failed.

!!! Function src_compile, Line 706, Exitcode 2

!!! (no error message)

```

Here is my /libc/libc.so.6 info:

```
GNU C Library stable release version 2.3.3, by Roland McGrath et al.

Copyright (C) 2004 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.

There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A

PARTICULAR PURPOSE.

Compiled by GNU CC version 3.3.3 20040412 (Gentoo Linux 3.3.3-r6, ssp-3.3.2-2, pie-8.7.6).

Compiled on a Linux 2.6.7 system on 2004-06-20.

Available extensions:

        GNU libio by Per Bothner

        crypt add-on version 2.1 by Michael Glad and others

        NPTL 0.61 by Ulrich Drepper

        BIND-8.2.3-T5B

        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk

Thread-local storage support included.

Report bugs using the `glibcbug' script to <bugs@gnu.org>.

```

Any ideas?

----------

## ryszardzonk

seltrus wrote:

 *Quote:*   

> Hi all! I have a couple of gentoo boxen and I decided to give the 2.6 headers a try. Everything went smoothly until I tried to emerge xorg-x11 which produced the following errors. This is the xorg-x11-6.7.0-r1 build, but the 6.7.0 build fails as well. It seems to be complaining about the headers. I built the box using the guide in this thread as a reference. 

 

i have exactly the same prolem as You do. Except unlike You I had several issues before. It didnt start there. Progs like util-linux, iputils, sash, kbd (parts of emerge system) whould not compile because of the missing /usr/include/linux/autoconf.h. I read on forum that partial fix to it would be coping autoconf.h form your /usr/src/linux there. It worked for util-linux, iputils, kbd. Sash still didnt compile.

my system

glibc 2004 06 19 + nptl + linux-headers 2.6.7

kernel 2.6.6-love5

Sash

----------------------------------

original compile problem

 *Quote:*   

> 
> 
> >>> Source unpacked.
> 
> gcc -march=pentium3 -Os -pipe -fomit-frame-pointer -momit-leaf-frame-pointer -Wall -Wmissing-prototypes -DHAVE_GZIP=1 -DHAVE_LINUX_ATTR=1 -DHAVE_LINUX_MOUNT=1 -DHAVE_BSD_MOUNT=0 -DMOUNT_TYPE='"ext3"' -DHAVE_READLINE   -c -o sash.o sash.c
> ...

 

----------------------------------

Sash -- copied autoconf.h

----------------------------------

 *Quote:*   

> 
> 
> >>> Source unpacked.
> 
> gcc -march=pentium3 -Os -pipe -fomit-frame-pointer -momit-leaf-frame-pointer -Wall -Wmissing-prototypes -DHAVE_GZIP=1 -DHAVE_LINUX_ATTR=1 -DHAVE_LINUX_MOUNT=1 -DHAVE_BSD_MOUNT=0 -DMOUNT_TYPE='"ext3"' -DHAVE_READLINE   -c -o sash.o sash.c
> ...

 

You notice if fails on /usr/include/linux/ext2_fs_sb.h. Simply reemerging e2fsprogs again would not help. What i did is 

```
 cp /usr/incude/ext2fs/ext2* /usr/include/linux 
```

. After that it did. Only thing I did not copy is bitops.h as it would fail. Maybe that would be a solution for the xorg-x11 problem?

Two question however. 

1) why e2fsprogs headers install itself in two separt places?

2) does it bring more inconsistencies to the system, sinse compile gave me many warnings.

----------------------------------

Sash -- e2fsprogs recompile

----------------------------------

 *Quote:*   

> 
> 
> gcc -march=pentium3 -Os -pipe -fomit-frame-pointer -momit-leaf-frame-pointer -Wa ll -Wmissing-prototypes -DHAVE_GZIP=1 -DHAVE_LINUX_ATTR=1 -DHAVE_LINUX_MOUNT=1 - DHAVE_BSD_MOUNT=0 -DMOUNT_TYPE='"ext3"' -DHAVE_READLINE   -c -o utils.o utils.c
> 
> gcc --disable-shared -static -s -o sash sash.o cmds.o cmd_dd.o cmd_ed.o cmd_grep .o cmd_ls.o cmd_tar.o cmd_gzip.o cmd_find.o cmd_file.o cmd_chattr.o cmd_ar.o uti ls.o -lz -lreadline -lncurses
> ...

 

p.s. maybe it is problem with new glibc-20040619 which got masked again in portage  :Question: 

----------

## seltrus

I am not an expert at kernel headers or anything and I know that they do not have to be matched, but perhaps the newest kernel headers, 2.6.7 are a bit different than previous 2.6.x versions?  I don't understand how the header files that are in /usr/src/linux would be different from those in /usr/include/linux.  I will check to see if the two bitops.h files are different and get back to you.

EDIT: The files are identical according to diff.

All I know is that using ~x86 and both headers-2.6.7 and gentoo-dev-sources-2.6.7 from the beginning, everything has been flawless up until this point (xorg-x11 failing).Last edited by seltrus on Tue Jun 22, 2004 3:14 pm; edited 1 time in total

----------

## seltrus

 *Quote:*   

> p.s. maybe it is problem with new glibc-20040619 which got masked again in portage 

 

my glibc version is 2.3.3.20040420, and i haven't touched 20040619.

----------

## ryszardzonk

 *Quote:*   

> 
> 
> my glibc version is 2.3.3.20040420, and i haven't touched 20040619.

 

then it may simply look as a kernel-headers issue. I heard today on #gentoo that the most stable headers from 2.6 series are 2.6.6 and maybe should be worth a try

other thing is that i just foundout that some say (2.6 headers are not nessesery to build glibc with nptl) and that 2.4.22 which is standard on gentoo is enough...[/quote]

----------

## seltrus

I know nptl can be used with the 2.4 headers, but I am specifically building a box to be on the bleeding edge, so I wanted to start with 2.6 headers.  I tried the 2.6.6 headers as per your suggestion, and that cleared my problems with xorg-x11 right up.

Now onto more box breakage!  Gnome 2.7, KDE 3.3 alpha here I come!

----------

## ryszardzonk

I am glad it worked for You.  :Very Happy:  I didnt try it myself yet as it would take some time to compile on my box, therefore I wanted to find out all the possibilities before I do so.

Other thing I just found out is that one should never have kernel headers newer then the running kernel. Should not be a problem, but some say it may be. I guess for now i'll wait for the new 2.6.7-love  :Smile:  Should be here shortly  :Smile: 

----------

## Da_Big_G

My desire to get a threaded perl on my Gentoo box has brought me here.

I was running kernel 2.4.25 and put "threads" into my make.conf USE= line and re-emerged perl.  This caused Perl to get rebuilt with the -IUSE_THREADS (so I got a threaded perl) but it also caused a ton of other stuff to get rebuilt with threads as well (most notably apache2 which is using the worker mpm instead of prefork).

After a few days of developing my threaded perl app, I found I was getting all sorts of errors.  It seems that I should be running perl 5.8.4 (still masked) and not 5.8.2 (stable for x86).

After reading up on nptl, I'm ready to switch to 2.6.7, but I'm wondering if the USE="nptl threads" will cause a problem - do the two conflict?  And will using nptl benefit the threaded perl?  Can I just remove "threads" from the USE line and still get threading support in perl, etc.?  

I just finished compiling the kernel, rebooted, and am rebuilding glibc now.  I'll update this post if I come up with answers to those questions.

----------

## eelleemmeenntt

I have successfully install glibc with nptl and 2.6 headers bootstrap. If you dont follow the guide which tells how to do a 2.4 install then you should emerge udev, hotplug alsa-utils, alsa-tools and some other stuff and rc-update add for hotplug and alsa-utils boot not default.

----------

## umass66

i am planning to use the linux-headers-2.6.6-r1 so that i can recompile glibc with nptl support. it will not work with linux-headers-2.4. learnt that the hardway. my question is what packages are the linux-headers-2.6.6-r1 know to break and what is the downside to using nptl.

----------

## eelleemmeenntt

From what I know there is no downside to usng nptl, "it's a good thing". As for programs that break, I didnt have any trouble. I use kernel-2.6.5, all the system tools as in the guide, you must have hotplug, and very importantly also udev, everything goes fine, I also got X, kde 3.2.2, ximian office, xcdroast and a lot more programs working even realplayer. Dont worry about it unless your machine is really old everything should go fine. I have an athlon xp and also a duron. On my athlon everything is prefect from start to finish, but my duron is pretty old and so it failed with a stage1 but not stage2. Bootstrap with 2.6 headers, which ever, you might have to define "arch". So good luck.

----------

## meowsqueak

I don't know if this is relevant, but I might as well ask - where is the userspace library implementation for 'futexes' ? Does NTPL provide a set of locking primitives using futexes? I have read documents that indicate no such userspace implementation exists yet...

----------

## cpu

 *ryszardzonk wrote:*   

> seltrus wrote:
> 
>  *Quote:*   Hi all! I have a couple of gentoo boxen and I decided to give the 2.6 headers a try. Everything went smoothly until I tried to emerge xorg-x11 which produced the following errors. This is the xorg-x11-6.7.0-r1 build, but the 6.7.0 build fails as well. It seems to be complaining about the headers. I built the box using the guide in this thread as a reference.  
> 
> i have exactly the same prolem as You do. Except unlike You I had several issues before. It didnt start there. Progs like util-linux, iputils, sash, kbd (parts of emerge system) whould not compile because of the missing /usr/include/linux/autoconf.h. I read on forum that partial fix to it would be coping autoconf.h form your /usr/src/linux there. It worked for util-linux, iputils, kbd. Sash still didnt compile.
> ...

 

This is linux-headers 2.6.7 problem - downprgade to 2.6.6-r1 - works fine

----------

