spoutn1k/mcmap

Compilation issues

el-damiano opened this issue · 2 comments

Hello.
I love your software and was using it previously on my Ubuntu 20.04 LTS installation from the Win10 Store.
However recently I had to reinstall Ubuntu and I'm encountering issues when doing cmake.

This is what I get after typing cmake .

-- The CXX compiler identification is GNU 9.3.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- 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/x86_64-linux-gnu/libz.so (found version "1.2.11")
-- Found PNG: /usr/lib/x86_64-linux-gnu/libpng.so (found version "1.6.37")
-- Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY)
-- Could NOT find QT (missing: QT_DIR)
CMake Warning (dev) at CMakeLists.txt:20 (FIND_PACKAGE):
  Policy CMP0084 is not set: The FindQt module does not exist for
  find_package().  Run "cmake --help-policy CMP0084" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find Qt3 (missing: QT_QT_LIBRARY QT_INCLUDE_DIR QT_MOC_EXECUTABLE)
CMake was unable to find desired Qt version: 3. Set advanced values QT_QMAKE_EXECUTABLE and QT3_QGLOBAL_H_FILE.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/dami/mc/mcmap 

I wanted to see if I can just ignore those errors and went ahead and wrote

make -j

and I got this

Scanning dependencies of target format
[  4%] Building CXX object src/include/fmt/CMakeFiles/format.dir/format.cpp.o
[  8%] Linking CXX static library libformat.a
[  8%] Built target format
Scanning dependencies of target regionReader
Scanning dependencies of target nbt2json
Scanning dependencies of target json2bson
Scanning dependencies of target extractChunk
[ 12%] Building CXX object scripts/CMakeFiles/json2bson.dir/json2bson.cpp.o
[ 16%] Building CXX object scripts/CMakeFiles/extractChunk.dir/extractChunk.cpp.o
[ 20%] Building CXX object scripts/CMakeFiles/regionReader.dir/regionReader.cpp.o
[ 24%] Building CXX object scripts/CMakeFiles/nbt2json.dir/nbt2json.cpp.o
[ 28%] Linking CXX executable ../bin/extractChunk
[ 28%] Built target extractChunk
[ 32%] Linking CXX executable ../bin/regionReader
[ 36%] Linking CXX executable ../bin/json2bson
[ 36%] Built target regionReader
[ 36%] Built target json2bson
[ 40%] Generating colors.bson
Scanning dependencies of target mcmap_core
[ 44%] Building CXX object src/CMakeFiles/mcmap_core.dir/block_drawers.cpp.o
[ 48%] Building CXX object src/CMakeFiles/mcmap_core.dir/canvas.cpp.o
[ 52%] Building CXX object src/CMakeFiles/mcmap_core.dir/chunk.cpp.o
[ 56%] Building CXX object src/CMakeFiles/mcmap_core.dir/colors.cpp.o
[ 60%] Building CXX object src/CMakeFiles/mcmap_core.dir/helper.cpp.o
[ 64%] Building CXX object src/CMakeFiles/mcmap_core.dir/mcmap.cpp.o
[ 68%] Building CXX object src/CMakeFiles/mcmap_core.dir/png.cpp.o
[ 72%] Building CXX object src/CMakeFiles/mcmap_core.dir/savefile.cpp.o
[ 76%] Building CXX object src/CMakeFiles/mcmap_core.dir/section.cpp.o
[ 80%] Building CXX object src/CMakeFiles/mcmap_core.dir/settings.cpp.o
[ 84%] Building CXX object src/CMakeFiles/mcmap_core.dir/worldloader.cpp.o
[ 88%] Linking CXX executable ../bin/nbt2json
[ 88%] Built target nbt2json
[ 92%] Linking CXX static library libmcmap_core.a
[ 92%] Built target mcmap_core
Scanning dependencies of target mcmap
[ 96%] Building CXX object src/cli/CMakeFiles/mcmap.dir/cli.cpp.o
[100%] Linking CXX executable ../../bin/mcmap
[100%] Built target mcmap

But in the end I was unable to invoke it. Tried with "mcmap" ".mcmap" and how I used to do it "./mcmap"

I tried installing GTest and QT, but I ended up with more issues than before and it felt quite time consuming. On top of that I didn't have to do that the last time I used your software so I decided to ask you for help.

Hello,

I am glad you are liking the program ! You must have had an ancient version if you used ./mcmap. I changed a bunch of things, and to clean things up, I moved the binary to the bin directory.

I take it you are from the Windows ecosystem. On the command line, you can run custom commands by writing their 'path': the list of directories/sub-directory/sub-subdirectory.. to arrive to the binary. What you did when writing ./mcmap was telling the computer "I want the mcmap binary to run from here (which is . in OS language)".

Now as I moved all binaries to ./bin, you just have to run ./bin/mcmap instead. I am sorry for the trouble it created, but I switched to a more reliable build system and this was the cleanest thing to do.

Thank you kindly for the quick reply!

And yeah you were right my version was ancient lol the current one runs so much faster.
Well with this I'll close this thread thanks a lot again.

Have a good one!