spack: Spack fails to build python on OSX 10.9

I ran into issues building python using spack on OSX 10.9, using either gcc or clang (Xcode 5.1) see below for the gory details, here is one solution to the problem:

If I explicitly set the MACOSX_DEPLOYMENT_TARGET env var to my OSX version (10.9), I avoid the problem. Given this solution, I am not sure if this is something that should go into the spack python package script, or if it could be resolved better in your compiler wrappers. In build_visit, we always set the osx deployment target to avoid issues with various libraries - it may be good practice also to do so in the spack compiler wrappers.

Here is the main symptom that occurs: python’s configure checks fail and report the size of all of the integer types :

checking for uid_t in sys/types.h… yes checking for uint32_t… yes checking for uint32_t… yes checking for uint64_t… yes checking for uint64_t… yes checking for int32_t… yes checking for int32_t… yes checking for int64_t… yes checking for int64_t… yes checking for ssize_t… yes checking size of int… 0 checking size of long… 0 checking size of void *… 0 checking size of short… 0 checking size of float… 0 checking size of double… 0 checking size of fpos_t… 0 checking size of size_t… configure: error: in /private/var/folders/wj/jjhjt_0d3kg1vmk56d5bq_38001kr8/T/spack-stage/spack-stage-r5wJGI/Python-2.7.8': configure: error: cannot compute sizeof (size_t) Seeconfig.log’ for more details ==> Error: command ‘./configure --prefix=/Users/harrison37/Work/uberenv/spack/opt/macosx_10.9_x86_64/gcc@4.2.1/python@2.7.8 --without-gcc --enable-shared’ returned error code 77

About this issue

  • Original URL
  • State: closed
  • Created 12 years ago
  • Comments: 24 (24 by maintainers)

Commits related to this issue

Most upvoted comments

Hah, I found this with a google search for the size_t error. I am building python 2.7.11 with gcc 6.1.0 on OSX10.11 in a rpmbuild based system (ugh). Passing MACOSX_DEPLOYMENT_TARGET=10.11 option to ./configure got me past the size_t error. I avoided the header errors in mactoolbox glue by disabling it with --disable-toolbox-glue. It’s not optimal but our software doesn’t use mactoolboxglue.

Of course spack built python 2.7.12 with gcc6.1.0 once I modified the package to add --disable-toolbox-glue.