Solved

Gcc on Suse Linux failing because it cannot find libgcc

Posted on 2013-01-07
5
2,209 Views
Last Modified: 2013-01-21
Hello.

My gcc compile is failing because it can't find library libgcc. My problem is I don't know which library to install to fix this. I have tried all the ones I can think on my distribution disk, but so far no luck.

gcc -m32 -L /usr/local/java/lib -L /usr/lib -L /lib -ldl-2.11.1  -lpthread-2.11.1 jsvc-unix.o libservice.a -o ../../jsvc
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.3/libgcc.a when searching for -lgcc
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: cannot find -lgcc

Note the error message: /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: cannot find -lgcc

I expected that libgcc would be loaded by default because I have the compiler installed
0
Comment
Question by:cschene
  • 3
  • 2
5 Comments
 
LVL 32

Expert Comment

by:phoffric
ID: 38752514
>> -m32
See if -m64 helps instead of -m32
0
 

Author Comment

by:cschene
ID: 38752770
Hi Phoffric,

Sorry, I should have mentioned that I am required to have a 32 bit compile. 64 bit is not an option becasue of other software I integrate with. I'll need the 32 bit libraries.

I would have expected since I have a 32 bit compiler installed I would have libgcc as a default. I am specifying /lib and /usr/lib as paths and I believe those are the locations of the 32 bit libraries.

I did find these two libraries: How do I specify that gcc should use them?

/lib/libgcc_s.so.1
/lib/libgcc.so.1


Thanks,

Chris
0
 
LVL 32

Accepted Solution

by:
phoffric earned 500 total points
ID: 38764861
>> I am specifying /lib and /usr/lib as paths
As library paths, right? You could also use explicit paths in the gcc command (but that just indicates that something is awry with your installation).

Have you seen the ideas presented here:
   http://www.network-theory.co.uk/docs/gccintro/gccintro_25.html

and in Step 4 Making the library available at runtime:
   http://www.cprogramming.com/tutorial/shared-libraries-linux-gcc.html
0
 

Author Comment

by:cschene
ID: 38784084
This is what I found to be a solution

1) zypper remove gcc
2) zypper in gcc32-32bit
3) zypper in gcc

basically I removed gcc and replaced it with the 32 bit versin
0
 
LVL 32

Expert Comment

by:phoffric
ID: 38784487
Great!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now