Previous Thread  Next Thread

chat icon linux compile error: variable 'gpumodule'

juanito

Posted: Sat May 12, 2012 4:13 pm
Joined: 12 May 2012
Posts: 2
Using blender-2.63 or svn with:
Code:
cmake /usr/src/blender-2.63 -DCMAKE_INSTALL_PREFIX=/usr/local -DPYTHON_VERSION:STRING=2.7 -DCMAKE_C_FLAGS:STRING="-march=i486 -mtune=i686 -Os -pipe" -DCMAKE_CXX_FLAGS:STRING="-march=i486 -mtune=i686 -Os -pipe" -DWITH_CODEC_FFMPEG:BOOL=ON -DWITH_CODEC_SNDFILE:BOOL=ON


I get the following error:
Code:
Linking C static library ../../../../../lib/libbf_imbuf_cineon.a
[ 55%] Built target bf_imbuf_cineon
Scanning dependencies of target bf_python
[ 55%] Building C object source/blender/python/intern/CMakeFiles/bf_python.dir/gpu.c.o
/usr/src/blender-2.63/source/blender/python/intern/gpu.c:68:15: error: variable 'gpumodule' has initializer but incomplete type
/usr/src/blender-2.63/source/blender/python/intern/gpu.c:69:2: error: 'PyModuleDef_HEAD_INIT' undeclared here (not in a function)
/usr/src/blender-2.63/source/blender/python/intern/gpu.c:69:2: warning: excess elements in struct initializer [enabled by default]
/usr/src/blender-2.63/source/blender/python/intern/gpu.c:69:2: warning: (near initialization for 'gpumodule') [enabled by default]
...
/usr/src/blender-2.63/source/blender/python/intern/gpu.c: In function 'PyInit_gpu':
/usr/src/blender-2.63/source/blender/python/intern/gpu.c:82:2: error: implicit declaration of function 'PyModule_Create' [-Werror=implicit-function-declaration]
/usr/src/blender-2.63/source/blender/python/intern/gpu.c:82:4: warning: assignment makes pointer from integer without a cast [enabled by default]
/usr/src/blender-2.63/source/blender/python/intern/gpu.c:84:3: warning: 'return' with a value, in function returning void [enabled by default]
/usr/src/blender-2.63/source/blender/python/intern/gpu.c:116:2: warning: 'return' with a value, in function returning void [enabled by default]
/usr/src/blender-2.63/source/blender/python/intern/gpu.c: In function 'GPU_initPython':
/usr/src/blender-2.63/source/blender/python/intern/gpu.c:266:21: error: void value not ignored as it ought to be
cc1: some warnings being treated as errors

make[2]: *** [source/blender/python/intern/CMakeFiles/bf_python.dir/gpu.c.o] Error 1
make[1]: *** [source/blender/python/intern/CMakeFiles/bf_python.dir/all] Error 2
make: *** [all] Error 2
[/code]

Any hints as to how to fix this would be much appreciated
Reply with quote


stiv

Posted: Sat May 12, 2012 6:06 pm
Joined: 05 Aug 2003
Posts: 3645
Quote:
-DPYTHON_VERSION:STRING=2.7


If you are trying to compile new Blender with Python 2.7, it will not work. You need Python 3.2 or better.
Reply with quote


juanito

Posted: Sat May 12, 2012 7:09 pm
Joined: 12 May 2012
Posts: 2
Thanks, I thought I read somewhere that python >= 2.3 would work.

I'll try with python-3.2, or will an earlier version of blender work with python-2.7?
Reply with quote


stiv

Posted: Sat May 12, 2012 10:51 pm
Joined: 05 Aug 2003
Posts: 3645
Old Blender ( 2.49 and before) can be build with Python 2 (try 2.6 or 2.7).

New Blender ( 2.50 and later) needs Python 3.2.
Reply with quote


 
Jump to:  
Powered by phpBB © 2001, 2005 phpBB Group