On 11/03/2011 10:18 PM, Dan Kegel wrote:
> On Thu, Nov 3, 2011 at 7:51 AM, Mauricio Klein
> <mauricio.klein....@gmail.com> wrote:
>> One last question: i've tried to compile my code using static linkage, once
>> i need my daemon runs in many Linux releases.
> 
> 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... and
> since these are internal interfaces, they have changed
> in incompatible ways in the past.  So beware!
> While it may be ok to link statically to most libraries,
> glibc should always be linked dynamically.

If you will ever meet with a little accident while updating glibc
without a package manager, a common procedure is to use statically
linked utilities, i.e. utilities capable to run without the ruined
glibc, at least in order to repair symlinks, e.g. Another occasion
for the use of statically linked executables without any reference
to glibc and friends is an initramfs that often doesn't have a lib
directory at all. 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?

> If you are still having problems after going back to
> dynamically linking with glibc, please post source code
> for a tiny test program that exhibits the problem, along
> with how you built and tested it, and the log showing the
> failure.

Yep, message after failed invocation, ldd, linker command etc.

Regards,

Michael
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to