[CMake] Undefined reference

Dan Kegel dank at kegel.com
Thu Nov 3 19:50:29 EDT 2011


On Thu, Nov 3, 2011 at 4:16 PM, Michael Hertling <mhertling at online.de> wrote:
>> Static linking of glibc is not really supported; IIRC glibc's
>> DNS and localization support use shared libraries under
>> the hood, even when you ask for static linking
>
>[statically linked utilities are essential for disaster recovery and during boot]

During boot, I think it's common practice to link against klibc,
which totally supports static linking.
And I agree, a statically linked busybox is a wonderful thing.

> So, what do you mean when saying static linking
> against glibc is not really supported? Do you refer to particular
> systems or special setups? Could you provide an example?

No special system or setup.  See
http://www.akkadia.org/drepper/no_static_linking.html
http://stackoverflow.com/questions/3430400/linux-static-linking-is-dead
http://sourceware.org/bugzilla/show_bug.cgi?id=631
http://sources.redhat.com/bugzilla/show_bug.cgi?id=1044
glibc decided many years ago to focus only on systems that
supported dynamic linking, and to require its use.
Not a popular decision, but the glibc maintainer has some rather strong
opinions.
- Dan


More information about the CMake mailing list