Bug #626

Unit test crashes on 10.7 Mac

Added by Deil Christoph over 11 years ago. Updated over 11 years ago.

Status:ClosedStart date:12/06/2012
Priority:NormalDue date:
Assigned To:Knödlseder Jürgen% Done:

100%

Category:-
Target version:-
Duration:

Description

On my 10.7 Mac (soon to be used as a Jenkins slave, see https://cta-redmine.irap.omp.eu/issues/621 ) the following tests fail when I run make check:

Test P6 unbinned observation: ....E. NOK
Test P7 unbinned observation: ....E. NOK
Test P6 binned observation: ........E. NOK
Test P7 binned observation: ........E. NOK

FAIL: test_LAT

Test HEALPix map: ................................................................................................E NOK

FAIL: test_python.py
==============================================
2 of 18 tests failed
Please report to jurgen.knodlseder@irap.omp.eu
==============================================

Attached find the GLAT.xml and GPython.xml files.

I started to debug the HEALPix crash (gdb has no debug symbols for Python, so I’ll look at the C test failure first):

$ cat /tmp/test_GSkyMap_save.py 
from gammalib import GSkymap
pixels = GSkymap("HPX", "GAL", 2, "RING", 2)
pixels.save('temp.fits')
# The following call crashes:
# terminate called throwing an exceptionAbort trap: 6
pixels.save('temp.fits')

mac-ci:tmp deil$ python -m trace --trace test_GSkyMap_save.py
...
sky.py(398):         return _sky.GSkymap_save(self, *args)
terminate called throwing an exceptionAbort trap: 6

GLAT.xml Magnifier (22.3 KB) Deil Christoph, 12/06/2012 02:38 PM

GPython.xml Magnifier (65.5 KB) Deil Christoph, 12/06/2012 02:38 PM


Recurrence

No recurrence.

History

#1 Updated by Deil Christoph over 11 years ago

Jürgen, why make the developer edit a test runner script to run gdb? Can we make exec vs. gdb a command line option that defaults to exec?
https://cta-redmine.irap.omp.eu/projects/gammalib/wiki/Contributing_to_GammaLib#Debugging-unit-tests

#2 Updated by Deil Christoph over 11 years ago

  • Assigned To changed from Deil Christoph to Knödlseder Jürgen

This runs for me without error:

cd test
./test_LAT

But if I run test_LAT from the top level, I get this crash:

mac-ci:gammalib deil$ time test/test_LAT
GNU gdb 6.3.50-20050815 (Apple version gdb-1822) (Sun Aug  5 03:00:42 UTC 2012)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ....... done

(gdb) run
Starting program: /Users/deil/software/gammalib/test/.libs/test_LAT 
Reading symbols for shared libraries ++++++......................... done

*****************************************
* LAT instrument specific class testing *
*****************************************
Test P6 response: EE. NOK
Test P7 response: EE. NOK
terminate called throwing an exception
Program received signal SIGABRT, Aborted.
0x00007fff8aefa82a in __kill ()
(gdb) bt
#0  0x00007fff8aefa82a in __kill ()
#1  0x00007fff8af46a9c in abort ()
#2  0x00007fff8692a7bc in abort_message ()
#3  0x00007fff86927fcf in default_terminate ()
#4  0x00007fff86928001 in safe_handler_caller ()
#5  0x00007fff8692805c in std::terminate ()
#6  0x00007fff86929152 in __cxa_throw ()
#7  0x00000001000738eb in GXml::save (this=0x7fff5fbff788, filename=<value temporarily unavailable, due to optimizations>) at GXml.cpp:258
#8  0x000000010011e88c in GTestSuites::save (this=<value temporarily unavailable, due to optimizations>, filename=<value temporarily unavailable, due to optimizations>) at GTestSuites.cpp:295
#9  0x00000001000063ca in std::string::_M_data () at /usr/include/c++/4.2.1/bits/basic_string.h:732
#10 std::string::_M_rep () at /usr/include/c++/4.2.1/bits/basic_string.h:287
#11 std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string () at basic_string.h:492
#12 std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string () at /usr/include/c++/4.2.1/bits/basic_string.h:492
#13 0x00000001000063ca in main () at ../inst/lat/test/test_LAT.cpp:732
(gdb)

Looks like an issue with GTestSuites or GXml, not the LAT code?

#3 Updated by Knödlseder Jürgen over 11 years ago

Christoph Deil wrote:

Jürgen, why make the developer edit a test runner script to run gdb? Can we make exec vs. gdb a command line option that defaults to exec?
https://cta-redmine.irap.omp.eu/projects/gammalib/wiki/Contributing_to_GammaLib#Debugging-unit-tests

It was just a working solution (which I use by the way), but things can be made better :)

#4 Updated by Knödlseder Jürgen over 11 years ago

I see the following errors in the GPython.xml report file:

<error message="*** ERROR in GPars::load(const std::string): Parameter file 'testme.par' not found. Make sure that PFILES environment variable is set correctly. " type="N10GException18par_file_not_foundE" />

It looks for a parameter file which is not found. The test indeed looks for a file that is not found, and should throw an exception, which apparently is not catched. This looks as the usual problem on Mac OS X 10.7 of uncatched exceptions. I fixed this on the GammaLib C++ API level, but it seems that it does not work on Python.

I’m wondering whether this is a Python problem. The reason why I think this is that I copied parts of the Python configure script to write the GammaLib configure script, and the MACOSX_DEPLOYMENT_TARGET problem exists maybe also in Python. See also #482, #483, #488, #489.

<testcase assertions="" classname="Python interface testing" name="Test HEALPix map" status="" time="0.479197">
185    
      <error message='*** ERROR in GFits::saveto(std::string&,bool): Attempted to overwrite FITS file "test_python_skymap_hpx_v2.fits"' type="N10GException15fits_file_existE" />
186    
    </testcase>

I think this is the same. The unit test checks double saving, which should lead to an error as it attemps to overwrite a file. An exception should be catched, which is not the case.

#5 Updated by Knödlseder Jürgen over 11 years ago

I check the Python configuration on your system:


$ python
Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from distutils import sysconfig
>>> cvars = sysconfig.get_config_vars()
>>> print cvars
{'AST_H_DIR': './Include', 'HAVE_INET_PTON': 1, 'HAVE_GETPEERNAME': 1, 'HAVE_GETC_UNLOCKED': 1, 'HAVE_BROKEN_POSIX_SEMAPHORES': 0, 'prefix': '/System/Library/Frameworks/Python.framework/Versions/2.7', 'HAVE_BROKEN_PIPE_BUF': 0, 'HAVE_SETPGRP': 1, 'HAVE_STDINT_H': 1, 'LDLIBRARYDIR': '', 'HAVE_ACOSH': 1, 'SRC_GDB_HOOKS': './Tools/gdb/libpython.py', 'PY_UNICODE_TYPE': 'unsigned short', 'HAVE_MKFIFO': 1, 'HAVE_GETGROUPS': 1, 'HAVE_CONFSTR': 1, 'PYTHONFRAMEWORKDIR': 'Python.framework', 'HAVE_C99_BOOL': 1, 'GRAMMAR_H': './Include/graminit.h', 'GRAMMAR_C': './Python/graminit.c', 'HAVE_ATTRIBUTE_FORMAT_PARSETUPLE': 0, 'PYTHONFRAMEWORKINSTALLDIR': '/System/Library/Frameworks/Python.framework', 'HAVE_LIBRESOLV': 0, 'VERSION': '2.7', 'HAVE_LOG1P': 1, 'HAVE_PTHREAD_INIT': 1, 'HAVE_STRUCT_STAT_ST_BIRTHTIME': 1, 'SIZEOF_LONG_LONG': 8, 'MAJOR_IN_MKDEV': 0, 'HAVE_LONG_LONG': 1, 'SIZEOF_SHORT': 2, 'AST_ASDL': './Parser/Python.asdl', 'SIZEOF_INT': 4, 'HAVE_TGAMMA': 1, 'HAVE_LONG_DOUBLE': 1, 'HAVE_BROKEN_NICE': 0, 'HAVE_UTIL_H': 1, 'HAVE_OSX105_SDK': 1, 'HAVE_SYSCONF': 1, 'DESTLIB': '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', 'BUILDEXE': '.exe', 'SHLIB_EXT': '".so"', 'MACHDEPS': 'plat-darwin plat-mac plat-mac/Carbon plat-mac/lib-scriptpackages \tplat-mac/lib-scriptpackages/_builtinSuites \tplat-mac/lib-scriptpackages/CodeWarrior \tplat-mac/lib-scriptpackages/Explorer \tplat-mac/lib-scriptpackages/Finder \tplat-mac/lib-scriptpackages/Netscape \tplat-mac/lib-scriptpackages/StdSuites \tplat-mac/lib-scriptpackages/SystemEvents', 'HAVE_STATVFS': 1, 'LDCXXSHARED': 'llvm-g++-4.2 -Wl,-F. -bundle -undefined dynamic_lookup', 'LIBDEST': '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', 'HAVE_SETUID': 1, 'HAVE_GETADDRINFO': 1, 'BEOS_THREADS': 0, 'HAVE_LIBIEEE': 0, 'CONFIGFILES': 'configure configure.in acconfig.h pyconfig.h.in Makefile.pre.in', 'LIBFFI_INCLUDEDIR': '/usr/include/ffi', 'HAVE_LARGEFILE_SUPPORT': 1, 'WITH_TSC': 0, 'datarootdir': '/System/Library/Frameworks/Python.framework/Versions/2.7/share', 'HAVE_UNSETENV': 1, 'HAVE_STRINGS_H': 1, 'SCRIPTDIR': '/System/Library/Frameworks/Python.framework/Versions/2.7/lib', 'HAVE_ALARM': 1, 'HAVE_SYS_AUDIOIO_H': 0, 'HAVE_CURSES_RESIZETERM': 1, 'LIBM': '', 'HAVE_GETWD': 1, 'HAVE_SIGNAL_H': 1, 'RETSIGTYPE': 'void', 'HAVE_SYS_MKDEV_H': 0, 'MODULE_OBJS': 'Modules/config.o \t\tModules/getpath.o \t\tModules/main.o \t\tModules/gcmodule.o', 'AST_H': './Include/Python-ast.h', 'LIBS': '-ldl  -framework CoreFoundation', 'PGENMAIN': '', 'HAVE_EPOLL': 0, 'GLHACK': '-Dclear=__GLclear', 'PACKAGE_STRING': 0, 'AST_C': './Python/Python-ast.c', 'HAVE_SYS_EVENT_H': 1, 'HAVE_HYPOT': 1, 'HAVE_WCSCOLL': 1, 'HAVE_SETRESUID': 0, 'HAVE_LCHFLAGS': 0, 'HAVE_INTTYPES_H': 1, 'DOUBLE_IS_BIG_ENDIAN_IEEE754': 0, 'HAVE_SYS_PARAM_H': 1, 'HAVE_SYS_SOCKET_H': 1, 'DLINCLDIR': '.', 'BINDIR': '/usr/local/bin', 'HAVE_STRUCT_STAT_ST_BLKSIZE': 1, 'HAVE_SYS_STAT_H': 1, 'BLDSHARED': 'llvm-gcc-4.2 -Wl,-F. -bundle -undefined dynamic_lookup -Wl,-F. -arch i386 -arch x86_64', 'HAVE_TM_ZONE': 1, 'ATHEOS_THREADS': 0, 'PROFILE_TASK': './Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck', 'TESTPROG': './Lib/test/regrtest.py', 'HAVE_UTIMES': 1, 'LIBPL': '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config', 'UNICODE_OBJS': 'Objects/unicodeobject.o Objects/unicodectype.o', 'LIBPC': '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/pkgconfig', 'PGENOBJS': 'Parser/acceler.o \t\tParser/grammar1.o \t\tParser/listnode.o \t\tParser/node.o \t\tParser/parser.o \t\tParser/parsetok.o \t\tParser/bitset.o \t\tParser/metagrammar.o \t\tParser/firstsets.o \t\tParser/grammar.o \t\tParser/pgen.o Objects/obmalloc.o \t\tPython/mysnprintf.o \t\tPython/pyctype.o \t\tParser/tokenizer_pgen.o \t\tParser/printgrammar.o \t\tParser/pgenmain.o', 'HAVE_REALPATH': 1, 'TKPATH': ':lib-tk', 'STDC_HEADERS': 1, 'SO': '.so', 'HAVE_LSTAT': 1, 'HAVE_DIRECT_H': 0, 'INCLDIRSTOMAKE': '/System/Library/Frameworks/Python.framework/Versions/2.7/include /System/Library/Frameworks/Python.framework/Versions/2.7/include /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7', 'RUNSHARED': 'DYLD_FRAMEWORK_PATH=/private/var/tmp/python/python-57~1/2.7/python:', 'HAVE_LIBREADLINE': 1, 'HAVE_GETITIMER': 1, 'HAVE_ATANH': 1, 'HAVE_RL_COMPLETION_SUPPRESS_APPEND': 0, 'ARFLAGS': 'rc', 'HAVE_FDATASYNC': 0, 'PLATDIR': 'plat-darwin', 'LN': 'ln', 'MACOSX_DEPLOYMENT_TARGET': '10.7', 'SHLIBS': '-ldl  -framework CoreFoundation', 'HAVE_TERM_H': 1, 'MVWDELCH_IS_EXPRESSION': 1, 'LDFLAGS': '-Wl,-F. -arch i386 -arch x86_64', 'PYTHON_HEADERS': 'Include/Python-ast.h \t\tInclude/Python.h \t\tInclude/abstract.h \t\tInclude/asdl.h \t\tInclude/ast.h \t\tInclude/bitset.h \t\tInclude/boolobject.h \t\tInclude/bytearrayobject.h \t\tInclude/bytes_methods.h \t\tInclude/bytesobject.h \t\tInclude/bufferobject.h \t\tInclude/cellobject.h \t\tInclude/ceval.h \t\tInclude/classobject.h \t\tInclude/cobject.h \t\tInclude/code.h \t\tInclude/codecs.h \t\tInclude/compile.h \t\tInclude/complexobject.h \t\tInclude/descrobject.h \t\tInclude/dictobject.h \t\tInclude/dtoa.h \t\tInclude/enumobject.h \t\tInclude/errcode.h \t\tInclude/eval.h \t\tInclude/fileobject.h \t\tInclude/floatobject.h \t\tInclude/frameobject.h \t\tInclude/funcobject.h \t\tInclude/genobject.h \t\tInclude/import.h \t\tInclude/intobject.h \t\tInclude/intrcheck.h \t\tInclude/iterobject.h \t\tInclude/listobject.h \t\tInclude/longintrepr.h \t\tInclude/longobject.h \t\tInclude/marshal.h \t\tInclude/memoryobject.h \t\tInclude/metagrammar.h \t\tInclude/methodobject.h \t\tInclude/modsupport.h \t\tInclude/moduleobject.h \t\tInclude/node.h \t\tInclude/object.h \t\tInclude/objimpl.h \t\tInclude/opcode.h \t\tInclude/osdefs.h \t\tInclude/parsetok.h \t\tInclude/patchlevel.h \t\tInclude/pgen.h \t\tInclude/pgenheaders.h \t\tInclude/pyarena.h \t\tInclude/pycapsule.h \t\tInclude/pyctype.h \t\tInclude/pydebug.h \t\tInclude/pyerrors.h \t\tInclude/pyfpe.h \t\tInclude/pymath.h \t\tInclude/pygetopt.h \t\tInclude/pymem.h \t\tInclude/pyport.h \t\tInclude/pystate.h \t\tInclude/pystrcmp.h \t\tInclude/pystrtod.h \t\tInclude/pythonrun.h \t\tInclude/pythread.h \t\tInclude/rangeobject.h \t\tInclude/setobject.h \t\tInclude/sliceobject.h \t\tInclude/stringobject.h \t\tInclude/structmember.h \t\tInclude/structseq.h \t\tInclude/symtable.h \t\tInclude/sysmodule.h \t\tInclude/traceback.h \t\tInclude/tupleobject.h \t\tInclude/ucnhash.h \t\tInclude/unicodeobject.h \t\tInclude/warnings.h \t\tInclude/weakrefobject.h \t\tpyconfig.h \t\tParser/parser.h \t\tParser/tokenizer.h', 'HAVE_CHOWN': 1, 'SIZEOF_PTHREAD_T': 4, 'MAKESETUP': './Modules/makesetup', 'HAVE_STROPTS_H': 0, 'LOCALMODLIBS': '', 'SYS_SELECT_WITH_SYS_TIME': 1, 'HAVE_FTELL64': 0, 'HAVE_DECL_TZNAME': 0, 'BUILDPYTHON': 'python.exe', 'HAVE_PUTENV': 1, 'HAVE_NETPACKET_PACKET_H': 0, 'HAVE_SETSID': 1, 'HAVE_LIBUTIL_H': 1, 'DESTPATH': '', 'EXTRAPLATDIR': 'plat-mac plat-mac/Carbon plat-mac/lib-scriptpackages \tplat-mac/lib-scriptpackages/_builtinSuites \tplat-mac/lib-scriptpackages/CodeWarrior \tplat-mac/lib-scriptpackages/Explorer \tplat-mac/lib-scriptpackages/Finder \tplat-mac/lib-scriptpackages/Netscape \tplat-mac/lib-scriptpackages/StdSuites \tplat-mac/lib-scriptpackages/SystemEvents', 'STRICT_SYSV_CURSES': "/* Don't use ncurses extensions */", 'SIGNAL_OBJS': '', 'exec_prefix': '/System/Library/Frameworks/Python.framework/Versions/2.7', 'PY_FORMAT_LONG_LONG': '"ll"', 'HAVE_SETRESGID': 0, 'INCLUDEDIR': '/System/Library/Frameworks/Python.framework/Versions/2.7/include', 'srcdir': '.', 'AIX_GENUINE_CPLUSPLUS': 0, 'C_THREADS': 0, 'PYTHONFRAMEWORK': 'Python', 'HAVE_LIBINTL_H': 0, 'PLATMACPATH': ':plat-mac:plat-mac/lib-scriptpackages', 'SIZEOF_LONG': 4, 'HAVE_MEMORY_H': 1, 'VA_LIST_IS_ARRAY': 0, 'HAVE_STDARG_PROTOTYPES': 1, 'HAVE_GETHOSTBYNAME_R_5_ARG': 0, 'LINKCC': 'llvm-gcc-4.2', 'HAVE_SYS_RESOURCE_H': 1, 'HAVE_DLOPEN': 1, 'AST_C_DIR': './Python', 'HAVE_PROTOTYPES': 1, 'HAVE_LIBDLD': 0, 'LIBPYTHON': '/Library/Python/2.7', 'HAVE_IEEEFP_H': 0, 'DYNLOADFILE': 'dynload_shlib.o', 'BINLIBDEST': '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', 'HAVE_TMPNAM': 1, 'HAVE_MKNOD': 1, 'DESTSHARED': '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', 'HAVE_SIGINTERRUPT': 1, 'HAVE_NCURSES_H': 1, 'MAJOR_IN_SYSMACROS': 0, 'HAVE_TIMES': 1, 'HAVE_GETHOSTBYNAME_R_6_ARG': 0, 'MEMTESTOPTS': '-l -x test_subprocess test_io test_lib2to3 \t\ttest_multibytecodec test_urllib2_localnet test_itertools \t\ttest_multiprocessing test_mailbox test_socket test_poll \t\ttest_select test_zipfile -x test_dl test___all__ test_fork1 \t\ttest_longexp', 'HAVE_GCC_ASM_FOR_X87': 1, 'HAVE_DLFCN_H': 1, 'HAVE_COPYSIGN': 1, 'HAVE_GETHOSTBYNAME': 1, 'WITH_PYMALLOC': 1, 'HAVE_MAKEDEV': 1, 'HAVE_PROCESS_H': 0, 'HAVE_STDLIB_H': 1, 'HAVE_FSYNC': 1, 'WITH_NEXT_FRAMEWORK': 1, 'HAVE_PTH': 0, 'HAVE_ADDRINFO': 1, 'HAVE_TZNAME': 0, 'SIZEOF_FPOS_T': 8, 'SUBDIRS': '', 'HAVE_ST_BLOCKS': 1, 'HAVE_SYS_MODEM_H': 0, 'PACKAGE_URL': 0, 'Py_USING_UNICODE': 1, 'HAVE_DECL_ISFINITE': 1, 'WINDOW_HAS_FLAGS': 0, 'HAVE_SOCKADDR_STORAGE': 1, 'HAVE_BROKEN_SEM_GETVALUE': 1, 'ASDLGEN_FILES': './Parser/asdl.py ./Parser/asdl_c.py', 'MODLIBS': '', 'HAVE_IO_H': 0, 'SGI_ABI': '', 'HAVE_STRING_H': 1, 'WITH_DOC_STRINGS': 1, 'GETPGRP_HAVE_ARG': 0, 'OBJECT_OBJS': 'Objects/abstract.o \t\tObjects/boolobject.o \t\tObjects/bufferobject.o \t\tObjects/bytes_methods.o \t\tObjects/bytearrayobject.o \t\tObjects/capsule.o \t\tObjects/cellobject.o \t\tObjects/classobject.o \t\tObjects/cobject.o \t\tObjects/codeobject.o \t\tObjects/complexobject.o \t\tObjects/descrobject.o \t\tObjects/enumobject.o \t\tObjects/exceptions.o \t\tObjects/genobject.o \t\tObjects/fileobject.o \t\tObjects/floatobject.o \t\tObjects/frameobject.o \t\tObjects/funcobject.o \t\tObjects/intobject.o \t\tObjects/iterobject.o \t\tObjects/listobject.o \t\tObjects/longobject.o \t\tObjects/dictobject.o \t\tObjects/memoryobject.o \t\tObjects/methodobject.o \t\tObjects/moduleobject.o \t\tObjects/object.o \t\tObjects/obmalloc.o \t\tObjects/rangeobject.o \t\tObjects/setobject.o \t\tObjects/sliceobject.o \t\tObjects/stringobject.o \t\tObjects/structseq.o \t\tObjects/tupleobject.o \t\tObjects/typeobject.o \t\tObjects/weakrefobject.o \t\tObjects/unicodeobject.o Objects/unicodectype.o', 'TESTPYTHON': 'DYLD_FRAMEWORK_PATH=/private/var/tmp/python/python-57~1/2.7/python: ./python.exe -Wd -3 -E -tt', 'HAVE_TMPNAM_R': 0, 'HAVE_WAITPID': 1, 'HAVE_ERFC': 1, 'HAVE_GETPRIORITY': 1, 'EXEMODE': 755, 'HAVE_SYS_BSDTTY_H': 0, 'CFLAGSFORSHARED': '-pipe', 'HAVE_CLOCK': 1, 'WITH_THREAD': 1, 'ENABLE_IPV6': 1, 'DOUBLE_IS_LITTLE_ENDIAN_IEEE754': 1, 'SIZEOF_SIZE_T': 4, 'CONFIG_ARGS': "'--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--disable-dependency-tracking' '--enable-ipv6' '--with-system-expat' '--with-threads' '--enable-framework=/System/Library/Frameworks' '--enable-toolbox-glue' '--with-system-ffi' '--with-gcc=llvm-gcc-4.2' 'CC=llvm-gcc-4.2' 'CXX=llvm-g++-4.2' 'CFLAGS=-g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32' 'LDFLAGS=-Wl,-F.'", 'HAVE_GETSID': 1, 'HAVE_SETITIMER': 1, 'HAVE_SYS_UTSNAME_H': 1, 'INSTALL_SCRIPT': '/usr/bin/install -c', 'HAVE_ALTZONE': 0, 'SRCDIRS': 'Parser Grammar Objects Python Modules Mac', 'DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754': 0, 'EXTRASPATH': ':../../Extras/lib/python', 'WANT_SIGFPE_HANDLER': 0, 'HAVE_LIBDL': 1, 'HAVE_PAUSE': 1, 'HAVE_KQUEUE': 1, 'HAVE_NICE': 1, 'HAVE_LINUX_NETLINK_H': 0, 'HAVE_SIGRELSE': 1, 'HAVE_CTERMID': 1, 'HAVE_SYS_STATVFS_H': 1, 'HAVE_UCS4_TCL': 0, 'HAVE_SHADOW_H': 0, 'SIZEOF_OFF_T': 8, 'HAVE_FORKPTY': 1, 'HAVE_SETPGID': 1, 'HAVE_FTELLO': 1, 'HAVE_GAMMA': 1, 'HAVE_WORKING_TZSET': 1, 'HAVE__GETPTY': 0, 'HAVE_GETLOADAVG': 1, 'INSTALL_DATA': '/usr/bin/install -c -m 644', 'HAVE_SYSEXITS_H': 1, 'HURD_C_THREADS': 0, 'HAVE_SYS_POLL_H': 1, 'SIZEOF_WCHAR_T': 4, 'HAVE_SYS_NDIR_H': 0, 'HAVE_LGAMMA': 1, 'HAVE_GRP_H': 1, 'SIZEOF_TIME_T': 4, 'EXTRAMACHDEPPATH': ':plat-mac:plat-mac/lib-scriptpackages', 'THREADOBJ': 'Python/thread.o', 'HAVE_GETCWD': 1, 'HAVE_CURSES_IS_TERM_RESIZED': 1, 'HAVE_EXPM1': 1, 'HAVE_SETREUID': 1, 'HAVE_SELECT': 1, 'EXE': '', 'HAVE_SYS_LOCK_H': 1, 'LDSHARED': 'llvm-gcc-4.2 -Wl,-F. -bundle -undefined dynamic_lookup -Wl,-F. -arch i386 -arch x86_64', 'INCLUDEPY': '/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7', 'INSTALL_PROGRAM': '/usr/bin/install -c', 'ASDLGEN': './Parser/asdl_c.py', 'TESTPYTHONOPTS': '', 'HAVE_DEV_PTC': 0, 'HAVE_GAI_STRERROR': 1, 'X87_DOUBLE_ROUNDING': 0, 'ARCHFLAGS': '-arch i386 -arch x86_64', 'HAVE_SYS_WAIT_H': 1, 'HAVE_DECL_ISINF': 1, 'LIBSUBDIRS': 'lib-tk lib-tk/test lib-tk/test/test_tkinter                 lib-tk/test/test_ttk site-packages test test/data \t\ttest/decimaltestdata test/xmltestdata \t\ttest/tracedmodules \t\tencodings compiler hotshot \t\temail email/mime email/test email/test/data \t\tjson json/tests \t\tsqlite3 sqlite3/test \t\tlogging bsddb bsddb/test csv importlib wsgiref \t\tlib2to3 lib2to3/fixes lib2to3/pgen2 lib2to3/tests \t\tlib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \t\tctypes ctypes/test ctypes/macholib idlelib idlelib/Icons \t\tdistutils distutils/command distutils/tests xml xml/dom xml/etree xml/parsers xml/sax \t\tmultiprocessing multiprocessing/dummy \t\tunittest unittest/test \t\tlib-old \t\tcurses pydoc_data plat-darwin plat-mac plat-mac/Carbon plat-mac/lib-scriptpackages \tplat-mac/lib-scriptpackages/_builtinSuites \tplat-mac/lib-scriptpackages/CodeWarrior \tplat-mac/lib-scriptpackages/Explorer \tplat-mac/lib-scriptpackages/Finder \tplat-mac/lib-scriptpackages/Netscape \tplat-mac/lib-scriptpackages/StdSuites \tplat-mac/lib-scriptpackages/SystemEvents', 'HAVE_UTIME_H': 1, 'PY_FORMAT_SIZE_T': '"z"', 'HAVE_SYS_FILE_H': 1, 'PTHREAD_SYSTEM_SCHED_SUPPORTED': 1, 'HAVE_GETNAMEINFO': 1, 'HAVE_FCNTL_H': 1, 'DISTFILES': 'README ChangeLog configure configure.in acconfig.h pyconfig.h.in Makefile.pre.in', 'HAVE_STRUCT_STAT_ST_GEN': 1, 'HAVE_SETVBUF': 1, 'MACHDEP': 'darwin', 'MACHDESTLIB': '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', 'HAVE_GETHOSTBYNAME_R': 0, 'HAVE_PTY_H': 0, 'HAVE_KILL': 1, 'HAVE_TEMPNAM': 1, 'MACHDEP_OBJS': 'Python/mactoolboxglue.o', 'PGEN': 'Parser/pgen', 'LIBDIR': '/System/Library/Frameworks/Python.framework/Versions/2.7/lib', 'LIBRARY': 'libpython2.7.a', 'HAVE_THREAD_H': 0, 'HAVE_SYS_EPOLL_H': 0, 'HAVE_SETEGID': 1, 'WANT_WCTYPE_FUNCTIONS': 0, 'SIZEOF_LONG_DOUBLE': 16, 'TANH_PRESERVES_ZERO_SIGN': 1, 'PARSER_OBJS': 'Parser/acceler.o \t\tParser/grammar1.o \t\tParser/listnode.o \t\tParser/node.o \t\tParser/parser.o \t\tParser/parsetok.o \t\tParser/bitset.o \t\tParser/metagrammar.o \t\tParser/firstsets.o \t\tParser/grammar.o \t\tParser/pgen.o Parser/myreadline.o Parser/tokenizer.o', 'SIZEOF_PID_T': 4, 'OPT': '-DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes', 'HAVE_STRFTIME': 1, 'PLATMACDIRS': 'plat-mac plat-mac/Carbon plat-mac/lib-scriptpackages \tplat-mac/lib-scriptpackages/_builtinSuites \tplat-mac/lib-scriptpackages/CodeWarrior \tplat-mac/lib-scriptpackages/Explorer \tplat-mac/lib-scriptpackages/Finder \tplat-mac/lib-scriptpackages/Netscape \tplat-mac/lib-scriptpackages/StdSuites \tplat-mac/lib-scriptpackages/SystemEvents', 'HAVE_SEM_TIMEDWAIT': 0, 'HAVE_MEMMOVE': 1, 'HAVE_POLL_H': 0, 'HAVE_NDIR_H': 0, 'HAVE_HSTRERROR': 1, 'HAVE_RL_PRE_INPUT_HOOK': 1, 'EXTRA_CFLAGS': '-DENABLE_DTRACE', 'GNULD': 'no', 'HAVE_GETRESGID': 0, 'BASECFLAGS': '-fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64', 'CONFINCLUDEPY': '/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7', 'OTHER_LIBTOOL_OPT': '', 'HAVE_BIND_TEXTDOMAIN_CODESET': 0, 'HAVE_FSTATVFS': 1, 'HAVE_MREMAP': 0, 'LIBOBJDIR': 'Python/', 'MODOBJS': 'Modules/threadmodule.o  Modules/signalmodule.o  Modules/posixmodule.o  Modules/errnomodule.o  Modules/pwdmodule.o  Modules/_sre.o  Modules/_codecsmodule.o  Modules/_weakref.o  Modules/zipimport.o  Modules/symtablemodule.o  Modules/xxsubtype.o', 'HAVE_PTHREAD_H': 1, 'HAVE_UNISTD_H': 1, 'HAVE_LCHMOD': 1, 'HAVE_SETREGID': 1, 'HAVE_SYS_UN_H': 1, 'LDLAST': '', 'CC': 'llvm-gcc-4.2', 'HAVE_SYS_LOADAVG_H': 0, 'AC_APPLE_UNIVERSAL_BUILD': 1, 'HAVE_CURSES_RESIZE_TERM': 1, 'HAVE_FTRUNCATE': 1, 'HAVE_CURSES_H': 1, 'HAVE_CONIO_H': 0, 'HAVE_FPATHCONF': 1, 'HAVE_STRUCT_STAT_ST_RDEV': 1, 'LIBOBJS': '', 'HAVE_BROKEN_POLL': 0, 'SUBDIRSTOO': 'Include Lib Misc Demo', 'TM_IN_SYS_TIME': 0, 'HAVE_GETPAGESIZE': 1, 'TESTOPTS': '-l', 'LDLIBRARY': 'Python.framework/Versions/2.7/Python', 'PYTHON': 'python', 'HAVE_USABLE_WCHAR_T': 0, 'INSTALL': '/usr/bin/install -c', 'HAVE_DYNAMIC_LOADING': 1, 'HAVE_SEM_UNLINK': 1, 'HAVE_DIRENT_H': 1, 'POBJS': 'Parser/acceler.o \t\tParser/grammar1.o \t\tParser/listnode.o \t\tParser/node.o \t\tParser/parser.o \t\tParser/parsetok.o \t\tParser/bitset.o \t\tParser/metagrammar.o \t\tParser/firstsets.o \t\tParser/grammar.o \t\tParser/pgen.o', 'HAVE_PTHREAD_SIGMASK': 1, 'HAVE_WCHAR_H': 1, 'HAVE_GETPGID': 1, 'PACKAGE_VERSION': 0, 'HAVE_STRUCT_TM_TM_ZONE': 1, 'HAVE_FTIME': 1, 'HAVE_GETSPENT': 0, 'HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK': 0, 'OLDPATH': ':lib-old', 'INSTALL_SHARED': '/usr/bin/install -c -m 555', 'PACKAGE_NAME': 0, 'SIGNED_RIGHT_SHIFT_ZERO_FILLS': 0, 'HAVE_FCHOWN': 1, 'LIBTOOL': 'llvm-gcc-4.2 -dynamiclib -all_load -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE', 'SVNVERSION': 'svnversion .', 'CPPFLAGS': '-I. -IInclude -I./Include', 'HAVE_ERRNO_H': 1, 'SIZEOF_UINTPTR_T': 4, 'HAVE_SYS_TERMIO_H': 0, 'HAVE_STAT_TV_NSEC2': 1, 'HAVE_STRDUP': 1, 'HAVE_CTERMID_R': 1, 'HAVE_SEM_OPEN': 1, 'HAVE_GETPID': 1, 'CONFINCLUDEDIR': '/System/Library/Frameworks/Python.framework/Versions/2.7/include', 'HAVE_GETPWENT': 1, 'SHELL': '/bin/sh', 'HAVE_OPENPTY': 1, 'HAVE_FORK': 1, 'PGOBJS': 'Objects/obmalloc.o \t\tPython/mysnprintf.o \t\tPython/pyctype.o \t\tParser/tokenizer_pgen.o \t\tParser/printgrammar.o \t\tParser/pgenmain.o', 'RESSRCDIR': 'Mac/Resources/framework', 'LIBC': '', 'HAVE_SIGACTION': 1, 'FLOCK_NEEDS_LIBBSD': 0, 'SIZEOF_FLOAT': 4, 'HAVE_GETPGRP': 1, 'PYTHONPATH': ':plat-darwin:plat-mac:plat-mac/lib-scriptpackages:../../Extras/lib/python:lib-tk:lib-old', 'RANLIB': 'ranlib', 'HAVE_DECL_ISNAN': 1, 'INSTSONAME': 'Python.framework/Versions/2.7/Python', 'SIZEOF_DOUBLE': 8, 'HAVE_RL_CALLBACK': 1, 'HAVE_FCHDIR': 1, 'TIME_WITH_SYS_TIME': 1, 'GRAMMAR_INPUT': './Grammar/Grammar', 'HAVE_SETEUID': 1, 'GETTIMEOFDAY_NO_TZ': 0, 'CXX': 'llvm-g++-4.2', 'Py_UNICODE_SIZE': 2, 'HAVE_TMPFILE': 1, 'HAVE_LANGINFO_H': 1, 'Py_DEBUG': 0, 'HAVE_DEV_PTMX': 1, 'HAVE_TCGETPGRP': 1, 'HAVE_CHFLAGS': 0, 'HAVE_SYS_TIME_H': 1, 'Py_ENABLE_SHARED': 0, 'DLLLIBRARY': '', 'HAVE_RL_COMPLETION_APPEND_CHARACTER': 1, 'HAVE_FSEEKO': 1, 'MACH_C_THREADS': 0, 'SITEPATH': '', 'HAVE_ASM_TYPES_H': 0, 'MANDIR': '/usr/share/man', 'DESTDIRS': '/System/Library/Frameworks/Python.framework/Versions/2.7 /System/Library/Frameworks/Python.framework/Versions/2.7/lib /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', 'HAVE_SOCKETPAIR': 1, 'LIBP': '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', 'STRINGLIB_HEADERS': './Include/bytes_methods.h \t\t./Objects/stringlib/count.h \t\t./Objects/stringlib/ctype.h \t\t./Objects/stringlib/fastsearch.h \t\t./Objects/stringlib/find.h \t\t./Objects/stringlib/formatter.h \t\t./Objects/stringlib/partition.h \t\t./Objects/stringlib/split.h \t\t./Objects/stringlib/stringdefs.h \t\t./Objects/stringlib/string_format.h \t\t./Objects/stringlib/transmogrify.h \t\t./Objects/stringlib/unicodedefs.h \t\t./Objects/stringlib/localeutil.h', 'HAVE_WAIT3': 1, 'HAVE_WAIT4': 1, 'SIZEOF__BOOL': 1, 'USE_TOOLBOX_OBJECT_GLUE': 1, 'HAVE_BROKEN_PTHREAD_SIGMASK': 0, 'EXTRATESTOPTS': '', 'HAVE_TIMEGM': 1, 'HAVE_LINUX_TIPC_H': 0, 'HAVE_GETRESUID': 0, 'HAVE_STRUCT_STAT_ST_BLOCKS': 1, 'HAVE_GETSPNAM': 0, 'HAVE_MKTIME': 1, 'HAVE_SYMLINK': 1, 'HAVE_RL_CATCH_SIGNAL': 0, 'PURIFY': '', 'HAVE_RL_COMPLETION_MATCHES': 1, 'XMLLIBSUBDIRS': 'xml xml/dom xml/etree xml/parsers xml/sax', 'MACHDEPPATH': ':plat-darwin', 'HAVE_UINTPTR_T': 1, 'WITH_LIBINTL': 0, 'HAVE_INITGROUPS': 1, 'SETPGRP_HAVE_ARG': 0, 'HAVE_SETGID': 1, 'HAVE_FINITE': 1, 'HAVE_ZLIB_COPY': 1, 'HAVE_SETLOCALE': 1, 'HAVE_LINK': 1, 'PACKAGE_BUGREPORT': 0, 'HAVE_EXECV': 1, 'PY_CFLAGS': '-fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -I. -IInclude -I./Include -pipe -DPy_BUILD_CORE -arch i386 -arch x86_64', 'SIZEOF_VOID_P': 4, 'HAVE_SEM_GETVALUE': 1, 'HAVE_ROUND': 1, 'HAVE_BLUETOOTH_H': 0, 'HAVE_SYS_TIMES_H': 1, 'PYTHONFRAMEWORKPREFIX': '/System/Library/Frameworks', 'LIBRARY_OBJS': 'Modules/getbuildinfo.o \t\tParser/acceler.o \t\tParser/grammar1.o \t\tParser/listnode.o \t\tParser/node.o \t\tParser/parser.o \t\tParser/parsetok.o \t\tParser/bitset.o \t\tParser/metagrammar.o \t\tParser/firstsets.o \t\tParser/grammar.o \t\tParser/pgen.o Parser/myreadline.o Parser/tokenizer.o \t\tObjects/abstract.o \t\tObjects/boolobject.o \t\tObjects/bufferobject.o \t\tObjects/bytes_methods.o \t\tObjects/bytearrayobject.o \t\tObjects/capsule.o \t\tObjects/cellobject.o \t\tObjects/classobject.o \t\tObjects/cobject.o \t\tObjects/codeobject.o \t\tObjects/complexobject.o \t\tObjects/descrobject.o \t\tObjects/enumobject.o \t\tObjects/exceptions.o \t\tObjects/genobject.o \t\tObjects/fileobject.o \t\tObjects/floatobject.o \t\tObjects/frameobject.o \t\tObjects/funcobject.o \t\tObjects/intobject.o \t\tObjects/iterobject.o \t\tObjects/listobject.o \t\tObjects/longobject.o \t\tObjects/dictobject.o \t\tObjects/memoryobject.o \t\tObjects/methodobject.o \t\tObjects/moduleobject.o \t\tObjects/object.o \t\tObjects/obmalloc.o \t\tObjects/rangeobject.o \t\tObjects/setobject.o \t\tObjects/sliceobject.o \t\tObjects/stringobject.o \t\tObjects/structseq.o \t\tObjects/tupleobject.o \t\tObjects/typeobject.o \t\tObjects/weakrefobject.o \t\tObjects/unicodeobject.o Objects/unicodectype.o \t\tPython/_warnings.o \t\tPython/Python-ast.o \t\tPython/asdl.o \t\tPython/ast.o \t\tPython/bltinmodule.o \t\tPython/ceval.o \t\tPython/compile.o \t\tPython/codecs.o \t\tPython/errors.o \t\tPython/frozen.o \t\tPython/frozenmain.o \t\tPython/future.o \t\tPython/getargs.o \t\tPython/getcompiler.o \t\tPython/getcopyright.o \t\tPython/getplatform.o \t\tPython/getversion.o \t\tPython/graminit.o \t\tPython/import.o \t\tPython/importdl.o \t\tPython/marshal.o \t\tPython/modsupport.o \t\tPython/mystrtoul.o \t\tPython/mysnprintf.o \t\tPython/peephole.o \t\tPython/pyarena.o \t\tPython/pyctype.o \t\tPython/pyfpe.o \t\tPython/pymath.o \t\tPython/pystate.o \t\tPython/pythonrun.o \t\tPython/structmember.o \t\tPython/symtable.o \t\tPython/sysmodule.o \t\tPython/traceback.o \t\tPython/getopt.o \t\tPython/pystrcmp.o \t\tPython/pystrtod.o \t\tPython/dtoa.o \t\tPython/formatter_unicode.o \t\tPython/formatter_string.o \t\tPython/dynload_shlib.o \t\t \t\tPython/mactoolboxglue.o \t\tPython/thread.o \t\tModules/config.o \t\tModules/getpath.o \t\tModules/main.o \t\tModules/gcmodule.o \t\t \t\tModules/threadmodule.o  Modules/signalmodule.o  Modules/posixmodule.o  Modules/errnomodule.o  Modules/pwdmodule.o  Modules/_sre.o  Modules/_codecsmodule.o  Modules/_weakref.o  Modules/zipimport.o  Modules/symtablemodule.o  Modules/xxsubtype.o', 'WITH_DYLD': 1, 'DIRMODE': 755, 'HAVE_TERMIOS_H': 1, 'HAVE_ASINH': 1, 'PACKAGE_TARNAME': 0, 'HAVE_GETHOSTBYNAME_R_3_ARG': 0, 'HAVE_TRUNCATE': 1, 'FILEMODE': 644, 'COREPYTHONPATH': ':plat-darwin:plat-mac:plat-mac/lib-scriptpackages:../../Extras/lib/python:lib-tk:lib-old', 'UNIVERSALSDK': '', 'HAVE_SYS_DIR_H': 0, 'PARSER_HEADERS': 'Parser/parser.h \t\tParser/tokenizer.h', 'BLDLIBRARY': '', 'HAVE_SOCKADDR_SA_LEN': 1, 'DIST': 'README ChangeLog configure configure.in acconfig.h pyconfig.h.in Makefile.pre.in Include Lib Misc Demo Ext-dummy', 'HAVE_SPAWN_H': 1, 'HAVE_SNPRINTF': 1, 'HAVE_SYS_TYPES_H': 1, 'HAVE_CHROOT': 1, 'HAVE_PTHREAD_DESTRUCTOR': 0, 'PYLONG_BITS_IN_DIGIT': 0, 'HAVE_SYS_SELECT_H': 1, 'HAVE_SSIZE_T': 1, 'HAVE_FCHMOD': 1, 'HAVE_KILLPG': 1, 'HAVE_STAT_TV_NSEC': 0, 'HAVE_PATHCONF': 1, 'HAVE_SETGROUPS': 1, 'HAVE_GETTIMEOFDAY': 1, 'HAVE_PLOCK': 0, 'HAVE_UNAME': 1, 'SYSLIBS': '', 'TESTPATH': '', 'LINKFORSHARED': '-u _PyMac_Error /System/Library/Frameworks/Python.framework/Versions/2.7/Python', 'MAINCC': 'llvm-gcc-4.2', 'HAVE_BLUETOOTH_BLUETOOTH_H': 0, 'HAVE_DUP2': 1, 'CFLAGS': '-fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64', 'POSIX_SEMAPHORES_NOT_ENABLED': 0, 'PYTHON_OBJS': 'Python/_warnings.o \t\tPython/Python-ast.o \t\tPython/asdl.o \t\tPython/ast.o \t\tPython/bltinmodule.o \t\tPython/ceval.o \t\tPython/compile.o \t\tPython/codecs.o \t\tPython/errors.o \t\tPython/frozen.o \t\tPython/frozenmain.o \t\tPython/future.o \t\tPython/getargs.o \t\tPython/getcompiler.o \t\tPython/getcopyright.o \t\tPython/getplatform.o \t\tPython/getversion.o \t\tPython/graminit.o \t\tPython/import.o \t\tPython/importdl.o \t\tPython/marshal.o \t\tPython/modsupport.o \t\tPython/mystrtoul.o \t\tPython/mysnprintf.o \t\tPython/peephole.o \t\tPython/pyarena.o \t\tPython/pyctype.o \t\tPython/pyfpe.o \t\tPython/pymath.o \t\tPython/pystate.o \t\tPython/pythonrun.o \t\tPython/structmember.o \t\tPython/symtable.o \t\tPython/sysmodule.o \t\tPython/traceback.o \t\tPython/getopt.o \t\tPython/pystrcmp.o \t\tPython/pystrtod.o \t\tPython/dtoa.o \t\tPython/formatter_unicode.o \t\tPython/formatter_string.o \t\tPython/dynload_shlib.o \t\t \t\tPython/mactoolboxglue.o \t\tPython/thread.o', 'HAVE_DEVICE_MACROS': 1, 'DISTDIRS': 'Include Lib Misc Demo Ext-dummy', 'BASEMODLIBS': '', 'AR': 'ar', 'HAVE_TCSETPGRP': 1, 'QUICKTESTOPTS': '-l -x test_subprocess test_io test_lib2to3 \t\ttest_multibytecodec test_urllib2_localnet test_itertools \t\ttest_multiprocessing test_mailbox test_socket test_poll \t\ttest_select test_zipfile', 'HAVE_FSEEK64': 0, 'HAVE_INET_ATON': 1, 'HAVE_LCHOWN': 1, 'HAVE_READLINK': 1, 'HAVE_STRUCT_STAT_ST_FLAGS': 1, 'HAVE_FLOCK': 1, 'WITH_VALGRIND': 0, 'HAVE_ERF': 1, 'HAVE_POLL': 0, 'CCSHARED': '-pipe', 'HAVE_GETLOGIN': 1}
>>> 

Sanning for MACOSX_DEPLOYMENT_TARGET I found
'MACOSX_DEPLOYMENT_TARGET': '10.7'

which in my understanding could be the source of the problem.

#6 Updated by Deil Christoph over 11 years ago

Jürgen Knödlseder wrote:

I check the Python configuration on your system:
[...]
Sanning for MACOSX_DEPLOYMENT_TARGET I found
[...]
which in my understanding could be the source of the problem.

I don’t know.
Do you have a simple test case where exception catching in Python doesn’t work?
That test could be added before the other Python tests that use exceptions, and a big fat warning printed that following errors might be due to this problem?

I don’t think it would help in this case, but I want to install a Python with debug symbols on mac-ci so that we can run Python tests in gdb.
Jürgen, if you have done this I’d appreciate any pointers, for now I’ll just try to build Python myself in ~deil/software/python

#7 Updated by Deil Christoph over 11 years ago

Apparently the Apply Python /usr/bin/python does have debug symbols, because gdb /usr/bin/python doesn’t complain.
I tried using it via

export PYTHON=/usr/bin/python
./configure
make
make check

but make check resulted in this error:

*********************************************
* COMPTEL instrument specific class testing *
*********************************************
Test instrument direction: ............ ok
Test pointing: ....... ok
Test response: ... ok
Test binned observation: .... ok
Test event bin: .......... ok
Test event cube: .................... ok
Test binned optimizer: ................................................................................................................... ok
PASS: test_COM
Traceback (most recent call last):
  File "/private/tmp/gammalib/pyext/gammalib/app.py", line 16, in swig_import_helper
    fp, pathname, description = imp.find_module('_app', [dirname(__file__)])
ImportError: No module named _app

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./test_python.py", line 21, in <module>
    from gammalib import *
  File "/private/tmp/gammalib/pyext/gammalib/__init__.py", line 4, in <module>
    from gammalib.app import *
  File "/private/tmp/gammalib/pyext/gammalib/app.py", line 26, in <module>
    _app = swig_import_helper()
  File "/private/tmp/gammalib/pyext/gammalib/app.py", line 18, in swig_import_helper
    import _app
ImportError: dlopen(/private/tmp/gammalib/pyext/build/gammalib/_app.so, 2): Symbol not found: _PyClass_Type
  Referenced from: /private/tmp/gammalib/pyext/build/gammalib/_app.so
  Expected in: flat namespace
 in /private/tmp/gammalib/pyext/build/gammalib/_app.so
FAIL: test_python.py
==============================================
1 of 18 tests failed
Please report to jurgen.knodlseder@irap.omp.eu
==============================================

What do I have to do to run the Python unit tests under gdb (with the correct Python, /usr/bin/python in this case) to debug crashes of gammalib Python unit tests?

#8 Updated by Knödlseder Jürgen over 11 years ago

Christoph Deil wrote:

Jürgen Knödlseder wrote:

I check the Python configuration on your system:
[...]
Sanning for MACOSX_DEPLOYMENT_TARGET I found
[...]
which in my understanding could be the source of the problem.

I don’t know.
Do you have a simple test case where exception catching in Python doesn’t work?
That test could be added before the other Python tests that use exceptions, and a big fat warning printed that following errors might be due to this problem?

One of the simple test cases is saving a file over an already existing file ...

But I think we cannot really live with this. Code behavior will become non-deterministic. We have to find a way to manage this Mac issue. It has to do with late bindings, so maybe we have just to learn more about it so that we can figure out how to setup code correctly.

Maybe we find another Python extension that is implemented as shared library and that throws exceptions. The problems occur, to my understanding, in this configuration.

I don’t think it would help in this case, but I want to install a Python with debug symbols on mac-ci so that we can run Python tests in gdb.
Jürgen, if you have done this I’d appreciate any pointers, for now I’ll just try to build Python myself in ~deil/software/python

Have not yet done this. But probably you don’t really need this, as on Mac OS X you always get a traceback when the crash occurs. And the pattern that I saw is always the same:

#5  0x00007fff8692805c in std::terminate ()
#6  0x00007fff86929152 in __cxa_throw ()

i.e. the exception throw is followed by a program termination without any catching of the exception.

#9 Updated by Knödlseder Jürgen over 11 years ago

Christoph Deil wrote:

Apparently the Apply Python /usr/bin/python does have debug symbols, because gdb /usr/bin/python doesn’t complain.
I tried using it via
[...]

but make check resulted in this error:
[...]

What do I have to do to run the Python unit tests under gdb (with the correct Python, /usr/bin/python in this case) to debug crashes of gammalib Python unit tests?

No idea.

#10 Updated by Knödlseder Jürgen over 11 years ago

There is one thing we can try:

When I remember correctly, the distutils package uses exactly the same compile options that were used for Python. As shown above, Python was apparently compiled using the MACOSX_DEPLOYMENT_TAGRET environment variable set.

So we can try to remove this environment variable from the distutils definition. This can be done in setup.py, where there is already a section that manipulates the distutils environment variables:

# Darwin MacPorts kluge: Remove -L/opt/local/lib path from LDSHARED as this
# overrides the GammaLib settings. Otherwise, MacPorts libraries would be
# used instead of the libraries selected by GammaLib
if sys.platform.lower().startswith("darwin"):

    # Get configuration variables
    cvars = sysconfig.get_config_vars()

    # Extract LDSHARED
    ldshared_old = cvars.get('LDSHARED')
    ldshared_new = ''
    ldshared_rm  = ''
    for option in ldshared_old.split(' '):
        if option.lstrip().find('-L/opt/local/lib') != 0:
            ldshared_new += option + ' '
        else:
            ldshared_rm += option + ' '
    if (len(ldshared_rm) > 0):
        sys.stdout.write("Removed following option(s) from LDSHARED: "+ldshared_rm+"\n")    
    # Set LDSHARED
    cvars['LDSHARED'] = ldshared_new

We can add some code that removes MACOSX_DEPLOYMENT_TAGRET from cvars, and see if this solves the problem.

#11 Updated by Knödlseder Jürgen over 11 years ago

  • Status changed from In Progress to Pull request

Branch 007-test

#12 Updated by Knödlseder Jürgen over 11 years ago

  • Status changed from Pull request to New

#13 Updated by Knödlseder Jürgen over 11 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

I checked on mac-ci but it seems that MACOSX_DEPLOYMENT_TAGRET is not set.

The only unit test error I get is in the Python test:

Test GLog: .................... ok
Test GPars: E NOK
Test GFits: .............. ok
Test GMatrix: ................ ok
Test GSymMatrix: .......... ok
Test GSparseMatrix: ................ ok
Model module dummy test: . ok
Numerics module dummy test: . ok
Observation module dummy test: . ok
Optimizer module dummy test: . ok
Test HEALPix map: ................................................................................................E NOK
Test CAR projection map: ................................................... ok
Test TAN projection map: ................................................... ok
Test STG projection map: ................................................... ok
Test AZP projection map: ................................................... ok
Test FK5 to Galactic coordinate conversion: .. ok
Test GNodeArray: ..................... ok
Test module dummy test: . ok
XML module dummy test: . ok
MWL dummy test: . ok
Test CTA effective area classes: ................ ok
Test CTA PSF classes: ...................... ok
LAT dummy test: . ok

The first error (Test GPars: E NOK) has the following test result:

    <testcase assertions="" classname="Python interface testing" name="Test GPars" status="" time="0.000167">
      <error message="*** ERROR in GPars::load(const std::string): Parameter file 'testme.par' not found. Make sure that PFILES environment variable is set correctly. " type="N10GException18par_file_not_foundE" />
    </testcase>

It appears here in test/test_GApplication.py:
        # Test GPars constructor with bad filename.
        self.test_try("Test GPars constructor with bad filename")
        try:
            pars = GPars("testme.par")
            self.test_try_failure("Exception not thrown.")
        except:
            self.test_try_success()
        else:
            self.test_try_failure("This should never happen.")

The GPars constructor tries opening a parameter file that does not exist, and should throw an exception. This exception should be catched by the test suite, but apparently it is not. So the question is: Why does the test suite does not catch the exception?

The second error (Test HEALPix map: ................................................................................................E NOK) has the following test result:

    <testcase assertions="" classname="Python interface testing" name="Test HEALPix map" status="" time="0.006667">
      <error message='*** ERROR in GFits::saveto(std::string&,bool): Attempted to overwrite FITS file "test_python_skymap_hpx_v2.fits"' type="N10GException15fits_file_existE" />
    </testcase>

It appears here in test/test_GSky.py:
        # Save HEALPix skymap twice. The second saving should fail.
        try:
            pixels.save(file2, True)
            pixels.save(file2)
        except RuntimeError:
            pass
        else:
            raise RuntimeError("*** TEST ERROR: FITS file overwritten!")
        pixels.save(file2, True)

The problem is the same as above. The Python test provokes an exception, that is not catched by the test suite.

So it seems that the problem is not that GammaLib is not working correctly, but that the test suite does not catch the exceptions. This problem can be (at least temporarily) solved by removing the specific tests from the Python test suite.

This has been done in commit 42eae75.

#14 Updated by Knödlseder Jürgen over 11 years ago

Christoph Deil wrote:

On my 10.7 Mac (soon to be used as a Jenkins slave, see https://cta-redmine.irap.omp.eu/issues/621 ) the following tests fail when I run make check:

Test P6 unbinned observation: ....E. NOK
Test P7 unbinned observation: ....E. NOK
Test P6 binned observation: ........E. NOK
Test P7 binned observation: ........E. NOK

The errors here are due to the fact that the GAMMALIB_CALDB environment variable has been set to a directory that does not exist.

The bug #682 was created to track this problem.

#15 Updated by Knödlseder Jürgen over 11 years ago

Jürgen Knödlseder wrote:

So it seems that the problem is not that GammaLib is not working correctly, but that the test suite does not catch the exceptions. This problem can be (at least temporarily) solved by removing the specific tests from the Python test suite.

It turned out that the problem was in fact a GammaLib problem, in contrary to the former assessment.

Adding a specific catch for the GammaLib exception base class GExceptionHandler in GException.i solved the problem. Now, all exceptions thrown by GammaLib are properly catched in Python

%exception {
    try {
        $action
    }
    catch (const GException::out_of_range& e) {
        SWIG_exception(SWIG_IndexError, e.what());
    }
    catch (const GExceptionHandler& e) {
        SWIG_exception(SWIG_RuntimeError, e.what());
    }
    catch (const std::exception& e) {
        SWIG_exception(SWIG_RuntimeError, e.what());
    }}

This should definitely solve the problem.

#16 Updated by Knödlseder Jürgen over 11 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF