I have been attempting to install GalSim on OSX 10.9 Mavericks with Anaconda installed and set as the default python, but have been running into the following error:
Unable to build a python loadable module using the python executable:
/usr/bin/env python,
the library name libpython2.7.a,
and the libdir //anaconda/lib/python2.7/config.
If these are not the correct library names, you can tell scons the
correct names to use with the flags EXTRA_LIB_PATH and/or EXTRA_LIBS.
When checking my config.log files, there are a few instances of Undefined symbols for architecture x86_64:
, even though I made sure that the compiler being used was clang++
, as recommended in the GalSim FAQ.
There are also numerous instances of the following:
/usr/bin/env python < .sconf_temp/conftest_73 > .sconf_temp/conftest_73.out
Fatal Python error: PyThreadState_Get: no current thread
sh: line 1: 17019 Abort trap: 6 /usr/bin/env python < ".sconf_temp/conftest_73" > ".sconf_temp/conftest_73.out"
I'm not sure what to do to remedy the situation. I've reinstalled Boost several times, using the ./b2 -a
command for each time after the first. I've made sure that boost is referencing /anaconda/bin/python
, and confirmed it by checking the project-config.jam files for each installation. I've used the commands
./bootstrap.sh
./b2 -a toolset=clang cxxflags="-stdlib=libc++" linkflags="-stdlib=libc++" install
as recommended in the GalSim FAQ. I am really not sure what else to try besides attempting to reinstall all the requisite packages all over again. Does anyone have any advice on what to do before I go to my last resort? Any help is appreciated.
Below is the output from my last scons run:
scons: Reading SConscript files ...
SCons is version 2.3.1 using python version 2.7.6
Python is from //anaconda/include/python2.7
Using the following (non-default) scons options:
CXX = clang++
These can be edited directly in the file gs_scons.conf.
Type scons -h for a full list of available options.
Using python = /usr/bin/env python
Using default PYPREFIX = //anaconda/lib/python2.7/site-packages
Using compiler: /usr/bin/clang++
compiler version: 5.1
Determined that a good number of jobs = 2
Checking for C++ header file fftw3.h... yes
Checking for correct FFTW linkage... yes
Checking for boost header files... yes
Checking for C++ header file TMV.h... yes
Using TMV_LINK file: /usr/local/share/tmv/tmv-link
-ltmv -lblas
Mac version is 10.9.3
XCode version is 5.1.1
Checking for correct TMV linkage... (this may take a little while)
Checking for correct TMV linkage... yes
Checking if we can build against Python...
Unable to build a python loadable module using the python executable:
/usr/bin/env python,
the library name libpython2.7.a,
and the libdir //anaconda/lib/python2.7/config.
If these are not the correct library names, you can tell scons the
correct names to use with the flags EXTRA_LIB_PATH and/or EXTRA_LIBS.
Please fix the above error(s) and rerun scons.
Note: you may want to look through the file INSTALL.md for advice.
Also, if you are having trouble, please check the INSTALL FAQ at
https://github.com/GalSim-developers/GalSim/wiki/Installation%20FAQ
Michael - I think your problem may be related to this issue: Boost.Python python linkage error
In short, it seems that boost will sometimes claim to be linking against anaconda python, but it will really link against a system python despite it all.
That page has a solution as well. It seems a bit kludgy, so you may want to see if someone else has an idea. But if not, then you could try that?