Jakz / openmom

A cross-platform open source port of Master of Magic game from Microprose
GNU General Public License v3.0
98 stars 8 forks source link

Crash when configuring #1

Closed rtentser closed 5 years ago

rtentser commented 5 years ago

I've tried to configure the engine on Debian Stretch. I don't know cmake so i googled it and use this command: cmake -DNAME_OF_SETTING=VALUE I get this output:

Build Type is Debug
Base flags are  -Wno-reorder -Wno-inconsistent-missing-override -std=c++14 -stdlib=libstdc++ -fdiagnostics-show-option
Debug flags are -O0 -g -fstandalone-debug  -Wno-reorder -Wno-inconsistent-missing-override -std=c++14 -stdlib=libstdc++ -fdiagnostics-show-option
CMake Error at /usr/share/cmake-3.9/Modules/CMakeDetermineSystem.cmake:174 (file):
  file attempted to write a file:
  /home/rtentser/Sources/openmom/CMakeFiles/CMakeOutput.log into a source
  directory.
Call Stack (most recent call first):
  CMakeLists.txt:77 (project)

CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
murlock commented 5 years ago

I've also met this issue: Solution is very easy, just copy (or link) the cmake/FindSDL2_image.cmake as cmake/FindSDL2_Image.cmake

rtentser commented 5 years ago

It doesn't work for me.

murlock commented 5 years ago

Sorry, I've misread your log.

Can you retry in empty directory and launch cmake <src_path> ?

rtentser commented 5 years ago

I've tried. That's what i've got:

-- The C compiler identification is GNU 6.3.0 -- The CXX compiler identification is GNU 6.3.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- 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

-- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Found SDL2: /usr/lib/i386-linux-gnu/libSDL2main.a;/usr/lib/i386-linux-gnu/libSDL2.so;-lpthread CMake Error at CMakeLists.txt:8 (find_package): By not providing "FindSDL2_Image.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "SDL2_Image", but CMake did not find one. Could not find a package configuration file provided by "SDL2_Image" with any of the following names: SDL2_ImageConfig.cmake sdl2_image-config.cmake Add the installation prefix of "SDL2_Image" to CMAKE_PREFIX_PATH or set "SDL2_Image_DIR" to a directory containing one of the above files. If "SDL2_Image" provides a separate development package or SDK, be sure it has been installed. CMake Warning (dev) in CMakeLists.txt: No cmake_minimum_required command is present. A line of code such as cmake_minimum_required(VERSION 3.9) should be added at the top of the file. The version specified may be lower if you wish to support older CMake versions for this project. For more information run "cmake --help-policy CMP0000". This warning is for project developers. Use -Wno-dev to suppress it. -- Configuring incomplete, errors occurred! See also "/home/rtentser/Sources/empty/CMakeFiles/CMakeOutput.log". See also "/home/rtentser/Sources/empty/CMakeFiles/CMakeError.log".

CMakeCache.txt CMakeError.log CMakeOutput.log

murlock commented 5 years ago

For the SDL2_ImageConfig.cmake missing, my first comment is valid ;)

But I've met lot of issues after that, check #3

rtentser commented 5 years ago

Yes, i've copied the file again, installed libsdl2-image-dev and configured the game from empty directory successfully (there is a cmake warning). So it was just a wrong filename + missing dependency. I didn't try to build the project yet.

Will you create a pull request to fix the file name issue?

Jakz commented 5 years ago

I fixed the naming issue in master branch, now this shouldn't be present anymore. This got unnoticed because I'm working on a case insensitive file system.