spoutn1k / mcmap

Pixel-art map visualizer for Minecraft. Maps are drawn from an isometric perspective.
GNU General Public License v3.0
312 stars 45 forks source link

issue with building on macOS #80

Closed Agrrox closed 2 years ago

Agrrox commented 2 years ago

Hello I get the following error when I try to build the program.

mac:build macpro$ make -j
[  3%] Building CXX object src/include/fmt/CMakeFiles/format.dir/format.cc.o
[  7%] Linking CXX static library libformat.a
[  7%] Built target format
[ 17%] Building CXX object scripts/CMakeFiles/extractChunk.dir/extractChunk.cpp.o
[ 17%] Building CXX object scripts/CMakeFiles/regionReader.dir/regionReader.cpp.o
[ 21%] Building CXX object scripts/CMakeFiles/json2bson.dir/json2bson.cpp.o
[ 21%] Building CXX object scripts/CMakeFiles/nbt2json.dir/nbt2json.cpp.o
/Users/macpro/mcmap/scripts/json2bson.cpp:1:10: fatal error: 'filesystem' file not found
#include <filesystem>
         ^~~~~~~~~~~~
/Users/macpro/mcmap/scripts/nbt2json.cpp:1:10: fatal error: 'filesystem' file not found
#include <filesystem>
         ^~~~~~~~~~~~
/Users/macpro/mcmap/scripts/extractChunk.cpp:1:10: fatal error: 'filesystem' file not found
#include <filesystem>
         ^~~~~~~~~~~~
/Users/macpro/mcmap/scripts/regionReader.cpp:1:10: fatal error: 'filesystem' file not found
#include <filesystem>
         ^~~~~~~~~~~~
1 error generated.
make[2]: *** [scripts/CMakeFiles/regionReader.dir/regionReader.cpp.o] Error 1
make[1]: *** [scripts/CMakeFiles/regionReader.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
1 error generated.
make[2]: *** [scripts/CMakeFiles/extractChunk.dir/extractChunk.cpp.o] Error 1
make[1]: *** [scripts/CMakeFiles/extractChunk.dir/all] Error 2
1 error generated.
make[2]: *** [scripts/CMakeFiles/json2bson.dir/json2bson.cpp.o] Error 1
make[1]: *** [scripts/CMakeFiles/json2bson.dir/all] Error 2
1 error generated.
make[2]: *** [scripts/CMakeFiles/nbt2json.dir/nbt2json.cpp.o] Error 1
make[1]: *** [scripts/CMakeFiles/nbt2json.dir/all] Error 2
make: *** [all] Error 2
spoutn1k commented 2 years ago

Hello what is your compiler version ? It might be outdated ! I also know some people have issues with the PNG library on macOS so let me know if you see any of those and I'll do my best to help you with that too.

Agrrox commented 2 years ago

macOS: 10.13.6 High Sierra CMake 3.23.0 libpng 1.6.37

spoutn1k commented 2 years ago

None of those are compilers. Please include the output of:

cd <mcmap repo>
cmake -S . -B newbuild

On my machine:

mcmap> cmake -S . -B newbuild
-- The CXX compiler identification is GNU 11.2.0
                                      ^^^^^^^^^^ This is the compiler version
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
                                   ^^^^^^^^^^^^ This is the compiler path
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
-- Found ZLIB: /usr/lib/libz.so (found version "1.2.11") 
-- Found PNG: /usr/lib/libpng.so (found version "1.6.37") 
-- Found GTest: /usr/lib64/cmake/GTest/GTestConfig.cmake (found version "1.11.0")  
-- Successfully downloaded https://github.com/nlohmann/json/releases/download/v3.9.1/json.hpp
-- Successfully downloaded https://raw.githubusercontent.com/fmtlib/fmt/8.0.0/include/fmt/core.h
-- Successfully downloaded https://raw.githubusercontent.com/fmtlib/fmt/8.0.0/include/fmt/format.h
-- Successfully downloaded https://raw.githubusercontent.com/fmtlib/fmt/8.0.0/include/fmt/format-inl.h
-- Successfully downloaded https://raw.githubusercontent.com/fmtlib/fmt/8.0.0/include/fmt/color.h
-- Successfully downloaded https://raw.githubusercontent.com/fmtlib/fmt/8.0.0/src/format.cc
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jb/Projects/mcmap/newbuild
Agrrox commented 2 years ago
mac:mcmap macpro$ cmake -S . -B newbuild
-- The CXX compiler identification is AppleClang 9.1.0.9020039
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES) 
-- Could NOT find OpenMP (missing: OpenMP_CXX_FOUND) 
-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.11") 
-- Found PNG: /usr/local/lib/libpng.dylib (found version "1.6.37") 
-- Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY) 
CMake Warning at CMakeLists.txt:20 (FIND_PACKAGE):
  By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5", but
  CMake did not find one.

  Could not find a package configuration file provided by "Qt5" with any of
  the following names:

    Qt5Config.cmake
    qt5-config.cmake

  Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
  to a directory containing one of the above files.  If "Qt5" provides a
  separate development package or SDK, be sure it has been installed.

-- Successfully downloaded https://github.com/nlohmann/json/releases/download/v3.9.1/json.hpp
-- Successfully downloaded https://raw.githubusercontent.com/fmtlib/fmt/8.0.0/include/fmt/core.h
-- Successfully downloaded https://raw.githubusercontent.com/fmtlib/fmt/8.0.0/include/fmt/format.h
-- Successfully downloaded https://raw.githubusercontent.com/fmtlib/fmt/8.0.0/include/fmt/format-inl.h
-- Successfully downloaded https://raw.githubusercontent.com/fmtlib/fmt/8.0.0/include/fmt/color.h
-- Successfully downloaded https://raw.githubusercontent.com/fmtlib/fmt/8.0.0/src/format.cc
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/macpro/mcmap/newbuild
spoutn1k commented 2 years ago

Hey so as you can see the compiler (AppleClang) version is 9.x, so it is not compatible to compile mcmap with :/ Please upgrade it using Xcode or install another compiler using brew. All of that is detailed in the README.