Statically Building and Linking to a fully statically-liked Application #3141
Unanswered
DonatoMastropietro
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Everyone, I'm looking around for instructions on how to correctly statically compile, then link multiple utility libraries all together.
The docs and even the
--help
option for theconfigure
script are fairly straightforward and it's easy enough to produce a couple*.a
libs (saylibuuid.a
andlibblkid.a
for example). But these libraries (and others, takelibmount.a
) share symbols that when linked into the same application cause issues. I think it's because they include similar header files: For example themd5.h
header is included in both libuuid/src/gen_uuid.c and libblkid/src/superblocks/hfs.c.I think this "double include" is the root cause for the linker findings multiple definitions of the
ul_MD5Init
,ul_MD5Update
,ul_MD5Transform
, andul_MD5Final
symbols when linking both thelibuuid.a
andlibblkid.a
libs with my application.What am I missing / not understanding about this compilation process and what is the correct way, if there is one, to compile multiple util-linux programs (pkgs?) for a fully-statically linked application?
Beta Was this translation helpful? Give feedback.
All reactions