Thread View: latrobe.linux
2 messages
2 total messages
Started by Mark W Stiebel
Sat, 15 Feb 1997 00:00
gcc compiling statically
Author: Mark W Stiebel
Date: Sat, 15 Feb 1997 00:00
Date: Sat, 15 Feb 1997 00:00
26 lines
1667 bytes
1667 bytes
I went through upgrading all packages suggested in the kernel v2.1.24
Changes file the other, and upgraded the following..
ld.so,binutils,libc,gcc to the recommended.
Now, whenever compiling anything, gcc defaults to compiling statically. And
if I add -shared to the linking, weird stuff happens. For example, when
compiling 'vim':
[/usr/src/vim-4.2/src][6] > ldd vim gcc -o vim *.o -L/usr/X11R6/lib -lSM \
-lICE -lX11 -ltermcap
[/usr/src/vim-4.2/src][7] > ldd vim
statically linked (ELF)
[/usr/src/vim-4.2/src][8] > gcc -shared -o vim *.o -L/usr/X11R6/lib \
-lSM -lICE -lX11 -ltermcap
[/usr/src/vim-4.2/src][9] > ldd vim
./vim => ./vim
libc.so.5 => /lib/libc.so.5
Is there anything I have missed such that libc is shared, whilst all the
other libraries seem to be linked in statically? All applicable libraries
are there when I do a 'ldconfig -v'. And I don't really have _that_ much
disk space to be able to have a completely static system :)
-= Mark Stiebel
-= stiebelm@lion.cs.latrobe.edu.au
Re: gcc compiling statically
Author: Bob Hauck
Date: Tue, 18 Feb 1997 00:00
Date: Tue, 18 Feb 1997 00:00
21 lines
1428 bytes
1428 bytes
In article <5e4lr7$bjo@lion.cs.latrobe.edu.au>, stiebelm@lion.cs.latrobe.edu.au (Mark W Stiebel) writes: > I went through upgrading all packages suggested in the kernel > v2.1.24 Changes file the other, and upgraded the following.. > ld.so,binutils,libc,gcc to the recommended. > > Now, whenever compiling anything, gcc defaults to compiling > statically. You need to make some symlinks. The new linker does not look for libABC.so.x.y.z, but only for libABC.so when linking shared libs. Just ln -s libABC.so.x.y.z libABC.so. This one bit me too. It's in the docs somewhere, but is not real obvious. --- Bob Hauck bobh@wasatch.com Wasatch Communications Group http://www.wasatch.com
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