[Bulk] Re: py-wxpython build failure

Kevin Horton khorton01 at rogers.com
Fri Jan 19 11:25:44 PST 2007


On 19 Jan 2007, at 12:49, Jyrki Wahlstedt wrote:

> On 19.1.2007, at 3.35, Kevin Horton wrote:
>
>> I'm a new MacPorts user with my first build failure.  I'm running  
>> OS X 10.4.8 on a G4. I believe I have the latest XCode:
>>
>> % gcc --version
>> powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc.  
>> build 5367)
>>
>> I did a port selfupdate today, then a port install py-wxpython.   
>> It failed like:
>>
>> Error: Target com.apple.build returned: shell command "cd "/opt/ 
>> local/var/db/dports/build/ 
>> _Volumes_Maxtor_300_opt_local_var_db_dports_sources_rsync.rsync.darwi 
>> nports.org_dpupdate_dports_python_py-wxpython/work/wxPython- 
>> src-2.8.0.1/wxPython" && WX_CONFIG="/opt/local/bin/wx-config"  
>> UNICODE="1" WXPORT="mac" /opt/local/bin/python2.5 setup.py build"  
>> returned error 1
>> Command output: src/helpers.cpp:2894: error: 'bool  
>> wxPyImageHandler::LoadFile' is not a static member of 'class  
>> wxPyImageHandler'
>> src/helpers.cpp:2894: error: 'wxImage' was not declared in this scope
>> src/helpers.cpp:2894: error: 'image' was not declared in this scope
>> src/helpers.cpp:2894: error: 'wxInputStream' was not declared in  
>> this scope
>> src/helpers.cpp:2894: error: 'stream' was not declared in this scope
>> src/helpers.cpp:2895: error: expected primary-expression before  
>> 'bool'
>> src/helpers.cpp:2895: error: expected primary-expression before 'int'
>> src/helpers.cpp:2895: error: initializer expression list treated  
>> as compound expression
>> src/helpers.cpp:2895: error: expected ',' or ';' before '{' token
>> src/helpers.cpp:2919: error: 'bool wxPyImageHandler::SaveFile' is  
>> not a static member of 'class wxPyImageHandler'
>> src/helpers.cpp:2919: error: 'wxImage' was not declared in this scope
>> src/helpers.cpp:2919: error: 'image' was not declared in this scope
>> src/helpers.cpp:2919: error: 'wxOutputStream' was not declared in  
>> this scope
>> src/helpers.cpp:2919: error: 'stream' was not declared in this scope
>> src/helpers.cpp:2920: error: expected primary-expression before  
>> 'bool'
>> src/helpers.cpp:2920: error: initializer expression list treated  
>> as compound expression
>> src/helpers.cpp:2920: error: expected ',' or ';' before '{' token
>> src/helpers.cpp:2942: error: 'int wxPyImageHandler::GetImageCount'  
>> is not a static member of 'class wxPyImageHandler'
>> src/helpers.cpp:2942: error: 'wxInputStream' was not declared in  
>> this scope
>> src/helpers.cpp:2942: error: 'stream' was not declared in this scope
>> src/helpers.cpp:2942: error: expected ',' or ';' before '{' token
>> src/helpers.cpp: In function 'bool wxPyCheckForApp()':
>> src/helpers.cpp:752: warning: control reaches end of non-void  
>> function
>> src/helpers.cpp: In member function 'bool wxPyInputStream::eof()':
>> src/helpers.cpp:1094: warning: control reaches end of non-void  
>> function
>> src/helpers.cpp: In member function 'int wxPyInputStream::tell()':
>> src/helpers.cpp:1241: warning: control reaches end of non-void  
>> function
>> src/helpers.cpp: In function 'bool wxPyTestDisplayAvailable()':
>> src/helpers.cpp:3016: warning: control reaches end of non-void  
>> function
>> error: command '/usr/bin/gcc-4.0' failed with exit status 1
>>
>> Error: Status 1 encountered during processing.
>> ============================
>>
>> I repeated again with port -v install py-wxpython, and noted that  
>> there may be signs that it thinks it is building for 10.3.  There  
>> is also a strange cc1plus: warning buried in there:
>>
>> cc1plus: warning: command line option "-Wstrict-prototypes" is  
>> valid for C/ObjC but not for C++
>>
>> ...
>> ls: wx*-2.4-config: No such file or directory
>> ls: wx*-2.4-config: No such file or directory
>>
>>   Warning: No config found to match: /usr/bin/wx-config -- 
>> toolkit=mac --unicode=yes --version=2.8 --libs gl
>>            in /usr/lib/wx/config
>>   If you require this configuration, please install the desired
>>   library build.  If this is part of an automated configuration
>>   test and no other errors occur, you may safely ignore it.
>>   You may use wx-config --list to see all configs available in
>>   the default prefix.
>>
>> Found wx-config: /usr/bin/wx-config
>>     Using flags:  --toolkit=mac --unicode=yes --version=2.8
>> Preparing CORE...
>> Preparing GLCANVAS...
>> Preparing STC...
>> Preparing GIZMOS...
>> running build
>> running build_py
>> copying wx/__version__.py -> build.unicode/lib.macosx-10.3-ppc-2.5/wx
>> copying wx/build/build_options.py -> build.unicode/lib.macosx-10.3- 
>> ppc-2.5/wx/build
>> running build_ext
>> building '_core_' extension
>> /usr/bin/gcc-4.0 -fno-strict-aliasing -Wno-long-double -no-cpp- 
>> precomp -mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes - 
>> DSWIG_TYPE_TABLE=_wxPython_table -DSWIG_PYTHON_OUTPUT_TUPLE - 
>> DWXP_USE_THREAD=1 -UNDEBUG -Iinclude -Isrc -I/opt/local/include/ 
>> python2.5 -c src/helpers.cpp -o build.unicode/temp.macosx-10.3- 
>> ppc-2.5/src/helpers.o -O2
>> cc1plus: warning: command line option "-Wstrict-prototypes" is  
>> valid for C/ObjC but not for C++
>> In file included from src/helpers.cpp:16:
>> include/wx/wxPython/wxPython_int.h:19:19: error: wx/wx.h: No such  
>> file or directory
>> ...
>>
>> What other info will help troubleshooting?
>>
>>
>> Kevin Horton
>> Ottawa, Canada
>>
>>
> Hi,
> one occasion I've seen something like this is, you could check,  
> that ${prefix}/bin/wx-config is symbolic link with inclination to  
> point a non-existing script:
>
> jwa at bach:wxWidgets-devel> ll /opt/local/bin/wx-config
> lrwxr-xr-x   1 root  admin  48 18 Tam 20:27 /opt/local/bin/wx- 
> config@ -> /opt/local/lib/wx/config/mac-unicode-release-2.6
>
> Remove that and recreate the link:
>
> jwa at bach:wxWidgets-devel> sudo rm /opt/local/bin/wx-config
> Password:
> jwa at bach:wxWidgets-devel> sudo ln -s /opt/local/lib/wx/config/mac- 
> unicode-release-2.8 /opt/local/bin/wx-config

Thank you very, very much.  This problem had in fact occurred.  I  
fixed the link, and py-wxpython builds successfully.

Digging deeper, I see that perhaps this link comes from:

${prefix}/var/db/dports/software/wxWidgets-devel/2007-01-18_0 
+darwin_8/opt/local/bin/wx-config, which was pointing to the same  
wrong mac-unicode-release-2.6

I dot yet understand why that link is made incorrectly, but I'll dig  
some more to see if it is possible to fix the root cause.

Kevin Horton
Ottawa, Canada





More information about the macports-users mailing list