Cygwin compiling problem (python2.3?)

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
Dani
Posts: 143
Joined: Fri Oct 18, 2002 8:35 pm

Cygwin compiling problem (python2.3?)

Post by Dani »

Hello,

this might be something silly... when building Bf-Blender with cygwin, the linking fails, here's the output.

Code: Select all

/winblender.res /home/Proprio/bf-blender/blender/../lib/windows/zlib/lib/libz.a
/home/Proprio/bf-blender/blender/../lib/windows/python/lib/freepy.a  -L/usr/lib/
w32api -lnetapi32 -lopengl32 -lglu32 -L/usr/lib/w32api -lwinmm
/home/Proprio/bf-blender/blender/obj/windows/blender/python/libpython.a(BPY_inte
rface.o)(.text+0x1e42):BPY_interface.c: undefined reference to `__imp__PyCFuncti
on_NewEx'
/home/Proprio/bf-blender/blender/obj/windows/gameengine/ketsji/libketsji.a(KX_Py
thonInit.o)(.text+0x115a):KX_PythonInit.cpp: undefined reference to `__imp__PyCF
unction_NewEx'
/home/Proprio/bf-blender/blender/obj/windows/gameengine/ketsji/libketsji.a(KX_Py
thonInit.o)(.text+0x1197):KX_PythonInit.cpp: undefined reference to `__imp__PyCF
unction_NewEx'
collect2: ld returned 1 exit status
make[1]: *** [/home/Proprio/bf-blender/blender/obj/windows/bin/blender.exe] Erro
r 1
make: *** [all] Error 1
Several notes:
I applied to my bf-blender the changes Chris Want didto compile Solid/QHull, on tuhopuu2. The reason I did this is I thought it could fix some trouble I'm having with self-compiled Bf-blender (objects going through others or going crazy in game engine). I don't think it's the reason it fails (i'm checking if it still fails without those changes> FAILS TOO).
My libs are up-to-date, I'm using python 2.3.x for windows and for cygwin too. Blender surely tries to link to Python 2.3, I think that that was a change a few days ago.

So I guess it's due to the python version change...

Maybe something to fix?

Ciao
Dani

z3r0_d
Posts: 289
Joined: Wed Oct 16, 2002 2:38 am
Contact:

Post by z3r0_d »

Code: Select all

****> Link /home/bf-blender/blender/obj/windows/bin/blender.exe
g++ -DNDEBUG -O2 -DBUILD_DATE='"2004-06-13"' -DBUILD_TIME='"11:34:53"' -DBUILD_P
LATFORM='"windows"' -DBUILD_TYPE='"dynamic"' /home/bf-blender/blender/source/cre
ator/buildinfo.c -c -o /home/bf-blender/blender/obj/windows/buildinfo.o -DNAN_BU
ILDINFO
mkdir -p /home/bf-blender/blender/obj/windows/bin
g++  -mwindows -mno-cygwin -mconsole -o /home/bf-blender/blender/obj/windows/bin
/blender.exe /home/bf-blender/blender/obj/windows/buildinfo.o    /home/bf-blende
r/blender/obj/windows/creator/libcreator.a /home/bf-blender/blender/obj/windows/
blender/src/libsrcpublisher.a /home/bf-blender/blender/../lib/windows/decimation
/lib/libdecimation.a /home/bf-blender/blender/../lib/windows/bsp/lib/libbsp.a /h
ome/bf-blender/blender/../lib/windows/SoundSystem/lib/libSoundSystem.a /home/bf-
blender/blender/../lib/windows/ghost/lib/libghost.a /home/bf-blender/blender/../
lib/windows/string/lib/libstring.a /home/bf-blender/blender/obj/windows/blender/
img/libimg.a /home/bf-blender/blender/obj/windows/blender/renderconverter/libren
derconverter.a /home/bf-blender/blender/obj/windows/blender/render/librender.a /
home/bf-blender/blender/obj/windows/blender/radiosity/libradiosity.a /home/bf-bl
ender/blender/obj/windows/blender/python/libpython.a /home/bf-blender/blender/ob
j/windows/blender/blenkernel/libblenkernel.a /home/bf-blender/blender/obj/window
s/blender/blenloader/libblenloader.a /home/bf-blender/blender/obj/windows/blende
r/blenpluginapi/libblenpluginapi.a /home/bf-blender/blender/obj/windows/blender/
imbuf/libimbuf.a /home/bf-blender/blender/obj/windows/blender/blenlib/libblenlib
.a /home/bf-blender/blender/obj/windows/blender/avi/libavi.a /home/bf-blender/bl
ender/../lib/windows/jpeg/lib/libjpeg.a /home/bf-blender/blender/obj/windows/gam
eengine/bloutines/libbloutines.a /home/bf-blender/blender/obj/windows/gameengine
/blconverter/libblconverter.a /home/bf-blender/blender/obj/windows/gameengine/bl
phys/common/libcommon.a /home/bf-blender/blender/obj/windows/gameengine/ketsji/l
ibketsji.a /home/bf-blender/blender/../lib/windows/gcc/solid/lib/libsolid.a /hom
e/bf-blender/blender/obj/windows/gameengine/blphys/sumo/libsumo.a /home/bf-blend
er/blender/obj/windows/gameengine/blphys/fuzzics/libfuzzics.a /home/bf-blender/b
lender/../lib/windows/gcc/qhull/lib/libqhull.a /home/bf-blender/blender/obj/wind
ows/gameengine/blphys/dummy/libdummy.a /home/bf-blender/blender/obj/windows/game
engine/blphys/common/libcommon.a /home/bf-blender/blender/obj/windows/gameengine
/blphys/dummy/libdummy.a /home/bf-blender/blender/obj/windows/gameengine/ketsji/
libketsji.a /home/bf-blender/blender/obj/windows/gameengine/blphys/common/libcom
mon.a /home/bf-blender/blender/obj/windows/gameengine/blphys/blode/libblode.a /h
ome/bf-blender/blender/obj/windows/gameengine/blphys/dummy/libdummy.a /home/bf-b
lender/blender/obj/windows/gameengine/blphys/common/libcommon.a /home/bf-blender
/blender/obj/windows/gameengine/blphys/dummy/libdummy.a /home/bf-blender/blender
/obj/windows/gameengine/ketsji/libketsji.a /home/bf-blender/blender/obj/windows/
gameengine/logic/liblogic.a /home/bf-blender/blender/obj/windows/gameengine/rast
erizer/librasterizer.a /home/bf-blender/blender/obj/windows/gameengine/OpenGLras
terizer/libOpenGLrasterizer.a /home/bf-blender/blender/obj/windows/gameengine/ex
pression/libexpression.a /home/bf-blender/blender/obj/windows/gameengine/scenegr
aph/libscenegraph.a /home/bf-blender/blender/../lib/windows/moto/lib/libmoto.a /
home/bf-blender/blender/obj/windows/intern/SoundSystem/libSoundSystem.a /home/bf
-blender/blender/obj/windows/intern/DummySoundSystem/libDummySoundSystem.a /home
/bf-blender/blender/obj/windows/intern/OpenALSoundSystem/libOpenALSoundSystem.a
/home/bf-blender/blender/obj/windows/intern/SDLSoundSystem/libSDLSoundSystem.a /
home/bf-blender/blender/../lib/windows/openal/lib/openal_static.lib /home/bf-ble
nder/blender/obj/windows/intern/SoundSystem/libSoundSystem.a /home/bf-blender/bl
ender/obj/windows/kernel/gen_system/libgen_system.a /home/bf-blender/blender/obj
/windows/kernel/gen_messaging/libgen_messaging.a /home/bf-blender/blender/obj/wi
ndows/gameengine/ketsji/KXNetwork/libKXNetwork.a /home/bf-blender/blender/obj/wi
ndows/gameengine/Network/libNetwork.a /home/bf-blender/blender/obj/windows/gamee
ngine/Network/LoopBackNetwork/libLoopBackNetwork.a /home/bf-blender/blender/../l
ib/windows/guardedalloc/lib/libguardedalloc.a /home/bf-blender/blender/../lib/wi
ndows/bmfont/lib/libbmfont.a /home/bf-blender/blender/../lib/windows/png/lib/lib
png.a /home/bf-blender/blender/obj/windows/blender/yafray/libyafrayexport.a /hom
e/bf-blender/blender/../lib/windows/gcc/freetype/lib/libfreetype.a /home/bf-blen
der/blender/obj/windows/blender/ftfont/libftfont.a /home/bf-blender/blender/../l
ib/windows/gettext/lib/freegettext.a /home/bf-blender/blender/../lib/windows/gcc
/ftgl/lib/libftgl.a /home/bf-blender/blender/../lib/windows/gcc/sdl/lib/libSDL.a
 /home/bf-blender/blender/../lib/windows/iksolver/lib/libiksolver.a /home/bf-ble
nder/blender/../lib/windows/moto/lib/libmoto.a /home/bf-blender/blender/obj/wind
ows/blender/readblenfile/libreadblenfile.a /home/bf-blender/blender/obj/windows/
blender/src/libsrcpublisher.a /home/bf-blender/blender/obj/windows/blender/icons
/winblender.res /home/bf-blender/blender/../lib/windows/zlib/lib/libz.a /home/bf
-blender/blender/../lib/windows/python/lib/freepy.a  -L/usr/lib/w32api -lnetapi3
2 -lopengl32 -lglu32 -L/usr/lib/w32api -lwinmm
/home/bf-blender/blender/obj/windows/blender/python/libpython.a(BPY_interface.o)
(.text+0x1ee2):BPY_interface.c: undefined reference to `__imp__PyCFunction_NewEx
'
/home/bf-blender/blender/obj/windows/gameengine/ketsji/libketsji.a(KX_PythonInit
.o)(.text+0x11ba):KX_PythonInit.cpp: undefined reference to `__imp__PyCFunction_
NewEx'
/home/bf-blender/blender/obj/windows/gameengine/ketsji/libketsji.a(KX_PythonInit
.o)(.text+0x11fe):KX_PythonInit.cpp: undefined reference to `__imp__PyCFunction_
NewEx'
collect2: ld returned 1 exit status
make[1]: *** [/home/bf-blender/blender/obj/windows/bin/blender.exe] Error 1
make: *** [all] Error 1
yeah, what he said

cept I haven't applied any patches

Dani
Posts: 143
Joined: Fri Oct 18, 2002 8:35 pm

Post by Dani »

hum... some references to python22.dll are still in there, check the python.def file, in the dlltool directory. The makefile in there too... maybe this is the problem? i'm switching them to python23.dll and will test it...

Dani

rayf
Posts: 0
Joined: Wed Aug 13, 2003 11:51 pm
Location: Houston, TX

Post by rayf »

Yep, that's what I did too. Was able to compile successfully with gcc under MinGW.
To keep both versions working I renamed python.def to python22.def and added python23.def and python23.dll and modified Makefile to choose the right version depending on $NAN_PYTHON_VERSION.

/Ray

Dani
Posts: 143
Joined: Fri Oct 18, 2002 8:35 pm

Post by Dani »

Yeah! I think it's hard for you to imagine how happy I am I figured it out ! hehe. Thanks rayf, now I know that it should work (I realized just a few minutes ago I had compiled the wrong blender dir, haha, had to redo everything..., now I'm waiting for an .exe)

^__^

Ciao
Dani

EDIT : I AM SOOOO SAD!!!!
it FAILED! same place, arg!

Dani

Dani
Posts: 143
Joined: Fri Oct 18, 2002 8:35 pm

Post by Dani »

I'm getting a head ache...

I think this has to do with the new python...
maybe something on this page, dunno:
http://www.python.org/doc/2.3.4/whatsnew/node20.html
?

I've got python 2.3.4 on cygwin with gcc3.3.1

Thanks

Dani

alien-xmp
Posts: 0
Joined: Sun Apr 06, 2003 2:22 pm
Location: Wellington, New Zealand
Contact:

Post by alien-xmp »

Add that function (PyCFunction_NewEx) to the python.def file in the dlltool directory. From memory the format is pretty simple (I'm not at my blender dev box at the moment) - you can copy and paste the PyCFunction_New definition.

Dani
Posts: 143
Joined: Fri Oct 18, 2002 8:35 pm

Post by Dani »

Hey :)

that solved it! Thanks!

However, the game-engine is still quite unstable and slow on my builds compared to the one you posted to test the ATi fix.

Anyway, i guess you've got some secret physics code that makes it work right :)

Ciao
Dani

Post Reply