未在OS X上安装Casacore

2024-03-28 20:37:55 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试在OS X上安装casacore,使用:

brew install casacore

然而,我得到了一个CMake错误,我没有找到任何解决方案搜索网上。我的输出:

==> Installing casacore from ska-sa/tap
==> Downloading https://github.com/casacore/casacore/archive/v3.1.1.tar.gz
Already downloaded: /Users/Thomas/Library/Caches/Homebrew/downloads/3b570ca11953847e1fc2a5b18bc8e9593f9ee563b6aa9a505cb07298fc46514b--casacore-3.1.1.tar.gz
==> Patching
patching file python/CMakeLists-cmake3.12.txt
patching file python3/CMakeLists-cmake3.12.txt
patching file python/Converters/test/CMakeLists.txt
==> cmake ../.. -DCMAKE_C_FLAGS_RELEASE=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE=
Last 15 lines from /Users/Thomas/Library/Logs/Homebrew/casacore/01.cmake:
-- Looking for python2 specific environment...
CMake Error at /usr/local/Cellar/cmake/3.16.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find Python2 (missing: Python2_NumPy_INCLUDE_DIRS NumPy) (found
  version "2.7.16")
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.16.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/Cellar/cmake/3.16.1/share/cmake/Modules/FindPython/Support.cmake:2211 (find_package_handle_standard_args)
  /usr/local/Cellar/cmake/3.16.1/share/cmake/Modules/FindPython2.cmake:259 (include)
  python/CMakeLists-cmake3.12.txt:3 (find_package)
  python/CMakeLists.txt:4 (include)


-- Configuring incomplete, errors occurred!
See also "/tmp/casacore-20191219-61311-1gqp8fc/casacore-3.1.1/build/release/CMakeFiles/CMakeOutput.log".
See also "/tmp/casacore-20191219-61311-1gqp8fc/casacore-3.1.1/build/release/CMakeFiles/CMakeError.log".

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/ska-sa/homebrew-tap/issues

提前谢谢!你知道吗

编辑:在为Python2安装numpy之后,我仍然得到一个错误,尽管不同。错误日志为:

2019-12-19 23:47:07 +0100

cmake
../..
-DCMAKE_C_FLAGS_RELEASE=-DNDEBUG
-DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG
-DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/casacore/3.1.1
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_FIND_FRAMEWORK=LAST
-DCMAKE_VERBOSE_MAKEFILE=ON
-Wno-dev
-DCMAKE_BUILD_TYPE=release
-DCMAKE_SHARED_LINKER_FLAGS='-undefined dynamic_lookup'
-DCMAKE_MODULE_LINKER_FLAGS='-undefined dynamic_lookup'
-DBUILD_PYTHON=ON
-DUSE_FFTW3=ON
-DFFTW3_ROOT_DIR=/usr/local
-DUSE_HDF5=ON
-DHDF5_ROOT_DIR=/usr/local
-DUSE_THREADS=ON
-DDATA_DIR=/usr/local/share/casacore/data

-- The C compiler identification is AppleClang 10.0.1.10010046
-- The CXX compiler identification is AppleClang 10.0.1.10010046
-- Check for working C compiler: /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang
-- Check for working C compiler: /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang++
-- Check for working CXX compiler: /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The Fortran compiler identification is GNU 9.2.0
-- Checking whether Fortran compiler has -isysroot
-- Checking whether Fortran compiler has -isysroot - yes
-- Checking whether Fortran compiler supports OSX deployment target flag
-- Checking whether Fortran compiler supports OSX deployment target flag - yes
-- Check for working Fortran compiler: /usr/local/bin/gfortran
-- Check for working Fortran compiler: /usr/local/bin/gfortran  -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/local/bin/gfortran supports Fortran 90
-- Checking whether /usr/local/bin/gfortran supports Fortran 90 -- yes
-- Performing Test HAVE_O_DIRECT
-- Performing Test HAVE_O_DIRECT - Failed
-- Using namespace casacore.
-- Performing Test HAS_CXX11
-- Performing Test HAS_CXX11 - Success
-- Looking for pread
-- Looking for pread - found
-- Looking for pwrite
-- Looking for pwrite - found
-- Found Readline: /usr/local/opt/readline/lib/libreadline.dylib  
-- Could NOT find SOFA (missing: SOFA_LIBRARY) 
-- Found HDF5: debug;/usr/local/lib/libhdf5_hl.dylib;/usr/local/lib/libhdf5.dylib;/usr/local/lib/libsz.dylib;/usr/lib/libz.dylib;/usr/lib/libdl.dylib;/usr/lib/libm.dylib;optimized;/usr/local/lib/libhdf5_hl.dylib;/usr/local/lib/libhdf5.dylib;/usr/local/lib/libsz.dylib;/usr/lib/libz.dylib;/usr/lib/libdl.dylib;/usr/lib/libm.dylib  
-- Found FLEX: /usr/bin/flex  
-- Found BISON: /usr/bin/bison  
-- Looking for Fortran sgemm
-- Looking for Fortran sgemm - not found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Looking for Fortran sgemm
-- Looking for Fortran sgemm - found
-- Found BLAS: /usr/local/opt/openblas/lib/libopenblas.dylib  
-- Looking for Fortran cheev
-- Looking for Fortran cheev - found
-- A library with LAPACK API found.
-- Found FFTW3: /usr/local/lib/libfftw3f_threads.dylib  
-- Found CFITSIO: /usr/local/lib/libcfitsio.dylib (found suitable version "3.450", minimum required is "3.030") 
-- Found WCSLIB: /usr/local/lib/libwcs.dylib (found suitable version "6.4", minimum required is "4.7") 
-- Found Pthreads: /usr/lib/libpthread.dylib  
-- Looking for python2 specific environment...
-- Found Python2: /usr/local/bin/python2.7 (found version "2.7.16") found components: Interpreter Development NumPy 
-- Found Boost: /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0")  
CMake Error at /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package):
  Found package configuration file:

    /usr/local/lib/cmake/boost_python-1.71.0/boost_python-config.cmake

  but it set boost_python_FOUND to FALSE so package "boost_python" is
  considered to be NOT FOUND.  Reason given by package:

  No suitable build variant has been found.

  The following variants have been tried and rejected:

  * libboost_python37-mt.dylib (3.7, Boost_PYTHON_VERSION=2.7)

  * libboost_python37-mt.a (3.7, Boost_PYTHON_VERSION=2.7)

  * libboost_python37.dylib (3.7, Boost_PYTHON_VERSION=2.7)

  * libboost_python37.a (3.7, Boost_PYTHON_VERSION=2.7)

Call Stack (most recent call first):
  /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:182 (boost_find_component)
  /usr/local/Cellar/cmake/3.16.1/share/cmake/Modules/FindBoost.cmake:443 (find_package)
  python/CMakeLists-cmake3.12.txt:17 (find_package)
  python/CMakeLists.txt:4 (include)


-- Configuring incomplete, errors occurred!
See also "/tmp/casacore-20191219-71796-1ju2jnd/casacore-3.1.1/build/release/CMakeFiles/CMakeOutput.log".
See also "/tmp/casacore-20191219-71796-1ju2jnd/casacore-3.1.1/build/release/CMakeFiles/CMakeError.log".

HOMEBREW_VERSION: 2.2.1
ORIGIN: https://github.com/Homebrew/brew
HEAD: 2fe99bd9823fadea1cf918b1ed8366de7f40d336
Last commit: 11 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: ab4cd9e6434b89a0a8d73a2a22279c39be808908
Core tap last commit: 15 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CACHE: /Users/Thomas/Library/Caches/Homebrew
HOMEBREW_LOGS: /Users/Thomas/Library/Logs/Homebrew
CPU: quad-core 64-bit kabylake
Homebrew Ruby: 2.6.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3/bin/ruby
Clang: 10.0 build 1001
Git: 2.20.1 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: 13
macOS: 10.14.6-x86_64
CLT: 10.3.0.0.1.1562985497
Xcode: 11.0
CLT headers: 10.3.0.0.1.1562985497
XQuartz: 2.7.11 => /opt/X11

HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
MAKEFLAGS: -j4
CMAKE_PREFIX_PATH: /usr/local/opt/openssl@1.1:/usr/local/opt/readline:/usr/local/opt/icu4c:/usr/local/opt/openblas:/usr/local/opt/sqlite:/usr/local
CMAKE_INCLUDE_PATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/libxml2:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
CMAKE_FRAMEWORK_PATH: /usr/local/opt/python/Frameworks
PKG_CONFIG_PATH: /usr/local/opt/cfitsio/lib/pkgconfig:/usr/local/opt/wcslib/lib/pkgconfig:/usr/local/opt/isl/lib/pkgconfig:/usr/local/opt/mpfr/lib/pkgconfig:/usr/local/opt/hwloc/lib/pkgconfig:/usr/local/opt/openssl@1.1/lib/pkgconfig:/usr/local/opt/libevent/lib/pkgconfig:/usr/local/opt/open-mpi/lib/pkgconfig:/usr/local/opt/fftw/lib/pkgconfig:/usr/local/opt/readline/lib/pkgconfig:/usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/openblas/lib/pkgconfig:/usr/local/opt/sqlite/lib/pkgconfig:/usr/local/opt/xz/lib/pkgconfig:/usr/local/opt/python/lib/pkgconfig
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.14
HOMEBREW_GIT: git
HOMEBREW_SDKROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk
ACLOCAL_PATH: /usr/local/share/aclocal
PATH: /usr/local/Homebrew/Library/Homebrew/shims/mac/super:/usr/local/opt/cmake/bin:/usr/local/opt/wcslib/bin:/usr/local/opt/gcc/bin:/usr/local/opt/hwloc/bin:/usr/local/opt/openssl@1.1/bin:/usr/local/opt/libevent/bin:/usr/local/opt/open-mpi/bin:/usr/local/opt/fftw/bin:/usr/local/opt/hdf5/bin:/usr/local/opt/icu4c/bin:/usr/local/opt/gdbm/bin:/usr/local/opt/sqlite/bin:/usr/local/opt/xz/bin:/usr/local/opt/python/bin:/usr/local/opt/numpy/bin:/usr/bin:/bin:/usr/sbin:/sbin

我已经安装了casacore页面中建议的所有软件包(甚至是可选的),我只是在运行简单的自制命令。你知道吗

编辑2: 从源代码构建,在make命令之前我没有任何错误。似乎cstdio文件有问题:

In file included from /Users/Thomas/casacore/casa/stdio.h:33:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdio:108:9: error: 
      no member named 'FILE' in the global namespace
using ::FILE;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdio:109:9: error: 
      no member named 'fpos_t' in the global namespace
using ::fpos_t;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdio:112:9: error: 
      no member named 'fclose' in the global namespace
using ::fclose;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdio:113:9: error: 
      no member named 'fflush' in the global namespace
using ::fflush;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdio:114:9: error: 
      no member named 'setbuf' in the global namespace
using ::setbuf;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdio:115:9: error: 
      no member named 'setvbuf' in the global namespace
using ::setvbuf;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdio:116:9: error: 
      no member named 'fprintf' in the global namespace
using ::fprintf;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdio:117:9: error: 
      no member named 'fscanf' in the global namespace
using ::fscanf;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdio:118:9: error: 
      no member named 'snprintf' in the global namespace
using ::snprintf;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdio:119:9: error: 
      no member named 'sprintf' in the global namespace
using ::sprintf;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdio:120:9: error: 
      no member named 'sscanf' in the global namespace
using ::sscanf;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdio:121:9: error: 
      no member named 'vfprintf' in the global namespace
using ::vfprintf;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdio:122:9: error: 
      no member named 'vfscanf' in the global namespace
using ::vfscanf;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdio:123:9: error: 
      no member named 'vsscanf' in the global namespace
using ::vsscanf;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdio:124:9: error: 
      no member named 'vsnprintf' in the global namespace
using ::vsnprintf;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdio:125:9: error: 
      no member named 'vsprintf' in the global namespace
using ::vsprintf;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdio:126:9: error: 
      no member named 'fgetc' in the global namespace
using ::fgetc;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdio:127:9: error: 
      no member named 'fgets' in the global namespace
using ::fgets;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdio:128:9: error: 
      no member named 'fputc' in the global namespace
using ::fputc;
      ~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [casa/CMakeFiles/casa_casa.dir/Arrays/ArrayBase.cc.o] Error 1
make[1]: *** [casa/CMakeFiles/casa_casa.dir/all] Error 2
make: *** [all] Error 2

Tags: cmakedeveloperforbinincludelibusrlocal