Closed PaulBone closed 1 year ago
I tested this on Alpine (which is also based on musl) and got the same result. I used the git checkout for plasma: commit 02a31b59d9ad5526a1456f79349301916fa1b3fc
gcompat is not installed on Alpine by default, so that didn't make any difference.
musl doesn't include the entire feature set of libc, so it's likely that __WORDSIZE isn't defined in musl.
So I added -D__WORDSIZE=64 to the C_CXX_FLAGS in build.mk and it actually didn't crash anymore, but it did crash on a different error:
runtime/pz_gc_debug.cpp: In member function 'void pz::Heap::print_addr_info(void*) const':
runtime/pz_gc_debug.cpp:221:13: error: 'ptrdiff_t' was not declared in this scope; did you mean 'std::ptrdiff_t'?
221 | ptrdiff_t diff = (uint8_t *)cell_bop.pointer() - (uint8_t *)addr;
| ^~~~~~~~~
| std::ptrdiff_t
In file included from /usr/include/c++/11.2.1/cstdlib:41,
from /usr/include/c++/11.2.1/stdlib.h:36,
from runtime/pz_common.h:18,
from runtime/pz_gc_debug.cpp:9:
/usr/include/c++/11.2.1/x86_64-alpine-linux-musl/bits/c++config.h:281:33: note: 'std::ptrdiff_t' declared here
281 | typedef __PTRDIFF_TYPE__ ptrdiff_t;
| ^~~~~~~~~
runtime/pz_gc_debug.cpp:226:21: error: 'diff' was not declared in this scope
226 | diff,
| ^~~~
runtime/pz_gc_debug.cpp:249:13: error: 'ptrdiff_t' was not declared in this scope; did you mean 'std::ptrdiff_t'?
249 | ptrdiff_t diff = (uint8_t *)cell_fit.pointer() - (uint8_t *)addr;
| ^~~~~~~~~
| std::ptrdiff_t
In file included from /usr/include/c++/11.2.1/cstdlib:41,
from /usr/include/c++/11.2.1/stdlib.h:36,
from runtime/pz_common.h:18,
from runtime/pz_gc_debug.cpp:9:
/usr/include/c++/11.2.1/x86_64-alpine-linux-musl/bits/c++config.h:281:33: note: 'std::ptrdiff_t' declared here
281 | typedef __PTRDIFF_TYPE__ ptrdiff_t;
| ^~~~~~~~~
runtime/pz_gc_debug.cpp:254:21: error: 'diff' was not declared in this scope
254 | diff,
| ^~~~
make: *** [Makefile:192: runtime/pz_gc_debug.o] Error 1
I didn't go down the rabbit hole yet, but maybe this provides some extra clues for people who know more about C and C++.
Thanks @Gertm I'll keep my eyes open for that when I fix this.
A user reported this problem: