wxPython 2.4.0.2 fails to build. If I have USE="-opengl", I get this message: >>> emerge (1 of 1) dev-python/wxPython-2.4.0.2 to / >>> md5 ;-) wxPythonSrc-2.4.0.2.tar.gz >>> Unpacking source... >>> Unpacking wxPythonSrc-2.4.0.2.tar.gz >>> Source unpacked. patching file setup.py Hunk #1 succeeded at 28 with fuzz 2. Hunk #2 FAILED at 500. 1 out of 2 hunks FAILED -- saving rejects to file setup.py.rej !!! ERROR: dev-python/wxPython-2.4.0.2 failed. !!! Function src_compile, Line 45, Exitcode 1 !!! patch failed if opengl use flag is on, the build fails partway through as follows: creating build-gtk2/temp.linux-i686-2.2/contrib creating build-gtk2/temp.linux-i686-2.2/contrib/glcanvas creating build-gtk2/temp.linux-i686-2.2/contrib/glcanvas/gtk gcc -DNDEBUG -march=athlon-xp -O2 -pipe -fPIC -DSWIG_GLOBAL -DHAVE_CONFIG_H -DWXP_USE_THREAD=1 -UNDEBUG -Isrc -I/usr/include/python2.2 -c contrib/glcanvas/gtk/glcanvas.cpp -o build-gtk2/temp.linux-i686-2.2/contrib/glcanvas/gtk/glcanvas.o -I/usr/lib/wx/include/gtk2u-2.4 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include contrib/glcanvas/gtk/glcanvas.cpp: In function `void* SwigwxGLContextTowxObject(void*)': contrib/glcanvas/gtk/glcanvas.cpp:99: `wxGLContext' undeclared (first use this function) contrib/glcanvas/gtk/glcanvas.cpp:99: (Each undeclared identifier is reported only once for each function it appears in.) contrib/glcanvas/gtk/glcanvas.cpp:99: `src' undeclared (first use this function) contrib/glcanvas/gtk/glcanvas.cpp:101: parse error before `)' token contrib/glcanvas/gtk/glcanvas.cpp: In function `PyObject* _wrap_new_wxGLContext(PyObject*, PyObject*, PyObject*)': contrib/glcanvas/gtk/glcanvas.cpp:109: `_result' undeclared (first use this function) contrib/glcanvas/gtk/glcanvas.cpp:111: `wxGLCanvas' undeclared (first use this function) contrib/glcanvas/gtk/glcanvas.cpp:111: `_arg1' undeclared (first use this function) contrib/glcanvas/gtk/glcanvas.cpp:138: parse error before `)' token contrib/glcanvas/gtk/glcanvas.cpp:138: parse error before `(' token contrib/glcanvas/gtk/glcanvas.cpp: In function `PyObject* _wrap_delete_wxGLContext(PyObject*, PyObject*, PyObject*)': contrib/glcanvas/gtk/glcanvas.cpp:155: `_arg0' undeclared (first use this function) contrib/glcanvas/gtk/glcanvas.cpp: In function `void* SwigwxGLCanvasTowxWindow(void*)': contrib/glcanvas/gtk/glcanvas.cpp:435: parse error before `)' token contrib/glcanvas/gtk/glcanvas.cpp: In function `void* SwigwxGLCanvasTowxEvtHandler(void*)': contrib/glcanvas/gtk/glcanvas.cpp:443: parse error before `)' token contrib/glcanvas/gtk/glcanvas.cpp: In function `void* SwigwxGLCanvasTowxObject(void*)': contrib/glcanvas/gtk/glcanvas.cpp:451: parse error before `)' token contrib/glcanvas/gtk/glcanvas.cpp: In function `PyObject* _wrap_new_wxGLCanvas(PyObject*, PyObject*, PyObject*)': contrib/glcanvas/gtk/glcanvas.cpp:529: parse error before `)' token contrib/glcanvas/gtk/glcanvas.cpp:529: parse error before `(' token contrib/glcanvas/gtk/glcanvas.cpp: In function `PyObject* _wrap_new_wxGLCanvasWithContext(PyObject*, PyObject*, PyObject*)': contrib/glcanvas/gtk/glcanvas.cpp:555: parse error before `)' token contrib/glcanvas/gtk/glcanvas.cpp:632: parse error before `)' token contrib/glcanvas/gtk/glcanvas.cpp:632: parse error before `(' token contrib/glcanvas/gtk/glcanvas.cpp: In function `PyObject* _wrap_wxGLCanvas_GetContext(PyObject*, PyObject*, PyObject*)': contrib/glcanvas/gtk/glcanvas.cpp:769: parse error before `)' token contrib/glcanvas/gtk/glcanvas.cpp: In function `void initglcanvasc()': contrib/glcanvas/gtk/glcanvas.cpp:924: `WX_GL_RGBA' undeclared (first use this function) contrib/glcanvas/gtk/glcanvas.cpp:925: `WX_GL_BUFFER_SIZE' undeclared (first use this function) contrib/glcanvas/gtk/glcanvas.cpp:926: `WX_GL_LEVEL' undeclared (first use this function) contrib/glcanvas/gtk/glcanvas.cpp:927: `WX_GL_DOUBLEBUFFER' undeclared (first use this function) contrib/glcanvas/gtk/glcanvas.cpp:928: `WX_GL_STEREO' undeclared (first use this function) contrib/glcanvas/gtk/glcanvas.cpp:929: `WX_GL_AUX_BUFFERS' undeclared (first use this function) contrib/glcanvas/gtk/glcanvas.cpp:930: `WX_GL_MIN_RED' undeclared (first use this function) contrib/glcanvas/gtk/glcanvas.cpp:931: `WX_GL_MIN_GREEN' undeclared (first use this function) contrib/glcanvas/gtk/glcanvas.cpp:932: `WX_GL_MIN_BLUE' undeclared (first use this function) contrib/glcanvas/gtk/glcanvas.cpp:933: `WX_GL_MIN_ALPHA' undeclared (first use this function) contrib/glcanvas/gtk/glcanvas.cpp:934: `WX_GL_DEPTH_SIZE' undeclared (first use this function) contrib/glcanvas/gtk/glcanvas.cpp:935: `WX_GL_STENCIL_SIZE' undeclared (first use this function) contrib/glcanvas/gtk/glcanvas.cpp:936: `WX_GL_MIN_ACCUM_RED' undeclared (first use this function) contrib/glcanvas/gtk/glcanvas.cpp:937: `WX_GL_MIN_ACCUM_GREEN' undeclared (first use this function) contrib/glcanvas/gtk/glcanvas.cpp:938: `WX_GL_MIN_ACCUM_BLUE' undeclared (first use this function) contrib/glcanvas/gtk/glcanvas.cpp:939: `WX_GL_MIN_ACCUM_ALPHA' undeclared (first use this function) error: command 'gcc' failed with exit status 1 !!! ERROR: dev-python/wxPython-2.4.0.2 failed. !!! Function src_compile, Line 53, Exitcode 1 !!! build failed Reproducible: Always Steps to Reproduce: 1. env USE="-opengl" nice emerge wxPython 2. env USE="opengl" nice emerge wxPython Actual Results: Build fails (see details.) Expected Results:
Created attachment 8573 [details] setup.py.rej - rejected patch Here is the rejected patch with USE="-opengl".
raker: i think there used to be an opengl patch for this problem ... might be useful to go through the attic ... ?
I'm a newbie, how to apply this patch ?
i removed the lower half of that patch and it seems to compile that way the one thing im curious about but dont know since i dont use wxpython is the patch disables gl canvas but not ogl? if -opengl is set should this patch do that also?
Created attachment 10935 [details] dev-python/wxPython/files/wxPython-2.3.3.1-noglcanvas.diff updated patch please try it out and let me know if this works or not
i'm going to steal this from raker bug reporter, does this still happen with wxPython-2.4.0.7 ?
Seems to work perfectly now.
well, closing this for now.