linux compile error: variable 'gpumodule'

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

juanito
Posts: 2
Joined: Sat May 12, 2012 4:45 pm

linux compile error: variable 'gpumodule'

Postby juanito » Sat May 12, 2012 5:13 pm

Using blender-2.63 or svn with:

Code: Select all

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: Select all

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

stiv
Posts: 3646
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Postby stiv » Sat May 12, 2012 7:06 pm

-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.

juanito
Posts: 2
Joined: Sat May 12, 2012 4:45 pm

Postby juanito » Sat May 12, 2012 8:09 pm

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?

stiv
Posts: 3646
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Postby stiv » Sat May 12, 2012 11:51 pm

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.


Return to “Coding Blender”

Who is online

Users browsing this forum: No registered users and 0 guests