kripken / intensityengine

[Not active!] An open source platform for 3D games and virtual worlds
https://web.archive.org/web/20100222011320/http://www.syntensity.com/
Other
58 stars 15 forks source link

[Linux, 64-bit] Compiling Issue - Python? posixmodule.o? #7

Closed ProxyIchig0 closed 14 years ago

ProxyIchig0 commented 14 years ago

I've been trying to compile the engine from source and have encountered some odd problem. I'm running Linux Slackware 13.0, with an Intel Core 2 Quad.

*CMake runs properly as far as I can tell:

bash-3.1$ cmake ..
-- 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
-- ...Linux...
-- Found PythonLibs: /usr/lib64/python2.6/config/libpython2.6.a
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib64/libX11.so
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - 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 ZLIB: /usr/lib64/libz.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/intensityengine/cbuild

*But after running make, I get some warnings and then errors:

[ 17%] Building CXX object src/thirdparty/boost/libs/python/CMakeFiles/boost_python.dir/src/object/inheritance.cpp.o
[ 18%] Building CXX object src/thirdparty/boost/libs/python/CMakeFiles/boost_python.dir/src/object/pickle_support.cpp.o
In file included from /usr/lib64/gcc/x86_64-slackware-linux/4.3.3/../../../../include/c++/4.3.3/backward/hash_set:64,
             from /home/intensityengine/src/thirdparty/boost/boost/graph/adjacency_list.hpp:25,
             from /home/intensityengine/src/thirdparty/boost/libs/python/src/object/inheritance.cpp:11:
/usr/lib64/gcc/x86_64-slackware-linux/4.3.3/../../../../include/c++/4.3.3/backward   /backward_warning.h:33:2: warning: #warning This file includes at least one       deprecated or antiquated header which may be removed without further notice at a    future date. Please use a non-deprecated interface with equivalent functionality    instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.
[ 18%] Building CXX object src/thirdparty/boost/libs/python/CMakeFiles/boost_python.dir/src/object/function_doc_signature.cpp.o

(...)

[ 22%] Building CXX object src/thirdparty/boost/libs/python/CMakeFiles/boost_python.dir/src/object/enum.cpp.o
/home/intensityengine/src/thirdparty/boost/libs/python/src/object/class.cpp: In function 'int boost::python::property_init(PyObject*, PyObject*, PyObject*)':
/home/intensityengine/src/thirdparty/boost/libs/python/src/object/class.cpp:79: warning: deprecated conversion from string constant to 'char*'
/home/intensityengine/src/thirdparty/boost/libs/python/src/object/class.cpp:79: warning: deprecated conversion from string constant to 'char*'
/home/intensityengine/src/thirdparty/boost/libs/python/src/object/class.cpp:79: warning: deprecated conversion from string constant to 'char*'
/home/intensityengine/src/thirdparty/boost/libs/python/src/object/class.cpp:79: warning: deprecated conversion from string constant to 'char*'
[ 23%] Building CXX object src/thirdparty/boost/libs/python/CMakeFiles/boost_python.dir/src/errors.cpp.o

(...)

[ 81%] Building CXX object src/client/CMakeFiles/Intensity_CClient.dir/__/engine/water.cpp.o
Linking CXX executable Intensity_CServer
/usr/lib64/python2.6/config/libpython2.6.a(posixmodule.o): In function `posix_tmpnam':
/tmp/Python-2.6.2/./Modules/posixmodule.c:7129: warning: the use of `tmpnam_r' is dangerous, better use `mkstemp'
/usr/lib64/python2.6/config/libpython2.6.a(posixmodule.o): In function `posix_tempnam':
/tmp/Python-2.6.2/./Modules/posixmodule.c:7084: warning: the use of `tempnam' is dangerous, better use `mkstemp'
/usr/lib64/python2.6/config/libpython2.6.a(posixmodule.o): In function `posix_forkpty':
posixmodule.c:(.text+0x2f89): undefined reference to `forkpty'
/usr/lib64/python2.6/config/libpython2.6.a(posixmodule.o): In function `posix_openpty':
posixmodule.c:(.text+0x2ff6): undefined reference to `openpty'
collect2: ld returned 1 exit status
make[2]: *** [src/server/Intensity_CServer] Error 1
make[1]: *** [src/server/CMakeFiles/Intensity_CServer.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 81%] Building CXX object src/client/CMakeFiles/Intensity_CClient.dir/__/engine/shader.cpp.o

(...)

[100%] Building CXX object src/client/CMakeFiles/Intensity_CClient.dir/__/fpsgame/scoreboard.cpp.o
Linking CXX executable Intensity_CClient
/usr/lib64/python2.6/config/libpython2.6.a(posixmodule.o): In function `posix_tmpnam':
/tmp/Python-2.6.2/./Modules/posixmodule.c:7129: warning: the use of `tmpnam_r' is dangerous, better use `mkstemp'
/usr/lib64/python2.6/config/libpython2.6.a(posixmodule.o): In function `posix_tempnam':
/tmp/Python-2.6.2/./Modules/posixmodule.c:7084: warning: the use of `tempnam' is dangerous, better use `mkstemp'
/usr/lib64/python2.6/config/libpython2.6.a(posixmodule.o): In function `posix_forkpty':
posixmodule.c:(.text+0x2f89): undefined reference to `forkpty'
/usr/lib64/python2.6/config/libpython2.6.a(posixmodule.o): In function `posix_openpty':
posixmodule.c:(.text+0x2ff6): undefined reference to `openpty'
collect2: ld returned 1 exit status
make[2]: *** [src/client/Intensity_CClient] Error 1
make[1]: *** [src/client/CMakeFiles/Intensity_CClient.dir/all] Error 2
make: *** [all] Error 2

*What is the problem or what should be changed? I tried installing the latest version of most dependencies, but so far with little luck. Any Ideas?

Thank you.

kripken commented 14 years ago

The warnings can be ignored, but not sure about the link errors. Some Googling suggests to link with 'util' (that is, add -lutil to the link command). Can you test if that fixes it?

ProxyIchig0 commented 14 years ago

Yes, that seems to fix things.

I added -lutil to CMAKE_EXE_LINKER_FLAGS and CMAKE_MODULE_LINKER_FLAGS. I'm not sure if both were necessary.

Thank you for the fix. I even started up the client for a bit and it seemed to run fine. I just hope no one else trying intensityengine, gave up if they encountered this. But considering it's relatively new and has impressive potential, any gamer and modder I know of wouldn't give up so easily.

Thanks again!

kripken commented 14 years ago

Glad it worked.

Kind of an odd problem, I guess it is something to do with CMake not correctly detecting system libraries on Slackware. I added a mention of the issue to the COMPILE.txt file for other people.