actboy168 / luamake

MIT License
171 stars 36 forks source link

gcc 10 build fail #5

Closed Jackson-soft closed 9 months ago

Jackson-soft commented 4 years ago

❯ ninja -f ninja/linux.ninja [0/3] cd 3rd/bee.lua && ninja -f ninja/linux.ninja [2/2] build/linux/bin/bootstrap test/test.lua FAILED: build/linux//test build/linux/bin/bootstrap test/test.lua OS: Linux Arch: 64 Compiler: GCC 10.1.0 CRT: libstdc++ 20200507 DEBUG: false .... ninja: build stopped: subcommand failed. FAILED: build/linux//bee cd 3rd/bee.lua && ninja -f ninja/linux.ninja ninja: build stopped: subcommand failed.

actboy168 commented 4 years ago

This is a gcc bug. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96040

mcepl commented 3 years ago

That bug is supposed to be fixed in 10.2:

luamake@stitny (master)$ ninja -v -f ninja/linux.ninja
[0/3] cd 3rd/bee.lua && ninja -f ninja/linux.ninja
[2/2] build/linux/bin/bootstrap test/test.lua
FAILED: build/linux/_/test
build/linux/bin/bootstrap test/test.lua
OS:         Linux
Arch:       64
Compiler:   GCC 10.2.1
CRT:        libstdc++ 20201202 glibc 2.33
DEBUG:      false
..............................................terminate called after throwing an instance of 'std::system_error'
  what():  Enable multithreading to use std::thread: Operation not permitted
ninja: build stopped: subcommand failed.
FAILED: build/linux/_/bee
cd 3rd/bee.lua && ninja -f ninja/linux.ninja
ninja: build stopped: subcommand failed.
luamake@stitny (master)$
actboy168 commented 3 years ago

@mcepl https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67791

mcepl commented 3 years ago

@mcepl https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67791

Well, but that warning means that there is a bug in luamake (Enable multithreading to use std::thread:), doesn’t it?

actboy168 commented 3 years ago

No. As the bug report said, gcc cannot handle pthread_create in dynamic libraries correctly.

mcepl commented 3 years ago

It was enough to build luamake to:

cd 3rd/bee.lua/
git checkout master
git pull
ninja -vvv -f ninja/linux.ninja
..
ninja -vvv -f ninja/linux.ninja