LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 09: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, 09: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, 10: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 12:06 PM.
 
Old 12-18-2009, 11:08 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
' 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



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 09: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 11:45 AM
Kernel version and glibc ashley75 Linux - General 1 03-22-2005 02: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 08:28 PM
Help! Installed the i686 kernel & glibc packages instead of the i386 version penguin_powered Linux - Newbie 3 04-11-2004 11:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:08 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
Open Source Consulting | Domain Registration