Opened 21 months ago
Closed 18 months ago
#74 closed defect (wontfix)
make static failures - Divine 4.3.2
Reported by: | imartisko | Owned by: | mornfall |
---|---|---|---|
Priority: | major | Milestone: | 4.3 |
Component: | other | Keywords: | |
Cc: | jamartis@…, kdudka@… |
Description
Hello,
based on the info from the issue #73, we are trying to make the static build of the divine, however the build fails with errors.
The build fails with the attached error log, this causes the cmake, to fail the tests regarding the c++11 compatibility and ends with the "C++11 or greater is required but the compiler does not support c++11" error. When we tried to build/link the "cmTC_a6c04" file manually, we were able to get rid of the error by removing the "-nodefaultlibs" option.
We use the patches from the issue #71, and build using the gcc/g++ (switching to clang did not seem to have any effect). We use the stable 4.3.2 release.
Thanks,
Jakub
Attachments (1)
Change History (5)
Changed 21 months ago by
Attachment: | CMakeError.log added |
---|
comment:1 Changed 21 months ago by
comment:2 Changed 21 months ago by
I've tried the using the local.make, but the build still fails, and there seems to be no changes int the error log (I've tried this with the 4.3.4 version).
comment:3 Changed 18 months ago by
Status: | new → accepted |
---|
The magic incantation that works around the problem on Debian stable is LDFLAGS = -lc -lgcc -lgcc_eh ... don't ask. I am not sure there is a portable fix for this, other than waiting for libc++ to get their act together (we are currently at libc++ 9, which is pretty new and the build still fails on Debian without the above... it works okay on Alpine, which we normally use for static builds, since that way they are actually static, unlike the mess one gets with glibc).
comment:4 Changed 18 months ago by
Resolution: | → wontfix |
---|---|
Status: | accepted → closed |
Turns out that static builds on glibc systems are broken anyway: https://sourceware.org/bugzilla/show_bug.cgi?id=15648 -- I don't think we have the capacity to find a workaround for this. For future reference, these tweaks are required for static builds to work on Alpine Linux (which uses musl libc):
toolchain_FLAGS = LIBCXX_HAS_MUSL_LIBC=ON; static_FLAGS = OPT_TBBMALLOC=OFF;LLVM_ENABLE_TERMINFO=OFF; CXXFLAGS_ = -D_LIBCPP_HAS_MUSL_LIBC
Can you try setting
LDFLAGS = -lgcc
inlocal.make
? The-nodefaultlibs
comes from libc++ upstream and I would prefer to not change their cmake stuff more than required. Hopefully this will get resolved when we updatelibc++
.