[AG-DEV] SWIG Errors building Common on OS X Tiger

Eric Olson eolson at mcs.anl.gov
Fri May 18 12:42:16 CDT 2007


Hi Ed,
It looks like you'll need to use an earlier version of python (2.4 for 
example) and swig 1.3.24, at least for now.

Here's a shorter command to test the problem -- in case you wanted to 
debug the error for python2.5 or newer versions of swig.

   cd common/examples/_common
   python setup.py clean --all
   python setup.py build

   (During packaging, this is done from "BuildPythonModules.py")

If you run into more problems, just ask.

Eric


Ed Brannin wrote:
> Hello,
> 
> I'm having trouble building AG on my OS X 10.4 system, with Swig
> 1.3.29 -- if anyone can figure this out (or reproduce, at least) that
> would be great.
> 
> Everyone else, pardon the spammy-long message. :-)
> 
> -Ed Brannin
> edbrannin at gmail.com
> 
>  Writing 
> /Users/ed/Code/AccessGrid/build_svn/dist-20070516_150921/lib/python2.5/site-packages/PACKAGENAME-1.0-py2.5.egg-info 
> 
> Build finished at:  Wed, 16 May 2007 20:12:10 +0000
> Completed in 3.50345897675 seconds
> *********** Building common
> 
> Running swig with: |['swig', '-python', '-outdir', 'common', '-c++',
> '-new_repr', 
> '-I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5',
> '-I../../src', '-cpperraswarn', '-o', 'common_wrap.cpp', 'common.i']|
> ../../src/rtp.h:51: Warning(205): CPP #error "RTP library requires
> WORDS_BIGENDIAN or WORDS_SMALLENDIAN to be defined.".
> common.i:22: Warning(124): Specifying the language name in %typemap is
> deprecated - use #ifdef SWIG<LANG> instead.
> common.i:28: Warning(124): Specifying the language name in %typemap is
> deprecated - use #ifdef SWIG<LANG> instead.
> common.i:38: Warning(124): Specifying the language name in %typemap is
> deprecated - use #ifdef SWIG<LANG> instead.
> common.i:42: Warning(124): Specifying the language name in %typemap is
> deprecated - use #ifdef SWIG<LANG> instead.
> common.i:46: Warning(124): Specifying the language name in %typemap is
> deprecated - use #ifdef SWIG<LANG> instead.
> common.i:50: Warning(124): Specifying the language name in %typemap is
> deprecated - use #ifdef SWIG<LANG> instead.
> common.i:54: Warning(124): Specifying the language name in %typemap is
> deprecated - use #ifdef SWIG<LANG> instead.
> common.i:58: Warning(124): Specifying the language name in %typemap is
> deprecated - use #ifdef SWIG<LANG> instead.
> running clean
> removing 'build/temp.macosx-10.3-fat-2.5' (and everything under it)
> removing 'build/lib.macosx-10.3-fat-2.5' (and everything under it)
> 'build/bdist.macosx-10.3-fat' does not exist -- can't clean it
> 'build/scripts-2.5' does not exist -- can't clean it
> removing 'build'
> Build finished at:  Wed, 16 May 2007 20:12:12 +0000
> Completed in 1.41529512405 seconds
> Running swig with: |['swig', '-python', '-outdir', 'common', '-c++',
> '-new_repr', 
> '-I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5',
> '-I../../src', '-cpperraswarn', '-o', 'common_wrap.cpp', 'common.i']|
> ../../src/rtp.h:51: Warning(205): CPP #error "RTP library requires
> WORDS_BIGENDIAN or WORDS_SMALLENDIAN to be defined.".
> common.i:22: Warning(124): Specifying the language name in %typemap is
> deprecated - use #ifdef SWIG<LANG> instead.
> common.i:28: Warning(124): Specifying the language name in %typemap is
> deprecated - use #ifdef SWIG<LANG> instead.
> common.i:38: Warning(124): Specifying the language name in %typemap is
> deprecated - use #ifdef SWIG<LANG> instead.
> common.i:42: Warning(124): Specifying the language name in %typemap is
> deprecated - use #ifdef SWIG<LANG> instead.
> common.i:46: Warning(124): Specifying the language name in %typemap is
> deprecated - use #ifdef SWIG<LANG> instead.
> common.i:50: Warning(124): Specifying the language name in %typemap is
> deprecated - use #ifdef SWIG<LANG> instead.
> common.i:54: Warning(124): Specifying the language name in %typemap is
> deprecated - use #ifdef SWIG<LANG> instead.
> common.i:58: Warning(124): Specifying the language name in %typemap is
> deprecated - use #ifdef SWIG<LANG> instead.
> running build
> running build_py
> creating build
> creating build/lib.macosx-10.3-fat-2.5
> creating build/lib.macosx-10.3-fat-2.5/common
> copying common/__init__.py -> build/lib.macosx-10.3-fat-2.5/common
> copying common/common.py -> build/lib.macosx-10.3-fat-2.5/common
> copying common/RTPBeacon.py -> build/lib.macosx-10.3-fat-2.5/common
> copying common/RTPSensor.py -> build/lib.macosx-10.3-fat-2.5/common
> copying common/scheduler.py -> build/lib.macosx-10.3-fat-2.5/common
> running build_ext
> building '_common' extension
> creating build/temp.macosx-10.3-fat-2.5
> gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
> -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd
> -fno-common -dynamic -DNDEBUG -g -O3
> -I/Users/ed/Code/AccessGrid/build_svn/common/src
> -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5
> -c common_wrap.cpp -o build/temp.macosx-10.3-fat-2.5/common_wrap.o
> common_wrap.cpp: In function 'int
> SWIG_Python_ConvertFunctionPtr(PyObject*, void**, swig_type_info*)':
> common_wrap.cpp:2051: error: invalid conversion from 'const char*' to 
> 'char*'
> common_wrap.cpp: In function 'int
> SWIG_Python_ConvertFunctionPtr(PyObject*, void**, swig_type_info*)':
> common_wrap.cpp:2051: error: invalid conversion from 'const char*' to 
> 'char*'
> common_wrap.cpp: In function 'int SWIG_AsCharPtrAndSize(PyObject*,
> char**, size_t*, int*)':
> common_wrap.cpp:2622: error: invalid conversion from 'int*' to 
> 'Py_ssize_t*'
> common_wrap.cpp:2622: error:   initializing argument 3 of 'int
> PyString_AsStringAndSize(PyObject*, char**, Py_ssize_t*)'
> common_wrap.cpp: In function 'int SWIG_AsCharPtrAndSize(PyObject*,
> char**, size_t*, int*)':
> common_wrap.cpp:2622: error: invalid conversion from 'int*' to 
> 'Py_ssize_t*'
> common_wrap.cpp:2622: error:   initializing argument 3 of 'int
> PyString_AsStringAndSize(PyObject*, char**, Py_ssize_t*)'
> common_wrap.cpp: In function 'void
> SWIG_Python_FixMethods(PyMethodDef*, swig_const_info*,
> swig_type_info**, swig_type_info**)':
> common_wrap.cpp:9970: error: invalid conversion from 'const char*' to 
> 'char*'
> common_wrap.cpp: In function 'void
> SWIG_Python_FixMethods(PyMethodDef*, swig_const_info*,
> swig_type_info**, swig_type_info**)':
> common_wrap.cpp:9970: error: invalid conversion from 'const char*' to 
> 'char*'
> lipo: can't figure out the architecture type of: /var/tmp//ccCAkyAz.out
> error: command 'gcc' failed with exit status 1
> Build of Python module common/examples/_common failed
> /Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python 
> 
> BuildPythonModules.py /Users/ed/Code/AccessGrid/build_svn
> /Users/ed/Code/AccessGrid/build_svn/AccessGrid-20070516_150921
> /Users/ed/Code/AccessGrid/build_svn/dist-20070516_150921 failed with
> 256; exiting
> rake aborted!
> Command failed with status (1): [python BuildSnapshot.py ]
> /Users/ed/Code/AccessGrid/build_svn/rakefile:123
> (See full trace by running task with --trace)
> wireless-111-15:~/Code/AccessGrid/build_svn ed$ swig -v
> Must specify an input file. Use -help for available options.
> wireless-111-15:~/Code/AccessGrid/build_svn ed$ swig --version
> Unable to find option or file '--version', use 'swig -help' for more
> information.
> wireless-111-15:~/Code/AccessGrid/build_svn ed$ swig -version
> 
> SWIG Version 1.3.29
> 
> Compiled with /usr/bin/g++-4.0 [i686-apple-darwin8.8.1]
> Please see http://www.swig.org for reporting bugs and further information
> wireless-111-15:~/Code/AccessGrid/build_svn ed$ which swig
> /opt/local/bin/swig
> 
> 




More information about the ag-dev mailing list