[solaris] library -lc: not found

phocean 0x90 at phocean.net
Mon Nov 7 06:05:09 WST 2011


Thank you Antony. It is a nice article indeed, very instructive.

I see now my understanding of static linking was terribly bad and I was
taking the wrong path.

So, I just compiled scp dynamically and will test it out soon on
production machines.

But with this :
$ ldd ./scp
libc.so.1 =>     /lib/libc.so.1
libm.so.2 =>     /lib/libm.so.2

... I guess there should not be any issue...

I will give a short update here soon.

Thanks again to all of you for nice support.

-- 
phocean

Le 06/11/2011 22:33, Antony Pavlenko a écrit :
> First of all there is a great article from linker guru Rod Evans about
> static linking :
> https://blogs.oracle.com/rie/entry/static_linking_where_did_it
> I have created a package with  dynamically linked executables. As it
> doesn't depend from any external packages ( libs ) it can be easily
> installed at any Solaris system.  I have installed it at hundreds of
> servers ( thank you Matt for a great piece of code! ) with out of any
> problems. I will be happy to help you, if you will have any problems.
> 
> Wbr,
> Antony Pavlenko
> 
> On Sun, Nov 6, 2011 at 8:44 PM, phocean <0x90 at phocean.net
> <mailto:0x90 at phocean.net>> wrote:
> 
>     Le 06/11/2011 14:27, Laurent Bercot a écrit :
>     >> $ make PROGRAMS="scp" STATIC=1
>     >> gcc -L/usr/local/lib -R/usr/local/lib -static -o scp scp.o
>     >> progressmeter.o atomicio.o scpmisc.o compat.o
>     >> ld: fatal: library -lc: not found
>     >
>     >  As Matt said, you cannot make static programs on Solaris.
>     >  Solaris does not ship with a libc.a, only a libc.so.
>     >
>     >  This would be an excellent reason to change operating systems and
>     > use something less braindead and obsolete.
>     >
>     >  But if you're hell-bent on using Solaris, just remove the STATIC=1
>     > part of your command line and dropbear should compile without trouble,
>     > it will simply use dynamic libraries.
>     >
> 
>     If only I could... But believe me, you can't change an industrial device
>     easily !
> 
>     The reason why I want it to build it statically, is that I wanted it to
>     run on several versions of Solaris, without messing up with library
>     issues (though I can't compile anything directly on such devices).
> 
>     --
>     phocean
> 
> 


More information about the Dropbear mailing list