🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Uri Simchoni Sat, 17 Feb 1996 14:27
ELF blues - How can I make gcc-2.7.2 automatically find its libraries?
#928
Author: 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.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads