Orange Forum • View topic - compile error on mac

compile error on mac

Report bugs (or imagined bugs).
(Archived/read-only, please use our ticketing system for reporting bugs and their discussion.)
Forum rules
Archived/read-only, please use our ticketing system for reporting bugs and their discussion.

compile error on mac

Postby priya.siddharth » Mon Mar 02, 2009 0:22

Hi,
I have downloaded the source snapshot (http://www.ailab.si/orange/download/ora ... -01-04.tgz)

I compile using

python setup.py compile

The compile proceeds for some time after which it says it can't find numpy/arrayobject.h

I create a symbolic link from /Library/Python/2.5/site-packages/numpy-1.3.0.dev6308-py2.5-macosx-10.3-i386.egg/numpy/core/include/numpy to /usr/local/include

after which the compile proceeds for sometime before spitting out this error

NOTE: Python Qt not installed, OrangeCanvas and OrangeWidgets will not work.
You can get it at: http://www.riverbankcomputing.co.uk/pyqt/index.php
Sipconfig not found, Qt version could not be found!
PyQwt not installed!
You can get it at: http://pyqwt.sourceforge.net/
Can not determine GCC version!
Orange specific data installation
running compile
Default compiler options are taken...
/usr/include/signal.h:71: error: ‘NSIG’ was not declared in this scope
/usr/include/signal.h:72: error: ‘NSIG’ was not declared in this scope
/usr/include/signal.h:71: error: ‘NSIG’ was not declared in this scope
/usr/include/signal.h:72: error: ‘NSIG’ was not declared in this scope

compiling.log contents

(for MODULE in include orange orangeom orangene corn statc ; \
do if ! make all -C $MODULE OLD=../..; then exit 1; fi; done)
g++ -arch i386 -arch ppc -fPIC -fpermissive -fno-common -w -DDARWIN -DORANGE_EXPORTS -D_POSIX_C_SOURCE -O3 -I../../../orange-temp/Orange.app/Contents/Resources/include/ -c lib_kernel.cpp -o obj/lib_kernel.o

any idea?

thanks

Postby Mitar » Mon Mar 09, 2009 0:26

By my experience this is a bug in Apple GCC which looses some defined macros (or maybe creates some new macros) and thus section after:

#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))

is used but NSIG is not defined (because before exactly the same line in /usr/include/sys/signal.h which is included a few lines about is not yet true and definition is not used). This is a problem with Mac OS X system header files.

I have been playing with defining some of _POSIX_C_SOURCE and/or _DARWIN_C_SOURCE but at the end everything went away after some time and some updates so I have never really discovered any deterministic workaround. Try updating your system and/or Xcode. Maybe also simply comment out those if lines (but not their content) in /usr/include/signal.h and /usr/include/sys/signal.h.


Return to Bugs