[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Gcc on Suse Linux failing because it cannot find libgcc

Posted on 2013-01-07
5
Medium Priority
?
2,653 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:Christopher Schene
  • 3
  • 2
5 Comments
 
LVL 32

Expert Comment

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

Author Comment

by:Christopher Schene
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 2000 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:Christopher Schene
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
I have written articles previously comparing SARDU and YUMI.  I also included a couple of lines about Easy2boot (easy2boot.com).  I have now been using, and enjoying easy2boot as my sole multiboot utility for some years and realize that it deserves …
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
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.
Suggested Courses
Course of the Month19 days, 7 hours left to enroll

873 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