Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake failure #71

Open
nbecker opened this issue Dec 1, 2016 · 2 comments
Open

cmake failure #71

nbecker opened this issue Dec 1, 2016 · 2 comments

Comments

@nbecker
Copy link
Contributor

nbecker commented Dec 1, 2016

I normally us scons, now trying cmake. I'm not familiar with cmake.

Usually use:
python3 ~/scons/bootstrap.py --config=force --debug=stacktrace --with-boost-include=$(pwd)/../include --with-boost-lib=$(pwd)/../lib --with-eigen-include=/usr/include/eigen3 --prefix=$(pwd)/../.local install CCFLAGS='-g -O3 -march=native' --boost-python-lib=boost_python3

Now to convert to cmake, I have
At least these 2 problems:

  1. wrong python include! (2.7, should be 3.5)
  2. wrong eigen include path

I started with:
cmake -DNDARRAY_SWIG=OFF -DPYTHON_EXECUTABLE=/usr/bin/python3 ..
-- Boost version: 1.60.0
-- Found the following Boost libraries:
-- unit_test_framework
-- Configuring done
-- Generating done
-- Build files have been written to: /home/nbecker/ndarray.new.test/build

[nbecker@nbecker2 build]$ make VERBOSE=1
/usr/bin/cmake -H/home/nbecker/ndarray.new.test -B/home/nbecker/ndarray.new.test/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/nbecker/ndarray.new.test/build/CMakeFiles /home/nbecker/ndarray.new.test/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/nbecker/ndarray.new.test/build'
make -f include/CMakeFiles/preprocess_includes.dir/build.make include/CMakeFiles/preprocess_includes.dir/depend
make[2]: Entering directory '/home/nbecker/ndarray.new.test/build'
cd /home/nbecker/ndarray.new.test/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/nbecker/ndarray.new.test /home/nbecker/ndarray.new.test/include /home/nbecker/ndarray.new.test/build /home/nbecker/ndarray.new.test/build/include /home/nbecker/ndarray.new.test/build/include/CMakeFiles/preprocess_includes.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/nbecker/ndarray.new.test/build'
make -f include/CMakeFiles/preprocess_includes.dir/build.make include/CMakeFiles/preprocess_includes.dir/build
make[2]: Entering directory '/home/nbecker/ndarray.new.test/build'
make[2]: Nothing to be done for 'include/CMakeFiles/preprocess_includes.dir/build'.
make[2]: Leaving directory '/home/nbecker/ndarray.new.test/build'
[ 38%] Built target preprocess_includes
make -f tests/CMakeFiles/ndarray-eigen.dir/build.make tests/CMakeFiles/ndarray-eigen.dir/depend
make[2]: Entering directory '/home/nbecker/ndarray.new.test/build'
cd /home/nbecker/ndarray.new.test/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/nbecker/ndarray.new.test /home/nbecker/ndarray.new.test/tests /home/nbecker/ndarray.new.test/build /home/nbecker/ndarray.new.test/build/tests /home/nbecker/ndarray.new.test/build/tests/CMakeFiles/ndarray-eigen.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/nbecker/ndarray.new.test/build'
make -f tests/CMakeFiles/ndarray-eigen.dir/build.make tests/CMakeFiles/ndarray-eigen.dir/build
make[2]: Entering directory '/home/nbecker/ndarray.new.test/build'
[ 46%] Building CXX object tests/CMakeFiles/ndarray-eigen.dir/ndarray-eigen.cc.o
cd /home/nbecker/ndarray.new.test/build/tests && /usr/lib64/ccache/c++ -I/home/nbecker/ndarray.new.test/include -I/usr/include/python2.7 -I/home/nbecker/.local/lib/python3.5/site-packages/numpy/core/include -I/usr/include/eigen3/include -std=c++11 -o CMakeFiles/ndarray-eigen.dir/ndarray-eigen.cc.o -c /home/nbecker/ndarray.new.test/tests/ndarray-eigen.cc
In file included from /home/nbecker/ndarray.new.test/tests/ndarray-eigen.cc:11:0:
/home/nbecker/ndarray.new.test/include/ndarray/eigen.h:26:22: fatal error: Eigen/Core: No such file or directory
#include "Eigen/Core"
^
compilation terminated.
tests/CMakeFiles/ndarray-eigen.dir/build.make:62: recipe for target 'tests/CMakeFiles/ndarray-eigen.dir/ndarray-eigen.cc.o' failed
make[2]: *** [tests/CMakeFiles/ndarray-eigen.dir/ndarray-eigen.cc.o] Error 1
make[2]: Leaving directory '/home/nbecker/ndarray.new.test/build'
CMakeFiles/Makefile2:146: recipe for target 'tests/CMakeFiles/ndarray-eigen.dir/all' failed
make[1]: *** [tests/CMakeFiles/ndarray-eigen.dir/all] Error 2
make[1]: Leaving directory '/home/nbecker/ndarray.new.test/build'
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
[nbecker@nbecker2 build]$

@hiostreas
Copy link

hiostreas commented Jan 17, 2017

Can you give info about your OS? and the Version of python that you try to build?

@nbecker
Copy link
Contributor Author

nbecker commented Jan 17, 2017

This is fedora 25 linux (x86_64)

I just tried again and got a different result

cmake -DNDARRAY_SWIG=OFF -DPYTHON_EXECUTABLE=/usr/bin/python3 ..
-- The C compiler identification is GNU 6.3.1
-- The CXX compiler identification is GNU 6.3.1
-- Check for working C compiler: /usr/lib64/ccache/cc
-- Check for working C compiler: /usr/lib64/ccache/cc -- 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/lib64/ccache/c++
-- Check for working CXX compiler: /usr/lib64/ccache/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /usr/bin/python3 (found version "3.5.2") 
-- Found PythonLibs: /usr/lib64/libpython3.5m.so (found version "3.5.2") 
-- Found NumPy: version "1.12.0" /home/nbecker/.local/lib/python3.5/site-packages/numpy/core/include
-- Boost version: 1.60.0
-- Found the following Boost libraries:
--   unit_test_framework
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Found FFTW: /usr/include  
-- Trying to find eigen in 
-- Found Eigen3: /usr/include/eigen3 (Required is at least version "2.91.0") 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/nbecker/ndarray.new.cmake/build

Now build succeeds.
But it looks like only the headers are installed, the library
libboost_numpy.so
is not installed (and I don't think it got built either)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants