2014-01-06 158 views
0

我想在OSX小牛安裝GalSim,使用蟒蛇蟒蛇分佈,但繼續運行到錯誤的OSX上安裝GalSim,:與蟒蛇

Unable to build a python loadable module using the python executable: 
/usr/bin/env python, 
the library name libpython2.7.a, 
and the libdir /Users/harrison/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. 

在/ usr/bin中/ env的巨蟒anaconda one,並且在那個libdir中確實有一個libpython2.7.a。

scons通過conda包管理系統安裝。 升壓手動安裝爲通過

./bootstrap.sh --with-python=/Users/harrison/anaconda/bin/python --with-python-root=/Users/harrison/anaconda/ 
./b2 -a link=shared 
sudo ./b2 -a --prefix=/usr/local link=shared install 

檢查的蟒蛇提升鏈接到版本推薦給

$ otool -L /usr/local/lib/libboost_python.dylib 
    /usr/local/lib/libboost_python.dylib: 
    libboost_python.dylib (compatibility version 0.0.0, current version 0.0.0) 
    libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0) 
    /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0) 
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1) 

這是(它似乎正確不那麼我 - 提振作用似乎鏈接到/ usr/local /中的libpython2.7),這是什麼導致安裝GalSim的問題?

感謝

伊恩

全輸出:

$ scons 
scons: Reading SConscript files ... 
SCons is version 2.3.0 using python version 2.7.6 
Python is from /Users/harrison/anaconda/include/python2.7 
Using the following (non-default) scons options: 
    CXX = g++ 
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 = /Users/harrison/anaconda/lib/python2.7/site-packages 
Using compiler: /usr/bin/g++ 
compiler version: 4.2.1 
Determined that a good number of jobs = 4 
Checking for C++ header file fftw3.h... yes 
Checking for correct FFTW linkage... yes 
Checking for C++ header file boost/shared_ptr.hpp... yes 
Checking for C++ header file TMV.h... yes 
Using TMV_LINK file: /usr/local/share/tmv/tmv-link 
    -L/usr/local/Cellar/tmv-cpp/0.71/lib -ltmv -lblas 
Mac version is 10.9 
WARNING: The Apple BLAS library has been found not to be thread safe on 
     Mac OS version 10.7 (and possibly higher), even across multiple 
     processes (i.e. not just multiple threads in the same process). 
     The symptom is that `scons tests` will hang when running nosetests 
     using multiple processes. 
     If this occurs, the solution is to compile TMV either with a 
     different BLAS library (e.g. ATLAS) or with no BLAS library at 
     all (using WITH_BLAS=false). 
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 /Users/harrison/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 
+0

您可以檢查config.log的輸出並粘貼對應於失敗測試的信息嗎?我同意某些事情似乎與boost有關,但我不能說這是否對你所看到的GalSim錯誤負責,除非我在config.log中看到失敗的細節。謝謝, Rachel – rmandelb

+0

Rachel,謝謝你回來。 config.log是[here](https://www.dropbox.com/s/h4b68iz6znivbwg/config.log)...對不起,我寧願給你所有的東西,而不是錯誤的部分。伊恩 – itrharrison

回答

0

伊恩,感謝張貼的。基於config.log和我自己的經驗,我有一個答案,應該至少解決這個問題(不保證你以後不會在構建中碰到其他東西)。

這裏的關鍵問題是,如果你告訴它編譯器是gcc(默認情況下),它會嘗試使用openMP。但實際上在小牛隊中調用gcc會給你帶來鏗鏘聲,因爲openMP不起作用。所以,你必須明確地告訴galsim編譯器是clang ++,所以它不會嘗試使用openMP。 (線索到這是在config.log,也有有關未定義符號的各個地方消息x86_64架構......我有我自己的系統對這個問題的時候,我開始用小牛。另請參見https://github.com/GalSim-developers/GalSim/issues/493

所以,請不要scons CXX=clang++這個問題應該消失。不過,我不能保證你以後不會遇到提升問題。

0

另請參閱this question其中有兩個建議可以幫助您解決問題。