Problem with static compilation
timo at kamph.org
Sun Feb 27 03:15:05 PST 2005
pinotj at club-internet.fr wrote:
> I built again HLFS, everything is fine (nls) except the fact I cannot statically compile new software.
> Example for aespipe:
> gcc -nointl -static -o aespipe aespipe.o aes.o md5.o sha512.o rmd160.o
> /usr/bin/ld: cannot find -lc
> collect2: ld returned 1 exit status
> make: *** [aespipe] Error 1
> Doesn't depend of -pie or -no-pie.
> Is it a spec problem ? Did I forget something ?
No, it's the expected behavior. The HLFS team decided to link everything
dynamically. To enforce this (allmost) all static libraries are removed
(or not even build) during the HLFS build. That is why your linker
complains about the missing libc.a.
It's not a bug, it's a feature ;-)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 187 bytes
Desc: OpenPGP digital signature
More information about the hlfs-dev