LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices



Reply
 
Search this Thread
Old 07-27-2011, 06:46 AM   #1
kususe
Member
 
Registered: Oct 2010
Posts: 54

Rep: Reputation: 0
Impossible to compile kernel source


When I try to compile kernel source (directly downloaded by kernel.org, decompressed in /usr/src), an errore is returned on stdout:

Code:
HOSTCC  scripts/basic/fixdep
/usr/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2
suggestions??

Thanks in advance.
 
Old 07-27-2011, 07:17 AM   #2
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,684

Rep: Reputation: 124Reputation: 124
Did you install the build-essential package?
 
Old 07-27-2011, 08:04 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,266

Rep: Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661
( 'build-essential' is a 5kB package, that installs g++ and make ! )


In Debian Wheezy/Sid, only the system gcc will know the location of libgcc_s.
→ /lib/i386-linux-gnu/libgcc_s.so.1 or /lib/x86_64-linux-gnu/libgcc_s.so.1

Other "gcc", added from e.g. Debian Squeeze, will look for /lib/libgcc_s.so.1

So what is your OS, and which gcc is used for the above ? ?

..
 
Old 07-28-2011, 12:11 PM   #4
kususe
Member
 
Registered: Oct 2010
Posts: 54

Original Poster
Rep: Reputation: 0
I use a stable version of Debian (but I admit I've modified my sources.list with Wheezy repo).
I found
Code:
libgcc_s
in
Code:
/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5/libgcc_s.so
but also in
Code:
/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.4/libgcc_s.so
Note that my file is different named by your one. And it's placed in another path.
I tried to delete one of them and put the other one in the directory you've indicate me in your post, but the error remains.

@Dutch Master: yes
 
Old 07-28-2011, 01:23 PM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,266

Rep: Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661
A temporary workaround, that usually works is :
cd /usr/local/lib/
# ln -s /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/<version>/libgcc_s.so

Sorry for libgcc_s.so.1 : I guess, I was rather sleepy.


My question from post #3 hasn't been answered ? ?
"" .. which gcc is used for the above ""

..

Last edited by knudfl; 07-28-2011 at 01:46 PM.
 
Old 07-29-2011, 05:45 AM   #6
kususe
Member
 
Registered: Oct 2010
Posts: 54

Original Poster
Rep: Reputation: 0
Ehm...
I'm sorry..What do you want to know exactly?
 
Old 07-29-2011, 08:13 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,266

Rep: Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661
The reason to ask for the gcc version :

It looks like you have a mix of a Squeeze gcc and a Wheezy libgcc.
( And that's probably not a good idea ? )

Compiling a new kernel : it will often want the same compiler
used again when you later have to add a new module.

My suggestion is to use a genuine Squeeze gcc install.
 
Old 07-29-2011, 10:02 AM   #8
kususe
Member
 
Registered: Oct 2010
Posts: 54

Original Poster
Rep: Reputation: 0
[Solved]

Oh yes, I've understood.
But..I upgraded Debian (using apt-get), I installed kernel-source (using apt-get install..) and now the problem is solved, because it seems I manage to customize the kernel using menuconfig.

However, is there a way to prove you idea?

Last edited by kususe; 07-30-2011 at 06:14 AM.
 
Old 07-31-2011, 01:18 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,266

Rep: Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661
Quote:
However, is there a way to prove you idea ?
You mean, if a package is a Wheezy package ?
The full version number is visible is Synaptic.

Squeeze libgcc1 : 4.4.5-8 http://packages.debian.org/squeeze/libgcc1
Wheezy libgcc1 : 4.6.1-4
Sid libgcc1 : 4.6.1-5
 
  


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
How to compile debian kernel source into a generic kernel? linus72 Debian 3 04-29-2010 09:50 PM
Is it impossible to compile kernel 2.6.14.6 on kernel 2.6.26?? corone Linux - General 1 07-20-2009 12:42 AM
compile a kernel from source??? vbtalent Fedora 5 11-22-2005 04:29 PM
Kernel-source, alsa-driver and kernel compile jasone Linux - General 13 05-26-2005 01:15 AM
Compile kernel source andy18 Linux - Newbie 4 02-14-2004 09:47 AM


All times are GMT -5. The time now is 05:05 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration