Solved

Gcc on Suse Linux failing because it cannot find libgcc

Posted on 2013-01-07
5
2,378 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 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: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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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.

734 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