wxWidgets / wxWidgets

Cross-Platform C++ GUI Library
https://www.wxwidgets.org/
5.79k stars 1.7k forks source link

Mac OS X 10.6 / snow leopard: building wxPython trunk 62137 fails (gcc failed with exit status 1) #11248

Closed wxtrac closed 14 years ago

wxtrac commented 14 years ago

Issue migrated from trac ticket # 11248

component: wxPython | priority: normal | resolution: fixed | keywords: snow leopard, 10.6, build error

2009-09-26 13:11:02: cscscs (junk@schleiermachers.de) created the issue


/var/tmp/trunk-wxWidgets $ ll wxPython lrwxr-xr-x 1 cs wheel 18 Sep 26 10:50 wxPython -> trunk-wxPython/ /var/tmp/trunk-wxWidgets/wxPython $ python --version Python 2.7a0

cd wxPython /var/tmp/trunk-wxWidgets/wxPython $ svn update Fetching external item into 'demo/agw' External at revision 62137.

Fetching external item into 'src/eventsim' External at revision 62137.

Fetching external item into 'wx/lib/agw' External at revision 62137.

Fetching external item into 'wx/lib/floatcanvas' External at revision 62137.

Fetching external item into 'wx/tools/XRCed' External at revision 62137.

Fetching external item into 'wx/tools/Editra' External at revision 62137.

At revision 62137.

/var/tmp/trunk-wxWidgets/wxPython $ python setup.py build WXPORT=osx_cocoa

WARNING: WXWIN not set in environment. Assuming '..' Found wx-config: /opt/wx/2.8/bin/wx-config Using flags: --toolkit=osx_cocoa --unicode=yes --version=2.9 Preparing CORE... Preparing STC... Preparing GLCANVAS... Preparing GIZMOS... running build running build_py copying wx/version.py -> build.unicode/lib.macosx-10.4-i386-2.7/wx copying wx/build/build_options.py -> build.unicode/lib.macosx-10.4-i386-2.7/wx/build package init file 'wx/tools/XRCed/plugins/init.py' not found (or not a regular file) package init file 'wx/tools/XRCed/plugins/init.py' not found (or not a regular file) running build_ext building 'core' extension gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DSWIG_TYPE_TABLE=_wxPython_table -DSWIG_PYTHON_OUTPUT_TUPLE -DWXP_USE_THREAD=1 -UNDEBUG -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXOSX_COCOA__ -Iinclude -Isrc -I/opt/wx/2.8/lib/wx/include/osx_cocoa-unicode-2.9 -I/opt/wx/2.8/include/wx-2.9 -I/tools/python/include/python2.7 -c src/osx_cocoa/_core_wrap.cpp -o build.unicode/temp.macosx-10.4-i386-2.7/src/osx_cocoa/_core_wrap.o -O3 cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ src/osx_cocoa/_core_wrap.cpp: In function 'void SWIG_Python_AddErrorMsg(const char)': src/osx_cocoa/_core_wrap.cpp:864: warning: format not a string literal and no format arguments src/osx_cocoa/_core_wrap.cpp: In function 'bool wxEvtHandler_Disconnect(wxEvtHandler, int, int, wxEventType, PyObject)': src/osx_cocoa/_core_wrap.cpp:3950: error: 'class wxEventFunctor' has no member named 'GetMethod' src/osx_cocoa/_core_wrap.cpp: In function 'PyObject _wrap_Image_Scale(PyObject, PyObject, PyObject)': src/osx_cocoa/_core_wrap.cpp:17752: error: invalid conversion from 'int' to 'wxImageResizeQuality' src/osx_cocoa/_core_wrap.cpp:17752: error: initializing argument 3 of 'wxImage wxImage::Scale(int, int, wxImageResizeQuality) const' src/osx_cocoa/_core_wrap.cpp: In function 'PyObject _wrap_Image_Rescale(PyObject, PyObject, PyObject)': src/osx_cocoa/_core_wrap.cpp:18073: error: invalid conversion from 'int' to 'wxImageResizeQuality' src/osx_cocoa/_core_wrap.cpp:18073: error: initializing argument 3 of 'wxImage& wxImage::Rescale(int, int, wxImageResizeQuality)' src/osx_cocoa/_core_wrap.cpp: In function 'PyObject _wrap_Image_SaveFile(PyObject, PyObject, PyObject)': src/osx_cocoa/_core_wrap.cpp:19209: warning: 'SaveFile' is deprecated (declared at /opt/wx/2.8/include/wx-2.9/wx/image.h:555) src/osx_cocoa/_core_wrap.cpp: In function 'PyObject _wrap_Image_SaveStream(PyObject, PyObject, PyObject)': src/osx_cocoa/_core_wrap.cpp:19340: warning: 'SaveFile' is deprecated (declared at /opt/wx/2.8/include/wx-2.9/wx/image.h:540) src/osx_cocoa/_core_wrap.cpp: In function 'PyObject _wrap_MouseState_LeftDown(PyObject, PyObject)': src/osx_cocoa/_core_wrap.cpp:25252: warning: 'LeftDown' is deprecated (declared at /opt/wx/2.8/include/wx-2.9/wx/mousestate.h:126) src/osx_cocoa/_core_wrap.cpp: In function 'PyObject _wrap_MouseState_MiddleDown(PyObject, PyObject)': src/osx_cocoa/_core_wrap.cpp:25282: warning: 'MiddleDown' is deprecated (declared at /opt/wx/2.8/include/wx-2.9/wx/mousestate.h:127) src/osx_cocoa/_core_wrap.cpp: In function 'PyObject _wrap_MouseState_RightDown(PyObject, PyObject)': src/osx_cocoa/_core_wrap.cpp:25312: warning: 'RightDown' is deprecated (declared at /opt/wx/2.8/include/wx-2.9/wx/mousestate.h:128) src/osx_cocoa/_core_wrap.cpp: In function 'PyObject _wrap_MouseState_Aux1Down(PyObject, PyObject)': src/osx_cocoa/_core_wrap.cpp:25342: error: 'class wxMouseState' has no member named 'Aux1Down' src/osx_cocoa/_core_wrap.cpp: In function 'PyObject _wrap_MouseState_Aux2Down(PyObject, PyObject)': src/osx_cocoa/_core_wrap.cpp:25372: error: 'class wxMouseState' has no member named 'Aux2Down' src/osx_cocoa/_core_wrap.cpp: In function 'PyObject _wrap_MouseEvent_ButtonIsDown(PyObject, PyObject, PyObject)': src/osx_cocoa/_core_wrap.cpp:26242: error: invalid conversion from 'int' to 'wxMouseButton' src/osx_cocoa/_core_wrap.cpp:26242: error: initializing argument 1 of 'bool wxMouseState::ButtonIsDown(wxMouseButton) const' src/osx_cocoa/_core_wrap.cpp: In function 'PyObject _wrap_Window_SetVirtualSizeHintsSz(PyObject, PyObject, PyObject)': src/osx_cocoa/_core_wrap.cpp:39945: warning: 'SetVirtualSizeHints' is deprecated (declared at /opt/wx/2.8/include/wx-2.9/wx/window.h:451) src/osx_cocoa/_core_wrap.cpp: In function 'PyObject _wrap_Window_SetHelpTextForId(PyObject, PyObject, PyObject)': src/osx_cocoa/_core_wrap.cpp:46324: warning: 'SetHelpTextForId' is deprecated (declared at /opt/wx/2.8/include/wx-2.9/wx/window.h:1226) src/osx_cocoa/_core_wrap.cpp: In function 'PyObject _wrap_SizerItem_SetWindow(PyObject, PyObject, PyObject)': src/osx_cocoa/_core_wrap.cpp:59676: warning: 'SetWindow' is deprecated (declared at /opt/wx/2.8/include/wx-2.9/wx/sizer.h:1086) src/osx_cocoa/_core_wrap.cpp: In function 'PyObject _wrap_SizerItem_SetSizer(PyObject, PyObject, PyObject)': src/osx_cocoa/_core_wrap.cpp:59712: warning: 'SetSizer' is deprecated (declared at /opt/wx/2.8/include/wx-2.9/wx/sizer.h:1091) src/osx_cocoa/_core_wrap.cpp: In function 'PyObject _wrap_SizerItem_SetSpacer(PyObject, PyObject, PyObject)': src/osx_cocoa/_core_wrap.cpp:59748: warning: 'SetSpacer' is deprecated (declared at /opt/wx/2.8/include/wx-2.9/wx/sizer.h:1096) src/osx_cocoa/_core_wrap.cpp: In function 'PyObject _wrap_Sizer_SetVirtualSizeHints(PyObject, PyObject, PyObject)': src/osx_cocoa/_core_wrap.cpp:61681: warning: 'SetVirtualSizeHints' is deprecated (declared at /opt/wx/2.8/include/wx-2.9/wx/sizer.h:651) error: command 'gcc' failed with exit status 1 584 MacWarrior /var/tmp/trunk-wxWidgets/wxPython $

wxtrac commented 14 years ago

2009-09-26 17:53:20: cscscs (junk@schleiermachers.de) commented


btw:

i am using both trunk versions for wxWidgets and wxPython.

svn co http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk svn co http://svn.wxwidgets.org/svn/wx/wxPython/trunk

wxtrac commented 14 years ago

2009-09-28 21:53:15: @RobinD42 changed status from new to accepted

2009-09-28 21:53:15: @RobinD42 commented

wxPython trunk is known to be out of date with respect to wxWidgets trunk, and it may be a little while yet before it can be updated. On the other hand, wxPython trunk should work just fine with wxWidgets 2.9.0, which can be fetched from this tag:

http://svn.wxwidgets.org/svn/wx/wxWidgets/tags/WX_2_9_0/

wxtrac commented 14 years ago

2009-09-28 22:06:41: cscscs (junk@schleiermachers.de) commented


hi robind, thanks for the info. unfortunately, wxWidgets (WX_2_0_9) does not compile:

svn co http://svn.wxwidgets.org/svn/wx/wxWidgets/tags/WX_2_9_0/ mkdir bld; cd bld ../configure --prefix=/opt/wx/2.8 --with-opengl --enable-debug --enable-geometry --enable-graphics_ctx --enable-sound --with-sdl --enable-mediactrl --enable-display --disable-debugreport --enable-monolithic --enable-unicode -with-osx_cocoa [output if needed] make

[...] /var/tmp/WX_2_9_0/bld/bk-deps g++ -mmacosx-version-min=10.4 -c -o monodll_printmac.o -I./.pch/wxprec_monodll -DWXOSX_COCOA -DWXBUILDING -I/var/tmp/WX_2_9_0/bld/src/tiff/libtiff -I../src/tiff/libtiff -I../src/jpeg -I../src/png -I../src/regex -DwxUSE_BASE=1 -DWXMAKINGDLL -I../src/stc/scintilla/include -I../src/stc/scintilla/src -DWX__ -DSCI_LEXER -DLINK_LEXERS -dynamic -fPIC -DPIC -Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual -D_FILE_OFFSET_BITS=64 -DWXDEBUG__ -I/var/tmp/WX_2_9_0/bld/lib/wx/include/osx_cocoa-unicode-debug-2.9 -I../include -DWX_PRECOMP -g -O0 -fno-common -fvisibility=hidden -fvisibility-inlines-hidden ../src/osx/core/printmac.cpp ../src/osx/core/printmac.cpp: In member function 'virtual bool wxOSXPrintData::TransferFrom(const wxPrintData&)': ../src/osx/core/printmac.cpp:142: error: 'PMPaperCreate' was not declared in this scope make: *** [monodll_printmac.o] Error 1

thanks, cs

wxtrac commented 14 years ago

2009-09-28 22:23:07: KO (Kevin Ollivier) commented


The best way to fix that problem is to pass --with-macosx-version-min=10.5 to configure. The other option that might work is to set CC=gcc-4.0 and CXX=g++-4.0 to force 32-bit compilation.

wxtrac commented 14 years ago

2009-09-29 07:39:16: cscscs (junk@schleiermachers.de) commented


thanks.

still i cannot report success:

adding CC=gcc-4.0 and CXX=g++-4.0 and/or setting CC, CXX produces this:

/var/tmp/WX_2_9_0/bld/bk-deps g++-4.0 -mmacosx-version-min=10.5 -c -o monodll_cocoa_tglbtn.o -I./.pch/wxprec_monodll -DWXOSX_COCOA -DWXBUILDING -I/var/tmp/WX_2_9_0/bld/src/tiff/libtiff -I../src/tiff/libtiff -I../src/png -I../src/regex -DwxUSE_BASE=1 -DWXMAKINGDLL -I../src/stc/scintilla/include -I../src/stc/scintilla/src -DWX__ -DSCI_LEXER -DLINK_LEXERS -dynamic -fPIC -DPIC -D_FILE_OFFSET_BITS=64 -DWXDEBUG__ -I/var/tmp/WX_2_9_0/bld/lib/wx/include/osx_cocoa-unicode-debug-2.9 -I../include -g -O0 -fvisibility=hidden -fvisibility-inlines-hidden ../src/osx/cocoa/tglbtn.mm ../src/osx/cocoa/textctrl.mm: In function 'void -[wxNSTextFieldEditor keyDown:](wxNSTextFieldEditor, objc_selector, NSEvent)': ../src/osx/cocoa/textctrl.mm:144: error: no matching function for call to 'wxWidgetImpl::FindFromWXWidget(objc_object)' ../include/wx/osx/core/private.h:261: note: candidates are: static wxWidgetImpl wxWidgetImpl::FindFromWXWidget(NSView) ../src/osx/cocoa/textctrl.mm: In function 'void -[wxNSTextFieldEditor keyUp:](wxNSTextFieldEditor, objc_selector, NSEvent)': ../src/osx/cocoa/textctrl.mm:153: error: no matching function for call to 'wxWidgetImpl::FindFromWXWidget(objc_object)' ../include/wx/osx/core/private.h:261: note: candidates are: static wxWidgetImpl wxWidgetImpl::FindFromWXWidget(NSView) ../src/osx/cocoa/textctrl.mm: In function 'void -[wxNSTextFieldEditor flagsChanged:](wxNSTextFieldEditor, objc_selector, NSEvent)': ../src/osx/cocoa/textctrl.mm:160: error: no matching function for call to 'wxWidgetImpl::FindFromWXWidget(objc_object)' ../include/wx/osx/core/private.h:261: note: candidates are: static wxWidgetImpl wxWidgetImpl::FindFromWXWidget(NSView) ../src/osx/cocoa/textctrl.mm: In function 'void -[wxNSTextFieldEditor insertText:](wxNSTextFieldEditor, objc_selector, objc_object)': ../src/osx/cocoa/textctrl.mm:173: error: no matching function for call to 'wxWidgetImpl::FindFromWXWidget(objc_object)' ../include/wx/osx/core/private.h:261: note: candidates are: static wxWidgetImpl wxWidgetImpl::FindFromWXWidget(NSView) ../src/osx/cocoa/textctrl.mm: In constructor 'wxNSTextViewControl::wxNSTextViewControl(wxTextCtrl, NSView)': ../src/osx/cocoa/textctrl.mm:321: warning: class 'NSView' does not implement the 'NSTextViewDelegate' protocol ../src/osx/cocoa/textctrl.mm: In constructor 'wxNSTextFieldControl::wxNSTextFieldControl(wxTextCtrl, NSView)': ../src/osx/cocoa/textctrl.mm:436: warning: class 'NSView' does not implement the 'NSTextFieldDelegate' protocol make: [monodll_osx_cocoa_textctrl.o] Error 1 make: Waiting for unfinished jobs....

wxtrac commented 14 years ago

2009-09-29 09:22:37: @csomor commented


see #11183 regarding that last compile error

wxtrac commented 14 years ago

2009-09-29 19:45:27: cscscs (junk@schleiermachers.de) commented


ok,

in src/osx/cocoa/textctrl.mm i replaced all occurrences of wxWidgetImpl::FindFromWXWidget( [self delegate] ); with wxWidgetImpl::FindFromWXWidget( (WXWidget) [self delegate] )

wxWidgets compiles now. Also, them samples build. Cool!! :)

back to wxPython trunk: the build process breaks. see below... (btw: wxPython trunk is not essential for me. i'd be happy to be able to compile any version of wxWidgets/wxPython for 10.6 !)

thanks in advance, cs

/var/tmp/WX_2_9_0/wxPython $ python setup.py build_ext --inplace --debug WXPORT=osx_cocoa

[...] gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -g -DSWIG_TYPE_TABLE=_wxPython_table -DSWIG_PYTHON_OUTPUT_TUPLE -DWXP_USE_THREAD=1 -UNDEBUG -D_FILE_OFFSET_BITS=64 -DWXDEBUG -DWXUSINGDLL -DWXOSX_COCOA__ -Iinclude -Isrc -I/opt/wx/2.8/lib/wx/include/osx_cocoa-unicode-debug-2.9 -I/opt/wx/2.8/include/wx-2.9 -I/tools/python/include/python2.7 -c src/osx_cocoa/animate_wrap.cpp -o build.unicode/temp.macosx-10.4-i386-2.7/src/osx_cocoa/animate_wrap.o -ggdb -O0 cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ src/osx_cocoa/animate_wrap.cpp: In function 'void SWIG_Python_AddErrorMsg(const char)': src/osx_cocoa/animate_wrap.cpp:864: warning: format not a string literal and no format arguments In file included from src/osx_cocoa/animate_wrap.cpp:2667: include/wx/wxPython/wxPython.h: In function 'bool wxPyCoreAPI_IMPORT()': include/wx/wxPython/wxPython.h:39: warning: deprecated conversion from string constant to 'char' include/wx/wxPython/wxPython.h:39: warning: deprecated conversion from string constant to 'char*' g++ -bundle -undefined dynamic_lookup -g build.unicode/temp.macosx-10.4-i386-2.7/src/osx_cocoa/animate_wrap.o -L/opt/wx/2.8/lib -lstdc++ -lwx_osx_cocoaud-2.9 -o /private/var/tmp/WX_2_9_0/trunk-wxPython/wx/_animate.so -framework QuickTime -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL ld: warning: in /System/Library/Frameworks//QuickTime.framework/QuickTime, missing required architecture x86_64 in file building '_propgrid' extension gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -g -DSWIG_TYPE_TABLE=_wxPython_table -DSWIG_PYTHON_OUTPUT_TUPLE -DWXP_USE_THREAD=1 -UNDEBUG -D_FILE_OFFSET_BITS=64 -DWXDEBUG -DWXUSINGDLL -DWXOSX_COCOA__ -Iinclude -Isrc -I/opt/wx/2.8/lib/wx/include/osx_cocoa-unicode-debug-2.9 -I/opt/wx/2.8/include/wx-2.9 -I/tools/python/include/python2.7 -c src/osx_cocoa/propgrid_wrap.cpp -o build.unicode/temp.macosx-10.4-i386-2.7/src/osx_cocoa/propgrid_wrap.o -ggdb -O0 cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ src/osx_cocoa/propgrid_wrap.cpp: In function 'void SWIG_Python_AddErrorMsg(const char)': src/osx_cocoa/propgrid_wrap.cpp:864: warning: format not a string literal and no format arguments In file included from src/osx_cocoa/propgrid_wrap.cpp:2877: include/wx/wxPython/wxPython.h: In function 'bool wxPyCoreAPI_IMPORT()': include/wx/wxPython/wxPython.h:39: warning: deprecated conversion from string constant to 'char' include/wx/wxPython/wxPython.h:39: warning: deprecated conversion from string constant to 'char' src/osx_cocoa/propgrid_wrap.cpp: In function 'bool PyObject_to_wxVariant(PyObject, wxVariant)': src/osx_cocoa/propgrid_wrap.cpp:3161: warning: deprecated conversion from string constant to 'char' src/osx_cocoa/propgrid_wrap.cpp:3161: warning: deprecated conversion from string constant to 'char' src/osx_cocoa/propgrid_wrap.cpp: In function 'bool PyObject_to_wxPGVariantAndBool(PyObject, wxPGVariantAndBool&)': src/osx_cocoa/propgrid_wrap.cpp:3366: warning: deprecated conversion from string constant to 'char' src/osx_cocoa/propgrid_wrap.cpp:3366: warning: deprecated conversion from string constant to 'char' src/osx_cocoa/propgrid_wrap.cpp: In function 'bool PyObject_to_wxPGPropArgCls(PyObject*, wxPGPropArgCls*)': src/osx_cocoa/propgrid_wrap.cpp:3544: error: call of overloaded 'wxPGPropArgCls(NULL)' is ambiguous /opt/wx/2.8/include/wx-2.9/wx/propgrid/propgridiface.h:77: note: candidates are: wxPGPropArgCls::wxPGPropArgCls(int) /opt/wx/2.8/include/wx-2.9/wx/propgrid/propgridiface.h:70: note: wxPGPropArgCls::wxPGPropArgCls(const wchar_t) /opt/wx/2.8/include/wx-2.9/wx/propgrid/propgridiface.h:64: note: wxPGPropArgCls::wxPGPropArgCls(const char) /opt/wx/2.8/include/wx-2.9/wx/propgrid/propgridiface.h:43: note: wxPGPropArgCls::wxPGPropArgCls(const wxPGPropArgCls&) /opt/wx/2.8/include/wx-2.9/wx/propgrid/propgridiface.h:38: note: wxPGPropArgCls::wxPGPropArgCls(const wxString&) /opt/wx/2.8/include/wx-2.9/wx/propgrid/propgridiface.h:33: note: wxPGPropArgCls::wxPGPropArgCls(const wxPGProperty) src/osx_cocoa/propgrid_wrap.cpp: In function 'PyObject wxPGAttributeStorage_to_PyObject(const wxPGAttributeStorage)': src/osx_cocoa/propgrid_wrap.cpp:3598: warning: unused variable 'res' error: command 'gcc' failed with exit status 1

wxtrac commented 14 years ago

2009-10-02 21:02:02: cscscs (junk@schleiermachers.de) commented


dear robind, will there be any further support in this matter from your side? this would be greatly appreciated. :)

thanks in advance, cs

wxtrac commented 14 years ago

2009-10-02 21:29:36: @RobinD42 commented


I don't currently have 10.6 installed so I can't do much more than guess at this point. I expect to be able to do more than that in a week or so after I finish up a few other tasks.

wxtrac commented 14 years ago

2009-10-05 07:50:03: cscscs (junk@schleiermachers.de) changed status from accepted to closed

2009-10-05 07:50:03: cscscs (junk@schleiermachers.de) changed resolution from * to fixed*

2009-10-05 07:50:03: cscscs (junk@schleiermachers.de) commented

hello,

svn revision 62256 seems to build ok. thanks to anybody involved. :)

best, cs