Troubles building STK on Windows 7 (CMake, MinGW)

Troubles building STK on Windows 7 (CMake, MinGW)

Postby XGhost » 14 Aug 2015, 10:56

Hello everyone

I have troubles to build STK on Windows 7 with CMake + MinGW. I'm not familiar with CMake at all, so maybe it is a simple mistake on my side.
I followed all the instructions from the readme file here. But when I run
{l Code}: {l Select All Code}
cmake .. -G "MinGW Makefiles"

in terminal, I got following output:
{l Code}: {l Select All Code}
The C compiler identification is GNU 4.8.1
The CXX compiler identification is GNU 4.8.1
Check for working C compiler: K:/MinGW/bin/gcc.exe
Check for working C compiler: K:/MinGW/bin/gcc.exe -- 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: K:/MinGW/bin/g++.exe
Check for working CXX compiler: K:/MinGW/bin/g++.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
No build type selected, default to STKRelease
Found OpenGL: opengl32 
Could NOT find ZLIB (missing:  ZLIB_INCLUDE_DIR)
CMake Error at K:/Programme (x86)/CMake/share/cmake-3.1/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
  Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
Call Stack (most recent call first):
  K:/Programme (x86)/CMake/share/cmake-3.1/Modules/FindPackageHandleStandardArgs.cmake:374 (_FPHSA_FAILURE_MESSAGE)
  K:/Programme (x86)/CMake/share/cmake-3.1/Modules/FindPNG.cmake:121 (find_package_handle_standard_args)
  lib/irrlicht/CMakeLists.txt:2 (find_package)


Configuring incomplete, errors occurred!
See also "K:/Julian/GitHub/SuperTuxKart/stk-code/build/CMakeFiles/CMakeOutput.log".


How can I point CMake to the Zlib and libPNG libraries?

Many thanks in advance.
User avatar
XGhost
 
Posts: 147
Joined: 02 Jan 2014, 15:49
Location: Zurich (Switzerland)

Re: Troubles building STK on Windows 7 (CMake, MinGW)

Postby deve » 14 Aug 2015, 11:18

You need to have mingw dependencies instead of VS dependencies in your STK directory. Can be found here:
https://github.com/supertuxkart/depende ... dows-mingw
deve
 
Posts: 268
Joined: 23 Jan 2014, 13:45

Re: Troubles building STK on Windows 7 (CMake, MinGW)

Postby XGhost » 14 Aug 2015, 12:21

How could I oversee that :) .
Now CMake finishes without problems, but when I build the project I got an "internal compiler error: Segmentation fault":
{l Code}: {l Select All Code}
K:\Julian\GitHub\SuperTuxKart\stk-code\lib\bullet\src\BulletCollision\CollisionDispatch\btInternalEdgeUtility.cpp: In member function 'virtual void btConnectivityProcessor::processTriangle(btVector3*, int, int)':
K:\Julian\GitHub\SuperTuxKart\stk-code\lib\bullet\src\BulletCollision\CollisionDispatch\btInternalEdgeUtility.cpp:310:2: internal compiler error: Segmentation fault
  }
  ^
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
K:\Julian\GitHub\SuperTuxKart\stk-code\lib\bullet\src\BulletCollision\CollisionDispatch\btInternalEdgeUtility.cpp:310:2: internal compiler error: Aborted
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
mingw32-make.exe[2]: *** [lib/bullet/CMakeFiles/bulletcollision.dir/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp.obj] Error 1
mingw32-make.exe[1]: *** [lib/bullet/CMakeFiles/bulletcollision.dir/all] Error 2
mingw32-make.exe: *** [all] Error 2
lib\bullet\CMakeFiles\bulletcollision.dir\build.make:687: recipe for target 'lib/bullet/CMakeFiles/bulletcollision.dir/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp.obj' failed
mingw32-make.exe[2]: Leaving directory 'K:/Julian/GitHub/SuperTuxKart/stk-code/build'
CMakeFiles\Makefile2:163: recipe for target 'lib/bullet/CMakeFiles/bulletcollision.dir/all' failed
mingw32-make.exe[1]: Leaving directory 'K:/Julian/GitHub/SuperTuxKart/stk-code/build'
K:/Julian/GitHub/SuperTuxKart/stk-code/build/Makefile:126: recipe for target 'all' failed
Process terminated with status 2 (0 minute(s), 25 second(s))
5 error(s), 0 warning(s) (0 minute(s), 25 second(s))
User avatar
XGhost
 
Posts: 147
Joined: 02 Jan 2014, 15:49
Location: Zurich (Switzerland)

Re: Troubles building STK on Windows 7 (CMake, MinGW)

Postby deve » 14 Aug 2015, 12:43

This is bug in mingw32 compiler...

You can:
- compile it in debug mode
- use mingw-w64 compiler (preferred solution because it is in newer version, it is used on linux for cross-compilation by many projects and generally it works better)
- use mingw32 + clang

Mingw-w64 can be downloaded here:
http://sourceforge.net/projects/mingw-w ... z/download
or 5.1 version:
http://sourceforge.net/projects/mingw-w ... z/download
deve
 
Posts: 268
Joined: 23 Jan 2014, 13:45

Re: Troubles building STK on Windows 7 (CMake, MinGW)

Postby XGhost » 14 Aug 2015, 12:57

Thanks for your help!
Works perfect now!
User avatar
XGhost
 
Posts: 147
Joined: 02 Jan 2014, 15:49
Location: Zurich (Switzerland)

Who is online

Users browsing this forum: No registered users and 1 guest