LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 10-05-2005, 12:43 PM   #1
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Question recompiling glibc on slackware 10.2


i really like all the updated packages and stuff in 10.2 compared to 10.1... but i am having issues with 10.2 which i don't have in 10.1 and i suspect it's because of the glibc changes done in 10.2 (NPTL)...

i don't really know a lot about libraries and compilers and stuff but i'm trying to learn... what i would like to do is not have to go back to 10.1, so i'd like to keep my 10.2 but i'd like to make it as though the NPTL changes never happened... in other words i'd like to have a glibc and stuff similar to the one in 10.1...

what steps should i take in order to do this the right way??

i have never recompiled glibc so i don't know the implications this could have... i also don't know what other steps might need to be taken after recompiling it... for example, would i need to recompile the kernel after recompiling glibc??

any help you could give me with this would be great...
 
Old 10-05-2005, 12:52 PM   #2
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,289

Rep: Reputation: 69
Could you explain your issues, are they like :
glibc detected *** double free or corruption: xxxxxxxxxx ***

For my part, I do the reverse, eg compile the libs and bin that need pthread with :
Code:
export CFLAGS=-I/usr/include/nptl
export CXXFLAGS=${CFLAGS}
export LDFLAGS=-L/usr/lib/nptl
before a ./configure and make
 
Old 10-05-2005, 01:11 PM   #3
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Original Poster
Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
well, the issues are mainly some system freezes using some apps... but please let's not get into that, i would want to do this even if i wasn't having problems... it will be an educational experience even if it doesn't solve the issues i am having...

so is it just a matter of taking the glibc build script from 10.1 and using that?? what else would i need to recompile??
 
Old 10-06-2005, 08:29 AM   #4
batev
Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 56

Rep: Reputation: 15
You can compare the build scripts from 10.1 and 10.2 and see the differnce. They are not quite different.
 
Old 10-06-2005, 12:22 PM   #5
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Original Poster
Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Quote:
Originally posted by batev
You can compare the build scripts from 10.1 and 10.2 and see the differnce. They are not quite different.
yeah, i took a quick look yesterday... seems like the main difference is all the NPTL crap... i'm gonna try and recompile the glibc from 10.2 using the build script from 10.1 later tonight... we'll see how it goes...
 
Old 10-07-2005, 12:01 AM   #6
TigerLinux
Senior Member
 
Registered: Sep 2005
Location: Kuala Lumpur, Malaysia
Distribution: Ubuntu 11.04
Posts: 1,731

Rep: Reputation: 30
slackware is very dull
 
Old 10-07-2005, 05:04 AM   #7
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
Quote:
Originally posted by TigerLinux
slackware is very dull
go away.

Win32sux: let us know your results, I'm quite interested in this
 
Old 10-07-2005, 11:14 AM   #8
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
glibc is one third of something called the toolchain (glibc + gcc + binutils), which have circular dependancies. That is to say, they all depend on each other.

Upgrading (or changing) your glibc may break gcc and binutils, and of course, with them broken, you can't downgrade glibc again.

Ok, no problems, reinstall the packages ... but, whoops ... glibc is linked from bash, ls, cd, mv ...

So now you've bust your system.

I would recommend building a completely new toolchain and leaving your existing stuff in one place, that way you can make as many mistakes as you like without risking your system.

Check out crosstool: http://kegel.com/crosstool/

Although it's been designed to build self hosting cross-toolchains, you can always point it at your arch and build a self-contained second toolchain.

Once you've got the hang of it, and ironed all the bugs out of your toolchain (often there are patches and fixes that need applying en route to toolchain-haven), you might consider rebuilding (and repackaging) your desired version of glibc and link against it binutils and gcc, giving you a whole new toolchain that you can upgrade to.

It's worth pointing out, tho', that even this sort of change may stop everything that links against glibc from functioning, so you'd then have to recompile all your packages against this new toolchain (not impossible if you have a second self-hosted toolchain that you can use to build these packages *before* upgrading).

The crosstool, gcc & glibc mailing lists have loads of information on how things are put together, as does linuxfromscratch (http://www.linuxfromscratch.org/).

Good luck!
- Piete.
 
Old 10-07-2005, 11:33 AM   #9
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Original Poster
Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
thanks for the reply...

Quote:
Originally posted by piete
Upgrading (or changing) your glibc may break gcc and binutils, and of course, with them broken, you can't downgrade glibc again.
but then how does Pat manage to recompile glibc without having to touch gcc and/or binutils?? take a look at the changelog, glibc has been recompiled many times without having to change anything else... for example:
Quote:
Sat Sep 10 22:21:22 PDT 2005
OK, everything was set in stone except for these things. ;-)
There may still be a couple more changes (maybe), but this is pretty close.
a/aaa_base-10.2.0-noarch-2.tgz: Fixed rp-pppoe version number in email
to root. (thanks to Piter Punk)
a/aaa_elflibs-10.2.0-i486-2.tgz: Upgraded glib libraries to 2.6.6.
a/bash-3.0-i486-3.tgz: Added bash patch bash30-016.
(suggested by Fredrik Rinnestam and Xavier Thomassin)
Added a patch to prevent an issue with newer glibc versions and 2.4.x
kernels that leads to a bash hang if bash is recompiled on such a system.
(Thanks to Fredrik Rinnestam)
a/glibc-solibs-2.3.5-i486-5.tgz: Recompiled against header files from
linux 2.4.31 (linuxthreads version) and linux 2.6.13 (NPTL version).
a/glibc-zoneinfo-2.3.5-noarch-5.tgz: Rebuilt.

ap/vim-6.3.086-i486-1.tgz: Upgraded vim to patchlevel 86, and upgraded to
ctags-5.5.4.
l/esound-0.2.36-i486-1.tgz: Upgraded to esound-0.2.36.
l/glib2-2.6.6-i486-1.tgz: Upgraded to glib-2.6.6.
l/glibc-2.3.5-i486-5.tgz: Recompiled.
l/glibc-i18n-2.3.5-noarch-5.tgz: Rebuilt.
l/glibc-profile-2.3.5-i486-5.tgz: Recompiled.

l/gtk+2-2.6.10-i486-1.tgz: Upgraded to gtk+-2.6.10.
l/pango-1.8.2-i486-1.tgz: Upgraded to pango-1.8.2.
Thanks to Giacomo Lozito for pointing the bugfix releases of glib, gtk+,
and pango out. The 2.8 series still needs time to stabilize and may present
some compatibility issues (just a guess), and the version bump on atk-1.10.1
makes me want to play it safe on that one as well. We'll get to those in the
next -current.
l/sdl-1.2.9-i486-1.tgz: Upgraded to SDL-1.2.9, SDL_image-1.2.4,
SDL_mixer-1.2.6, and SDL_ttf-2.0.7.
n/nmap-3.90-i486-1.tgz: Upgraded to nmap-3.90. (suggested by many :-)
n/wget-1.10.1-i486-2.tgz: Change /etc/wgetrc to /etc/wgetrc.new so that it'll
be protected from replacement the next time this package is upgraded.
Suggested by Luigi Genoni.
xap/xvim-6.3.086-i486-1.tgz: Upgraded X version of vim to patchlevel 86, and
upgraded to ctags-5.5.4.
+--------------------------+
Quote:
Wed Jul 20 16:17:08 PDT 2005
a/glibc-solibs-2.3.5-i486-4.tgz: Recompiled, as I forgot that with both
linuxthreads and NPTL versions of glibc that the patch would have to be
applied twice. Thanks again to Dirk van Deun for pointing out my error.
a/glibc-zoneinfo-2.3.5-noarch-4.tgz: Rebuilt.
l/glibc-2.3.5-i486-4.tgz: Recompiled.
l/glibc-i18n-2.3.5-noarch-4.tgz: Rebuilt.
l/glibc-profile-2.3.5-i486-4.tgz: Recompiled.
+--------------------------+
http://www.slackware.com/changelog/stable.php?cpu=i386

BTW, i'm not trying to upgrade it or anything like that... i'm gonna keep the same version, i just want to recompile it in the style of 10.1 (no NPTL stuff)...
 
Old 10-07-2005, 12:05 PM   #10
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
I tried this once and it broke every binary on my system. :-) I had built my entire system against a 2.6 kernel and a threaded glibc tho. When I downgraded to a non NPTL glibc, all hell broke loose. Couldn't run a single binary on my system. Got all sorts of wierd ld errors and what not.

I'd like to know how Pat got away with switching to an NPTL glibc midstride... I'm thinking it's because the entire system was still built against a non-threaded glibc and 2.4 headers. As far as I'm aware, 10.2 was not a complete recompile. So adding a threaded glibc wouldn't have an effect because the entire system defaults to not looking to use threads anyway. linux-2.4.xx isn't capable of supporting it.... So that leads me to believe that nothing on a stock 10.2 install will be capable of using threads to begin with. I'm assuming he added a threaded glibc so you could compile your own stuff to have thread support.

That's my take on it... Whether or not I'm even close, I don't know. Let us know what happens. Now, when Pat goes for a complete recompile against 2.6 headers ( I assume 11.0 ), I wouldn't even dream of trying to downgrade. You'll open up a can of worms if you do.
 
Old 10-07-2005, 01:35 PM   #11
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Original Poster
Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Quote:
Originally posted by jong357
I'd like to know how Pat got away with switching to an NPTL glibc midstride...
have you taken a look at the README.NPTL?? ftp://ftp.oregonstate.edu/pub/slackw....2/README.NPTL

as you can tell i know very little about this issue, but it seems like Pat hints at what it took in that file...

BTW everyone, i'm getting ready to go forward with the glibc recompile, but i want to upgrade my kernel (to 2.4.32-rc1) also... right now i'm trying to remember how to go about making a new kernel-headers package... once i have that down, i will proceed... i'm thinking it's gonna go something like this:
Code:
- recompile kernel-ide and kernel-modules...

- recreate kernel-sources and kernel-headers...

- recompile glibc...

- recompile alsa...

- recompile nvidia...
does that sound about right??



BTW, i asked over here about making the headers package if you wanna help me out with that: http://www.linuxquestions.org/questi...21#post1889121
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
recompiling the kernel-SLACKWARE greklas Slackware 6 08-29-2004 12:29 PM
recompiling kernal slackware 7.1 gamji44 Slackware 5 09-07-2003 11:41 PM
glibc and Slackware 9 lt1derful Slackware 9 07-21-2003 05:35 AM
Slackware 8.1 -> Gnome 2 -> Glibc Problems MakeMeBad Slackware 2 02-09-2003 04:38 PM
Slackware 8.1 and GLIBC 2.3 Bengt Slackware 1 11-12-2002 10:23 PM


All times are GMT -5. The time now is 01:28 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration