LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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-2007, 06:18 PM   #1
sorenp
LQ Newbie
 
Registered: Dec 2006
Posts: 11

Rep: Reputation: 0
Problems building glibc-2.5


Hi!

While trying to compile the glibc-2.5 sources that are distributed with Slackware 12.0, I get the following message (during configure):


checking installed Linux kernel header files... TOO OLD!
configure: error: GNU libc requires kernel header files from
Linux 2.0.10 or later to be installed before configuring.
The kernelheaders files are found usually in /usr/include/asm and
usr/include/liinux; make sure these directories use files from
Linux 2.0.10 or later. This check uses <linux/version.h>, so
make sure that file was built correctly when installing the kernel header
files. To use kernel headers not from /usr/include/linux, use the
configure option --with-headers.


I have installed the kernel headers for kernel 2.6.21.5 and the file /usr/include/linux/version.h exists and contains the following data

#define LINUX_VERSION_CODE 132629
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))

Any ideas what might have gone wrong?

Thanks in advance,

Soren

Last edited by sorenp; 10-06-2007 at 02:43 AM.
 
Old 10-06-2007, 01:46 AM   #2
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
There are too many questions that come to mind when reading this, so I'll ask the most important one (IMHO): WHY are you trying to build glibc?
 
Old 10-06-2007, 02:22 AM   #3
sorenp
LQ Newbie
 
Registered: Dec 2006
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks for posting Robby!

The version of gclib included with Slackware 12.0 has tls (Thread Local Storage) compiled into it. While this is probably a good thing in most situations, it's incompatible with the XEN hypervisor. Since this installation has one purpose alone - to be dom0 for a number of domains running on an SMP server - I don't really have any other option than to recompile gclib with "-mno-tls-direct-seg-refs".

I should probably also say that I'm perfectly aware that replacing gclib is not a morning stroll in the garden. I've done it a couple of times before (however, not on Slackware 12.0) and have also managed to nearly trash as system while doing it. Anyhow, many of these complications will not apply in this instance, since the two gclibs are of the same version (just with and without tls).

I hope this answered your question.

Kind Regards,

Soren
 
Old 10-06-2007, 02:25 AM   #4
sorenp
LQ Newbie
 
Registered: Dec 2006
Posts: 11

Original Poster
Rep: Reputation: 0
I just noticed a minor error in the original post. It should read kernel version 2.6.21.5 and nothing else (i've updated the original post as well).

Last edited by sorenp; 10-06-2007 at 02:43 AM.
 
Old 10-06-2007, 07:17 AM   #5
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
You probably need to have the kernel sources on your system. I have seen other cases where this was so -even though the configure script said that it didn't find the kernel headers in /usr/include/linux, what it was actually looking for and not finding was the headers in /usr/src/linux/include.
So, I'd suggest that you unpack the kernel sources in /usr/src and then create the link /usr/src/linux to that version of the sources. Be sure and configure the sources also, but they don't have to be compiled.
Even though you are using the same version of kernel, changing the tls options will probably break your system if you run 'make install' without DESTDIR so be sure to install them using DESTDIR. If configure still fails, try passing the '--with-headers' option and point it at the kernel source version you are using. The headers in the kernel-headers package are not the complete set of headers and xen or glibc may be needing something which is not in the packaged headers.
 
Old 10-11-2007, 12:22 AM   #6
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
Sorry for not replying earlier, but for some reason, LQ didn't send a mail notifying me that there was a response to this - I just happened to check back on it.
I'm assuming you're using the SlackBuild script with the Slackware glibc sources (if not, you probably should ). I'd personally do this build and such in either an emulated environment (and test it there first) or in a chroot environment (and test it on a non-critical system first). Other than that, I don't have anything to add to what gnashley said.

gnashley:
While I'm thinking about it (sorry to hijack the thread), how did your bout with that udev helper turn out?
 
Old 10-12-2007, 02:13 AM   #7
sorenp
LQ Newbie
 
Registered: Dec 2006
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks for helping out gnashley and rworkman.

It appeared that (as gnashley was suggesting) the kernel headers where actually the patched subset of kernel headers sometimes called the libc-headers. These are meant to be used for compiling userspace programs, not glibc it self. However, the error message was somewhat confusing since the --with-headers directive was provided in glibc.BuildSlack and pointed to the place where the kernel sources should have been. That was the real problem: I had never installed the kernel sources since I was using a Xen based kernel and never thought that I would need the original kernel sources. Anyhow, installing the kernel sources package fixed everything right.

Installation went smoothly. Since this wasn't exactly a production system (yet), I just installed the shit and hoped for it to work... which it did : D Now XEN works just fine with Slackware 12.0 as dom0

Thanks for your time!!!!

\Soren
 
  


Reply



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
Building glibc-2.5 Error chiefsmurph Linux - Software 7 04-27-2007 11:00 PM
Building glibc for i686 on RHEL-4 cardiffandvale Linux - Software 0 03-16-2007 11:09 AM
building glibc 2.3.5 for static linking. rekhakp Linux - Software 0 04-26-2005 12:17 PM
Question about building glibc and ncurses tomdkat Linux - Software 2 02-18-2005 09:59 AM
Problems building glibc-2.3.2 CodeRed Linux - Software 0 07-10-2003 08:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:11 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration