-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Statically linked executable #547
Comments
Update:
So we're left with 4) the wrapper and 6) adjusting Ubuntu versions. I'll first experiment with the possibility of installing a recent version of Clang and libc++ on Ubuntu 20.04 and building MrDocs this way. MrDocs would use libc++. If that works, we can use that as the official Linux release, which will work on Ubuntu >20.04. This should solve the problem with Boost release-tools. |
As described in #562 (comment), solution 6 (Mrdocs downgrading ubuntu) didn't work very well: it's overly complex, hard to maintain, slow to test, not general enough, and it just failed to work properly. Considering these limitations, the next idea I'll explore to solve #547 is solution (4) a wrapper overriding system libs. This strategy is somewhat similar to what APBuild does but it's manual and more stable. It's similar to how CMake provides its binaries. It basically consists of patching the release so that:
This has the following benefits:
|
Because of how time-consuming it is to build mrdocs, the way mrdocs is supposed to be used is with scripts that download portable executables and run the tool. These scripts will usually be run in CI on some ubuntu-X container. So we need to provide portable executables people can use.
The problem is we're using recent versions of ubuntu (ubuntu 23.04 now) because of the C++ features we need but users (including the boost release scripts) are usually using earlier versions of ubuntu (usually from 18.04 to 22.04) for a variety of reasons. And binaries built on ubuntu X (say 23.04) don't work under ubuntu <X (say 20.04).
I read about the solutions people proposed in #boost and wrote this summary of alternatives to the problem. I'm initially tempted to experiment with musl and a system libs wrapper.
Most solutions above would require us to rebuild all dependencies with
-static
/musl
/cosmopolitan
/-ffreestanding
and might end up depending on other tools. Each solution is also quite complex and with lots of caveats. There's no way to know if it's going to work before testing.-static
/-static-libgcc
worked sometimes-static
gives us an error when trying to linknlibtinfo.so
-static-libgcc
still asks forGLIBC_2.36
in ubuntu 20.04 when looking forlibc.so.6
-static-libgcc
and builds LLVM with-DDBUILD_SHARED_LIBS=OFF -DLLVM_BUILD_STATIC=ON
-static-libgcc
really works there or if it just works because they're compiling the tools with ubuntu-20.04 which should have no conflicts with later versions of ubuntu anyway-ffreestanding
compile modeThe text was updated successfully, but these errors were encountered: