SFTtech / openage

Free (as in freedom) open source clone of the Age of Empires II engine 🚀
http://openage.dev
Other
12.63k stars 1.11k forks source link

build on ubuntu 14.10 #32

Closed daveheitzman closed 9 years ago

daveheitzman commented 9 years ago

Any luck getting it built on Ubuntu 14.10 ?

I keep getting this : (I have all the libraries installed, just don't know how to communicate that to the build system)

CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message): Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is at least version "3.3") Call Stack (most recent call first): /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-2.8/Modules/FindPythonLibs.cmake:208 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) cpp/CMakeLists.txt:74 (find_package)

TheJJ commented 9 years ago

Did you install python3-dev? It looks like it cant find /usr/lib64/libpython3.3.so or 3.4. Does it exist on your machine? You probably might have a look at the building guidelines.

daveheitzman commented 9 years ago

yes. I've installed python3-dev. I've been looking at the guidelines as well, to no avail.

mic-e commented 9 years ago

As a workaround, you can manually define PYTHON_LIBRARIES and PYTHON_INCLUDEDIRS. Have a look at the OSX discussion, see svkurowski's comment. However that's hardly a solution. What does this minimal example output?

daveheitzman commented 9 years ago

tried setting ENV .. no luck. $ ~/_code/openage$ env | grep PY PYTHON_LIBRARIES=/usr/lib/python3.4/config-3.4m-x86_64-linux-gnu/libpython3.4m.so PYTHON_INCLUDE_DIR=/usr/include/python3.4

luan-cestari commented 9 years ago

About your issue, have you tried the python 3.3 (instead of 3.4)?

luan-cestari commented 9 years ago

Link for what I think you can do to install other versions http://stackoverflow.com/a/10961035/1322969

mic-e commented 9 years ago

@daveheitzman please try the minimal example... the workaround doesn't use env, but passes the defines as command-line arguments (./configure --raw-cmake-args -DPYTHON_INCLUDE_DIR=/whereever)

goto-bus-stop commented 9 years ago

Try adding version 3.4 to line 41 of /usr/share/cmake-2.8/FindPythonLibs.cmake, if it isn't there. iirc that's what made things work for me.

Original:

set(_PYTHON3_VERSIONS 3.3 3.2 3.1 3.0)

New:

set(_PYTHON3_VERSIONS 3.4 3.3 3.2 3.1 3.0)
svkurowski commented 9 years ago

Atleast on OS X, setting the env variables won't work. As @mic-e said you have to pass them to cmake via the configure script:

./configure -c llvm --raw-cmake-args --mode debug \
  -DPYTHON_LIBRARIES=/usr/lib/python3.4/config-3.4m-x86_64-linux-gnu/libpython3.4m.so
  -DPYTHON_INCLUDE_DIR=/usr/include/python3.4

Change llvm to gnu if you're using gcc obviously.

daveheitzman commented 9 years ago

@goto-bus-stop - your solution worked. It has built!

~/_code/openage$ ./configure --mode=debug

... -- Configuring done -- Generating done -- Build files have been written to: /home/gruen/_code/openage/.bin/gcc-debug-O1

daveheitzman commented 9 years ago

./configure worked, but now make fails

/usr/bin/gcc -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.3m -c /home/gruen/_code/openage/py/openage/convert/cabextract/lzxd/lzxd.cpp -o build/temp.linux-x86_64-3.3/home/gruen/_code/openage/py/openage/convert/cabextract/lzxd/lzxd.o -O1 -Wall -Wextra -pedantic -std=c++11 ... In file included from /home/gruen/_code/openage/py/openage/convert/cabextract/lzxd/pyinterface.cpp:1:0: /home/gruen/_code/openage/py/openage/convert/cabextract/lzxd/pyinterface.h:4:20: fatal error: Python.h: No such file or directory

include

It fails to find Python.h

I suspect it has to do with it looking for that in the /usr/include/python3.3m directory. But I do not know how to make the build system use /usr/include/python3.4m, which does contain Python.h

mic-e commented 9 years ago

Try updating your repo and running ./configure again. I've fixed that issue earlier (I hope).

daveheitzman commented 9 years ago

Okay that works. Now, last problem I'm having is compiling the assets.

TheJJ commented 9 years ago

The building issues seem to be resolved. If you got further compile problems, reopen.