cppalliance / mrdocs

MrDocs: A Clang/LLVM tool for building reference documentation from C++ code and javadoc comments.
https://mrdocs.com
Other
75 stars 16 forks source link

ci: statically link libc #546

Closed alandefreitas closed 6 months ago

alandefreitas commented 6 months ago

Move configuration values to the matrix action and statically links both libgcc and libstdc++.

Since we are using the latest version of ubuntu in our workflow, this is intended to allow the release binaries to work on any earlier version of ubuntu. This is required by the Antora scripts in the Boost release tools.

alandefreitas commented 6 months ago

@sdkrystian I'm getting

    Target "mrdocs" links to target "Terminfo::terminfo" but the target was not
    found.  Perhaps a find_package() call is missing for an IMPORTED target, or
    an ALIAS target is missing?

in CI. Do we need to recompile LLVM to fix that?

alandefreitas commented 6 months ago

Yes. I can't get this to work the simple way. If I use -static I get

/usr/bin/ld: attempted static link of dynamic object `/usr/lib/x86_64-linux-gnu/libtinfo.so'

On the other hand, -static-libgcc compiles in ubuntu 23.04 but it's not enough to make it work on ubuntu 20.04.

+ mrdocs --version
mrdocs: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.36' not found (required by mrdocs)
alandefreitas commented 6 months ago

Closing this PR as this is not the best alternative to fix #547. See #547 and #548.