Closed mjeveritt closed 2 years ago
Manually running the text2c.sh script as per data/CMakeLists.txt, and creating the relevant header files, the build completes correctly, however, it's noticeable that main.cc is compiled -before- the text2c invocations triggered by CMake ! (further log to be re-uploaded)
I heave the same problem for some time as well and I finally forced myself to look at it as I was curious why this affects only systems with musl
libc and I found this. The default ninja target looks like this
build all: phony lua/all data/all doc/all 3rdparty/toluapp/all src/all tests/all
ninja
on glibc
system builds dependencies from left to right, therefore data/all
, where defconfig.h
and convertconf.h
are generated, are built at the beginning and they are usually done before they are needed in src/all
even for parallelize builds. However, on musl
system it starts with src/all
and because of the missing dependencies it obviously cannot locate those header files.
Anyway, I was curious what causes this difference in the build sequence and the reason is that ninja
sorts dependency edges by memory address (a least in version 1.10.*
) and I presume that the structures behind memory allocators in glibc and musl differs significantly :). This behavior of ninja
was changed/fixed in PR https://github.com/ninja-build/ninja/pull/1866.
@arkamar Dude, I owe you a few beers for this! Thanks! That's certainly a weird ole bug/feature .. but at least it's been found/fixed! Cheers! :beers:
@mjeveritt you're welcome!
Issue
Cmake fails with:
when
BUILD_BUILTIN_CONFIG
and/orBUILD_OLD_CONFIG
is specifiedInformation
NB. This is not unique to v1.11.6, it just so happens this version is active/stable in Gentoo Linux at the time I am writing this, and build logs are readily available