# Can I replace LinuxThreads with NPTL?

## wildleaf

If I replace it by adding "NPTL" to USE flag and try to 

emerge -uDvp --newuse world, I got this:

```

wildleaf root # USE="nptl" emerge -uDpv --newuse world

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

Calculating world dependencies ...done!

[blocks B     ] sys-kernel/linux-headers (from pkg sys-kernel/linux26-headers-2.6.8.1-r1)

[ebuild  N    ] sys-kernel/linux26-headers-2.6.8.1-r1  -build 34,870 kB 

[ebuild   R   ] sys-libs/glibc-2.3.4.20040808-r1  -build -debug -erandom -hardened -multilib +nls +nptl* -pic +userlocales 0 kB 

Total size of downloads: 34,870 kB

```

The linux-headers is blocked, is it dangerous to do so ? any idea? thanks.

----------

## Hauser

You need to replace linux-headers with linux26-headers before you reemerge glibc, please see the relevant part in my post:

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

----------

## wildleaf

 *Hauser wrote:*   

> You need to replace linux-headers with linux26-headers before you reemerge glibc, please see the relevant part in my post:
> 
> https://forums.gentoo.org/viewtopic.php?p=1882873#1882873

 

Hauser, Thanks a lot!

I also found this thread is quite useful:

https://forums.gentoo.org/viewtopic.php?t=261059&start=0&postdays=0&postorder=asc&highlight=linuxheaders

I have a question in your thread:

```
# emerge --oneshot --nodeps linux26-headers
```

why here you use --oneshot and --nodeps ? can you explain?

----------

## wildleaf

Also, before i merge the linux26-headers, i have to do unmerge linux-headers first. don't know if that is a problem...

----------

## Hauser

 *wildleaf wrote:*   

> Also, before i merge the linux26-headers, i have to do unmerge linux-headers first. don't know if that is a problem...

 

That won't be a problem, so long as you don't start recompiling glibc before you have already emerged linux26-headers.  --nodeps and --oneshot are used because you don't want the replacement itself affect other parts of the system (through dependencies or whatever) until glibc gets recompiled properly.  I've seen these in the handbook, but in reality if you do this step by step, ie (1) unemerge linux-headers, (2) emerge linux26-headers, (3) emerge glibc, probably it will work even without them.

----------

## wildleaf

Got ya. Thanks again. I've done the upgrade, and everything is running good. :Laughing: 

One of the reason I want to use NPTL is that I'm running many Java programs eg. Azureus, which have large demand of creating threads. So I was hoping I can get a better performance using NTPL.

 *Hauser wrote:*   

>  *wildleaf wrote:*   Also, before i merge the linux26-headers, i have to do unmerge linux-headers first. don't know if that is a problem... 
> 
> That won't be a problem, so long as you don't start recompiling glibc before you have already emerged linux26-headers.  --nodeps and --oneshot are used because you don't want the replacement itself affect other parts of the system (through dependencies or whatever) until glibc gets recompiled properly.  I've seen these in the handbook, but in reality if you do this step by step, ie (1) unemerge linux-headers, (2) emerge linux26-headers, (3) emerge glibc, probably it will work even without them.

 

----------

