TeamHypersomnia / Hypersomnia

Multiplayer top-down shooter made from scratch in C++. Play in your Browser! https://hypersomnia.io Made in 🇵🇱
https://hypersomnia.io/
GNU Affero General Public License v3.0
1.18k stars 52 forks source link

ninja: build stopped: subcommand failed. #269

Closed vberezhnev closed 1 year ago

vberezhnev commented 1 year ago

Issue

Installation error with one-shot launch:

ninja run -C build/current

ninja: Entering directory `build/current'
[1/607] Building CXX object cmake/version_file_generator.../version_file_generator.dir/version_file_generator.cpp.o
FAILED: cmake/version_file_generator/CMakeFiles/version_file_generator.dir/version_file_generator.cpp.o
/usr/bin/clang++ -DPLATFORM_UNIX=1 -I/home/chopin/Templates/git/Hypersomnia/build/RelWithDebInfo-x64-clang/generators_output -I/home/chopin/Templates/git/Hypersomnia/cmake/version_file_generator/../../src -std=c++20 -stdlib=libc++ -O2 -g -DNDEBUG -MD -MT cmake/version_file_generator/CMakeFiles/version_file_generator.dir/version_file_generator.cpp.o -MF cmake/version_file_generator/CMakeFiles/version_file_generator.dir/version_file_generator.cpp.o.d -o cmake/version_file_generator/CMakeFiles/version_file_generator.dir/version_file_generator.cpp.o -c /home/chopin/Templates/git/Hypersomnia/cmake/version_file_generator/version_file_generator.cpp
/home/chopin/Templates/git/Hypersomnia/cmake/version_file_generator/version_file_generator.cpp:3:10: fatal error: 'iostream' file not found
#include <iostream>
         ^~~~~~~~~~
1 error generated.
[2/607] Building CXX object cmake/Introspector-generator/CMakeFiles/Introspector-generator.dir/src/main.cpp.o
FAILED: cmake/Introspector-generator/CMakeFiles/Introspector-generator.dir/src/main.cpp.o
/usr/bin/clang++  -I/home/chopin/Templates/git/Hypersomnia/build/RelWithDebInfo-x64-clang/generators_output -std=gnu++1z -stdlib=libc++ -O2 -g -DNDEBUG -MD -MT cmake/Introspector-generator/CMakeFiles/Introspector-generator.dir/src/main.cpp.o -MF cmake/Introspector-generator/CMakeFiles/Introspector-generator.dir/src/main.cpp.o.d -o cmake/Introspector-generator/CMakeFiles/Introspector-generator.dir/src/main.cpp.o -c /home/chopin/Templates/git/Hypersomnia/cmake/Introspector-generator/src/main.cpp
/home/chopin/Templates/git/Hypersomnia/cmake/Introspector-generator/src/main.cpp:1:10: fatal error: 'algorithm' file not found
#include <algorithm>
         ^~~~~~~~~~~
1 error generated.
[6/607] Building C object src/3rdparty/vorbis/lib/CMakeFiles/vorbis.dir/sharedbook.c.o
ninja: build stopped: subcommand failed.

System information

Arch Linux; All dependencies have been established

geneotech commented 1 year ago

That is extremely strange, I just tested the script and it builds the game smoothly. It's like you're missing the entire standard library.

Do you have libc++ installed?

vberezhnev commented 1 year ago

OK, so sudo pacman -S libc++ lld solved the problem. Thanks