🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #928

ELF blues - How can I make gcc-2.7.2 automatically find its libraries?

#928
From: Uri Simchoni
Date: Sat, 17 Feb 1996 14:27
37 lines
1564 bytes
Hi,

Iv'e been using Slackware 2.3 linux for six months now (kernel 1.2.8 
and then 1.3.32) when I decided to upgrade my C compiler - mainly because 
2.6.3 is reported to produce buggy kernels.

I downloaded the latrest gcc, libc, libg++, binutils manual pages and 
ld.so from a tsx-11 mirror, and successfully installed them on my system 
(in the sense that all the a.out stuff is still working and all the new 
stuff is untarred into its default place)

When I try to do - 

gcc hello.c

the linker can't find libc.a. What works is:

gcc hello.c -L/usr/lib -lc
or
gcc hello.c /usr/lib/libc.a

In addition, when I compile using shared libraries:

gcc -shared hello.c 

the compilation and linkage goes well, but I get a segmentation fault 
when I run the program.

This all seems like a matter of library location. I would like to somehow 
tell gcc to look for libc.a in /usr/lib, or move libc.a elsewhere so it 
can find it. I'm also concerned with the shared library problem - here 
I'm really in the dark.

Can anyone help me with this?

Thanks,
Uri.
Technical Details
Message-ID: <4g4oka$ksg@news.NetVision.net.il>
Path: arc1-ca.pugleaf.net!news.NetVision.net.il!news

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.NetVision.net.il!news
From: simchoni@netvision.net.il (Uri Simchoni)
Newsgroups: gnu.gcc.help,comp.os.linux.setup,comp.os.linux.dvelopment.apps,comp.lang.c
Subject: ELF blues - How can I make gcc-2.7.2 automatically find its libraries?
Date: 17 Feb 1996 14:27:22 GMT
Organization: Simchoni Automation Systems Ltd
Message-ID: <4g4oka$ksg@news.NetVision.net.il>
NNTP-Posting-Host: ts4hp16.netvision.net.il
Mime-Version: 1.0
X-Newsreader: WinVN 0.99.3