Closed DorianK29 closed 5 months ago
@xieamoe any thoughts?
It's the same error I got trying to compile on Windows, I believe. Xmake lua error.
@DorianK29 Please post the full log by running xmake -vD
Skipped clang-format run for target: gd-tools
[ 8%]: cache compiling.release src/precompiled.h
/usr/bin/gcc -c -m64 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -O2 -std=c++23 -I build/.objs/gd-tools/linux/x86_64/release/src/cxx -isystem /home/user/.xmake/packages/c/cpr/1.10.5/a843d29c3c92427ea845ec3d1f857233/include -isystem /home/user/.xmake/packages/l/libcurl/8.6.0/89fe72f249d24b2dabfbea19efe58bfd/include -isystem /home/user/.xmake/packages/n/nlohmann_json/v3.11.3/e149edbbe9eb49578665e1f621062ffd/include -isystem /home/user/.xmake/packages/m/marisa/v0.2.6/5a0e09c409624b3f9697d07471b0f3d1/include -isystem /home/user/.xmake/packages/r/rdricpp/v0.3/ca84005cd58b4997990298dc5f4c17bc/include -isystem /home/user/.xmake/packages/m/mecab/0.996/8b975ce961c243cc921defddf452f954/include -Wno-error=maybe-uninitialized -fstack-protector-strong -fstack-clash-protection -Wall -Wextra -Wpedantic -Wconversion -Wshadow -Werror -D_GLIBCXX_ASSERTIONS -DNDEBUG -x c++-header -o build/.objs/gd-tools/linux/x86_64/release/src/cxx/precompiled.h.gch src/precompiled.h
error: @programdir/core/main.lua:329: attempt to compare table with string
stack traceback:
[C]: in function 'sort'
[@programdir/rules/plugin/compile_commands/xmake.lua:61]: in function 'buildscript'
[@programdir/actions/build/main.lua:97]: in function '_do_project_rules'
[@programdir/actions/build/main.lua:144]: in function 'catch'
[@programdir/core/sandbox/modules/try.lua:123]: in function 'try'
[@programdir/actions/build/main.lua:118]: in function 'build_targets'
[@programdir/actions/build/main.lua:201]:
[C]: in function 'xpcall'
[@programdir/core/base/utils.lua:275]:
[@programdir/core/base/task.lua:491]: in function 'run'
[@programdir/core/main.lua:327]: in function 'cotask'
[@programdir/core/base/scheduler.lua:406]:
stack traceback:
[C]: in function 'error'
@programdir/core/base/os.lua:957: in function 'os.raiselevel'
(...tail calls...)
@programdir/core/main.lua:329: in upvalue 'cotask'
@programdir/core/base/scheduler.lua:406: in function <@programdir/core/base/scheduler.lua:399>
It builds successfully in CI now. Does it build on your computer too?
[ 8%]: cache compiling.release src/precompiled.h
/usr/bin/gcc -c -m64 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -O2 -std=c++23 -I build/.objs/gd-tools/linux/x86_64/release/src/cxx -isystem /home/user/.xmake/packages/c/cpr/1.10.5/a843d29c3c92427ea845ec3d1f857233/include -isystem /home/user/.xmake/packages/l/libcurl/8.6.0/89fe72f249d24b2dabfbea19efe58bfd/include -isystem /home/user/.xmake/packages/n/nlohmann_json/v3.11.3/e149edbbe9eb49578665e1f621062ffd/include -isystem /home/user/.xmake/packages/m/marisa/v0.2.6/5a0e09c409624b3f9697d07471b0f3d1/include -isystem /home/user/.xmake/packages/r/rdricpp/v0.3/ca84005cd58b4997990298dc5f4c17bc/include -isystem /home/user/.xmake/packages/m/mecab/0.996/8b975ce961c243cc921defddf452f954/include -Wno-error=maybe-uninitialized -fstack-protector-strong -fstack-clash-protection -Wall -Wextra -Wpedantic -Wconversion -Wshadow -Werror -D_GLIBCXX_ASSERTIONS -DNDEBUG -x c++-header -o build/.objs/gd-tools/linux/x86_64/release/src/cxx/precompiled.h.gch src/precompiled.h
checking for flags (-MMD -MF) ... ok
checking for flags (-fdiagnostics-color=always) ... ok
create ok!
compile_commands.json updated!
error: src/precompiled.h:8:10: fatal error: format: No such file or directory
8 | #include <format>
| ^~~~~~~~
compilation terminated.
fatal error: format: No such file or directory
That's a different issue. if <format>
is not found, it is most likely an outdated gcc
version. I think you need at least 13.2.
Built successfuly after I changed the gcc version.
rm /usr/bin/gcc
rm /usr/bin/g++
ln -s /usr/bin/gcc-13 /usr/bin/gcc
ln -s /usr/bin/g++-13 /usr/bin/g++
OS: Ubuntu 22.04.4 Steps:
then I get this error.
I tried building older commits, but they also gave the same error, but on different header files.