Static GLIBC compiling

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
martinrame
Posts: 347
Joined: Mon, 2009-02-23, 19:57

Static GLIBC compiling

#1 Post by martinrame »

Hi, I have a couple of dcmtk based programs installed in different versions of Ubuntu Linux. When I update and deploy those I get errors similar to this:
/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21'
When the version of GLIBC from compiled differs from the deployment machine.

Is there a way to statically link GLIBC to avoid this issue?.

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1445
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

Re: Static GLIBC compiling

#2 Post by Marco Eichelberg »

You can try adding "-static -static-libgcc" to CXXFLAGS after running configure or CMake. This should normally generate a static binary that does not require any shared library, however this very much depends on how gcc and the C libraries (glibc, libstdc++) are installed in your system.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest