Overview
OpenNERO uses the CMake cross-platform build system. The general steps are:
Mac OS X
Prerequisites
Steps to build
- (recommended) create a new directory for your build
- in your build directory, run cmake -G Xcode /path/to/opennero/checkout
- open the resulting OpenNERO.xcodeproja Xcode project file
- Build OpenNERO using Xcode
Windows
Prerequisites
Steps to build
- Open CMake, specify the source directory (opennero checkout directory) and build directory (another directory). Choose 'Suppress dev Warnings -WnoDev' from the Options menu. Click the Configure button twice, then click the Generate button.
- Open the OpenNERO.sln solution file and build OpenNERO using Visual Studio.
- To run from within Visual Studio, set OpenNERO as startup project. Also set the working directory of OpenNERO for debugging to $(TargetDir) (right mouse click on OpenNERO, select properties, debugging).
Linux
Summary
- mkdir opennero
- cd opennero
- svn checkout http://opennero.googlecode.com/svn/trunk
- mkdir build-of-trunk
- cd build-of-trunk
- cmake ../trunk
- make
- cd dist
- ./OpenNERO
Prerequisites
Install the following packages (using sudo apt-get install)
Required
Ubuntu DEB Packages
- libboost-all-dev
- libx11-dev
- libxxf86vm-dev
- libgl-dev
- libz-dev
or, Fedora RPMs
- boost-devel
- libX11-devel
- libXxf86vm-devel
- mesa-libGL-devel
- zlib-devel
Optional
- python-matplotlib
- python-wxgtk
Steps to build
- (recommended) create a new directory for your build
- in your build directory, run cmake /path/to/opennero/checkout
- building using make: make
To run
- cd dist
- ./OpenNERO
Update build
- cd trunk
- svn update
- cd ..\build-of-trunk
- make
A typo in step 6: cmake ..\trunk should read cmake ../trunk
Also, trying to install libgl-dev results in this:
So I left it out and tried to build OpenNERO then got these errors:
I've tried libgl1-mesa-dev and also python-wxgtk2.8 instead of wxgtk, build was successful and application seems works OK
For the error noted by Dennis.I.89, the error is actually different - on 64-bit machines, you need to install libpng-dev in order to not get this error.
I'm getting the same error as Dennis.I.89. I have a 64-bit machine. The package libpng-dev is already installed on my computer.
It looks like in your case the error actually talks about libbz2, though I'm not sure where the longer version of your post went:
I'm getting the same error as Dennis when trying to make:
I've double and triple checked the libraries you guys mentioned, and they're all installed and up to date. Was this ever officially resolved?
The error in your post is occurring when Irrlicht (which OpenNERO uses for rendering) tries to build its own version of libjpeg unsuccessfully. As with libpng, libgz2 and the others, the workaround for this is to install the development version of these libraries on your system when building OpenNERO. Do do so, use
The other part of the workaround is that these libraries have to be installed when running cmake - cmake can fail to notice that they have been installed if you just rerun it. To make sure, delete CMakeCache.txt in the directory you are building in and re-run cmake.
I opened Issue #83 for further tracking of this problem.
Ah, thanks much. I'll post further comments in the Issue 83 thread.
Hi, it may be worth mentioning that you want libpng 1.2. Irrlicht does not compile against 1.5:
[ 34%] Building CXX object external/source/Irrlicht/CMakeFiles/Irrlicht.dir/CImageLoaderPNG.cpp.o /home/banshee/development/opennero/trunk/external/source/Irrlicht/CImageLoaderPNG.cpp: In function ‘void irr::video::png_cpexcept_error(png_structp, png_const_charp)’: /home/banshee/development/opennero/trunk/external/source/Irrlicht/CImageLoaderPNG.cpp:31:17: error: invalid use of incomplete type ‘png_struct {aka struct png_struct_def}’ /usr/include/png.h:825:16: error: forward declaration of ‘png_struct {aka struct png_struct_def}’ /home/banshee/development/opennero/trunk/external/source/Irrlicht/CImageLoaderPNG.cpp: In function ‘void irr::video::user_read_data_fcn(png_structp, png_bytep, png_size_t)’: /home/banshee/development/opennero/trunk/external/source/Irrlicht/CImageLoaderPNG.cpp:40:45: error: invalid use of incomplete type ‘png_struct {aka struct png_struct_def}’ /usr/include/png.h:825:16: error: forward declaration of ‘png_struct {aka struct png_struct_def}’ make[2]: *** [external/source/Irrlicht/CMakeFiles/Irrlicht.dir/CImageLoaderPNG.cpp.o] Error 1 make[1]: *** [external/source/Irrlicht/CMakeFiles/Irrlicht.dir/all] Error 2 make: *** [all] Error 2For Fedora, the dependency rpms appear to be: boost-devel libX11-devel libXxf86vm-devel mesa-libGL-devel zlib-devel
On ubuntu 10.04 note that the libgl1-mesa-swx11-dev package puts the libraries in /usr/lib/mesa, where the cmake scripts won't find them. I manually added symlinks to /usr/lib, and then cmake seemed happy.
Using Ubuntu 10.10
rashmi@ferrari:~/opennero/build-of-trunk$ cmake ../trunk/ -- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - 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 -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) -- Found ZLIB: /usr/include -- Found PNG: /usr/lib/libpng.so -- Found JPEG: /usr/lib/libjpeg.so -- Found BZip2: /usr/lib/libbz2.so -- Looking for BZ2_bzCompressInit in /usr/lib/libbz2.so -- Looking for BZ2_bzCompressInit in /usr/lib/libbz2.so - found -- TRUE /usr/include /usr/lib/libbz2.so -- Boost version: 1.42.0 -- Found the following Boost libraries: -- python -- filesystem -- serialization -- system -- date_time -- Found PythonLibs?: /usr/lib/libpython2.6.so -- Found Python libraries in /usr/include/python2.6 and /usr/lib/libpython2.6.so CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: GL_LIBRARY
OPENGL_LIBRARY-- Configuring incomplete, errors occurred!
for MacOSX 10.6, I'm getting an error
cmake -G Xcode ~/OpenNero?/opennero-read-only -- configured /Users/xxx/OpenNero?/opennero-read-only/doxy.config.in --> /Applications/OpenNERO.app/Contents/Resources/TestMod?/doxy.config -- TRUE /usr/include /usr/lib/libbz2.dylib -- Could NOT find Boost CMake Error at source/CMakeLists.txt:26 (MESSAGE):
Does anyone have any clue?