CMake error in setup.py
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 899
- PR merge metrics
- No merged PRs in 30d
Description
setup.py gives me a "NumPy import failure" despite I have numpy installed and successfully imported in python 2.7.
The full error log is attached as following
Configuring...
-- A library with BLAS API found.
-- A library with LAPACK API found.
-- A library with BLAS API found.
-- Found AMD library: /usr/lib/aarch64-linux-gnu/libamd.so
-- Found AMD header in: /usr/include/suitesparse
-- Found CAMD library: /usr/lib/aarch64-linux-gnu/libcamd.so
-- Found CAMD header in: /usr/include/suitesparse
-- Found COLAMD library: /usr/lib/aarch64-linux-gnu/libcolamd.so
-- Found COLAMD header in: /usr/include/suitesparse
-- Found CCOLAMD library: /usr/lib/aarch64-linux-gnu/libccolamd.so
-- Found CCOLAMD header in: /usr/include/suitesparse
-- Found CHOLMOD library: /usr/lib/aarch64-linux-gnu/libcholmod.so
-- Found CHOLMOD header in: /usr/include/suitesparse
-- Found CXSPARSE library: /usr/lib/aarch64-linux-gnu/libcxsparse.so
-- Found SuiteSparseQR library: /usr/lib/aarch64-linux-gnu/libspqr.so
-- Found SuiteSparseQR header in: /usr/include/suitesparse
-- Found Intel Thread Building Blocks (TBB) library: /usr/lib/aarch64-linux-gnu/libtbb.so, assuming SuiteSparseQR was compiled with TBB.
-- Found Intel Thread Building Blocks (TBB) Malloc library: /usr/lib/aarch64-linux-gnu/libtbbmalloc.so
-- Found SuiteSparse_config library: /usr/lib/aarch64-linux-gnu/libsuitesparseconfig.so
-- Found SuiteSparse_config header in: /usr/include/suitesparse
-- Adding librt: /usr/lib/aarch64-linux-gnu/librt.so to SuiteSparse_config libraries (required on Linux & Unix [not OSX] if SuiteSparse is compiled with timing).
-- Did not find METIS library (optional SuiteSparse dependency)
-- No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available.
-- Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake.
-- Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components.
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- python
Not using boost/python/numpy.
CMake Error at cmake/FindNumPy.cmake:62 (message):
NumPy import failure:Call Stack (most recent call first):
CMakeLists.txt:66 (find_package)-- Configuring incomplete, errors occurred!
See also "/home/dongzisu/source/OpenSfM/cmake_build/CMakeFiles/CMakeOutput.log".
Compiling extension...
-- A library with BLAS API found.
-- A library with LAPACK API found.
-- A library with BLAS API found.
-- Found AMD library: /usr/lib/aarch64-linux-gnu/libamd.so
-- Found AMD header in: /usr/include/suitesparse
-- Found CAMD library: /usr/lib/aarch64-linux-gnu/libcamd.so
-- Found CAMD header in: /usr/include/suitesparse
-- Found COLAMD library: /usr/lib/aarch64-linux-gnu/libcolamd.so
-- Found COLAMD header in: /usr/include/suitesparse
-- Found CCOLAMD library: /usr/lib/aarch64-linux-gnu/libccolamd.so
-- Found CCOLAMD header in: /usr/include/suitesparse
-- Found CHOLMOD library: /usr/lib/aarch64-linux-gnu/libcholmod.so
-- Found CHOLMOD header in: /usr/include/suitesparse
-- Found CXSPARSE library: /usr/lib/aarch64-linux-gnu/libcxsparse.so
-- Found SuiteSparseQR library: /usr/lib/aarch64-linux-gnu/libspqr.so
-- Found SuiteSparseQR header in: /usr/include/suitesparse
-- Found Intel Thread Building Blocks (TBB) library: /usr/lib/aarch64-linux-gnu/libtbb.so, assuming SuiteSparseQR was compiled with TBB.
-- Found Intel Thread Building Blocks (TBB) Malloc library: /usr/lib/aarch64-linux-gnu/libtbbmalloc.so
-- Found SuiteSparse_config library: /usr/lib/aarch64-linux-gnu/libsuitesparseconfig.so
-- Found SuiteSparse_config header in: /usr/include/suitesparse
-- Adding librt: /usr/lib/aarch64-linux-gnu/librt.so to SuiteSparse_config libraries (required on Linux & Unix [not OSX] if SuiteSparse is compiled with timing).
-- Did not find METIS library (optional SuiteSparse dependency)
-- No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available.
-- Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake.
-- Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components.
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- python
Not using boost/python/numpy.
CMake Error at cmake/FindNumPy.cmake:62 (message):
NumPy import failure:Call Stack (most recent call first):
CMakeLists.txt:66 (find_package)-- Configuring incomplete, errors occurred!
See also "/home/dongzisu/source/OpenSfM/cmake_build/CMakeFiles/CMakeOutput.log".
Makefile:1518: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Building package
running build
running build_py
running build_scripts
Could anyone give me hint on that?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with setup.py and inspect cmake/FindNumPy.cmake at line 62, which is called from CMakeLists.txt line 66. Reproduce the configuration under the reported Python 2.7 environment and compare the NumPy import context used by CMake. Done means setup.py configures and builds without the NumPy import failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100