abunchofhacks / Epicinium

A strategy game with simultaneous turns where nature is a finite resource
GNU Affero General Public License v3.0
47 stars 5 forks source link

Building fails on Mac M1 Monterey 12.2.1 #7

Open kkwteh opened 2 years ago

kkwteh commented 2 years ago

I setup my settings.json file and ran make.

I've pasted the last few lines of the output below. I tried googling the error "ld: library not found for -lstdc++fs" but didn't find anything.

c++  -std=c++11 -MT .obj/.pic/libs/jsoncpp/jsoncpp.o -MMD -MP -MF .dep/.pic/libs/jsoncpp/jsoncpp.Td -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -ffunction-sections -fdata-sections -O3   -I ./   -o .obj/.pic/libs/jsoncpp/jsoncpp.o -c .pic/libs/jsoncpp/jsoncpp.cpp
mv -f .dep/.pic/libs/jsoncpp/jsoncpp.Td .dep/.pic/libs/jsoncpp/jsoncpp.d
c++  -std=c++11 -MT .obj/.o -MMD -MP -MF .dep/.Td -o bin/sanitychecker .obj/src/build/sanitychecker.o .obj/.pic/src/common/.cu-common.o .obj/.pic/src/common/dictator.o .obj/.pic/src/common/system.o .obj/.pic/src/common/validation.o .obj/.pic/src/common/version.o .obj/.pic/src/logic/.cu-automaton.o .obj/.pic/src/logic/.cu-logic.o .obj/.pic/src/logic/bible.o .obj/.pic/libs/jsoncpp/jsoncpp.o -Wl,-rpath,@executable_path/ -Lbin -lstdc++ -lstdc++fs    -O3   -lz -lm -pthread
ld: library not found for -lstdc++fs
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [bin/sanitychecker] Error 1
SLiV9 commented 2 years ago

Hi, unfortunately compiling this project on Mac is quite dependent on OS version and Xcode version, and the current Makefile is not expressive enough to deal with that.

Could you try removing -lstdc++fs (but not -lstdc++) from lines 355 and 365 of the Makefile and running make again?