LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-18-2009, 10:40 AM   #1
pmil
Member
 
Registered: Jul 2008
Posts: 43

Rep: Reputation: 15
Question What's the glibc version used to compile the kernel?


Hi all,

I am compiling my kernel using gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu8). My question is how can I find out which version of glibc used to build the kernel? Also, if an application needs to use glibc, where can be found? Should I have it on my file system?

Thanks.
 
Old 12-18-2009, 10:58 AM   #2
JohnGraham
Member
 
Registered: Oct 2009
Posts: 467

Rep: Reputation: 139Reputation: 139
Quote:
Originally Posted by pmil View Post
Hi all,

I am compiling my kernel using gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu8). My question is how can I find out which version of glibc used to build the kernel? Also, if an application needs to use glibc, where can be found? Should I have it on my file system?

Thanks.
No version of glibc is used to build the kernel. Remember, it's a kernel - libc depends on it, not the other way around.

If you need to develop user-space applications which use the standard c library, you'll need to install your distro-specific development package, something like libc-dev or libc-devel.

Why do you ask?
 
Old 12-18-2009, 11:34 AM   #3
pmil
Member
 
Registered: Jul 2008
Posts: 43

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by JohnGraham View Post
No version of glibc is used to build the kernel. Remember, it's a kernel - libc depends on it, not the other way around.

If you need to develop user-space applications which use the standard c library, you'll need to install your distro-specific development package, something like libc-dev or libc-devel.

Why do you ask?
First of all, thanks for the reply. Ok, so the kernel doesn't need libc to be build. Let's say that I have a hello world program like the following, which is dynamically linked:

Code:
#include <stdio.h>
int main() {
        printf("Hello world!\n");
        return 0;
}
At run time, the program will search for the printf() routine. Where it will search for the required library? Will it search under the /lib/ folder of the file system? Should somehow provide the glibc library under /lib/? If yes, what version of glibc should I put there? Btw, I am using a vanilla kernel and also my own file system.

Thanks.

Last edited by pmil; 12-18-2009 at 01:06 PM.
 
Old 12-18-2009, 12:08 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
' glibc ' is your system ( together with the kernel ).
And is of course always installed.
Never touch it, please. Changing any libc6 files :
Your system will stop working. For ever.

The command : dpkg -L libc6
will show the files.

You may need libc6-dev , the development files :
sudo apt-get install libc6-dev linux-libc-dev
.....
 
  


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
system glibc or kernel version not supported or not detectable Kilam orez Linux - Newbie 3 11-05-2009 10:45 AM
i have an error when i try to install Glibc(5.7. Glibc-2.8-20080929, Version 6.4) robineecc1 Linux From Scratch 0 12-14-2008 12:45 PM
Kernel version and glibc ashley75 Linux - General 1 03-22-2005 03:54 AM
I'm about to compile a kernel... but what version should I use... 2.4.29 or 2.6.10??? Shagrath239 Slackware 8 02-13-2005 09:28 PM
Help! Installed the i686 kernel & glibc packages instead of the i386 version penguin_powered Linux - Newbie 3 04-12-2004 12:45 AM


All times are GMT -5. The time now is 06:34 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration