Compilation error
sunwooOh opened this issue · comments
Hi nwojke,
I tried to compile the codes but when I run make
, I get this error:
mkdir -p /home/username/Projects/test/mcf-tracker/build/mcf
cd /home/username/Projects/test/mcf-tracker/build/mcf &&
make -f /home/username/Projects/test/mcf-tracker/external/mcf/Makefile-external pybind11
make[1]: Entering directory/home/username/Projects/test/mcf-tracker/build/mcf' make[1]: /home/username/Projects/test/mcf-tracker/external/mcf/Makefile-external: No such file or directory make[1]: *** No rule to make target
/home/username/Projects/test/mcf-tracker/external/mcf/Makefile-external'. Stop.
make[1]: Leaving directory `/home/username/Projects/test/mcf-tracker/build/mcf'
make: *** [mcf.so] Error 2
Assuming that above error was raised because of the lack of mcf
and pymotutils
, so I git-cloned them to build
directory.
And then, tried to compile mcf
.
However, running following commands (as given in the README of mcf git repository) gives another error.
Commands:
git clone https://github.com/nwojke/mcf.git
(to mcf/external/
directory)
mkdir mcf/build
cd mcf/build
and
make -f ../Makefile.external pybind11
cmake -DCMAKE_BUILD_TYPE=RELEASE -DMCF_BUILD_PYTHON=ON -DMCF_BUILD_STATIC=ON ..
Raised error:
CMake Error at build/external-install/share/cmake/pybind11/pybind11Tools.cmake:29 (message):
Unsupported compiler -- pybind11 requires C++11 support!
Call Stack (most recent call first):
build/external-install/share/cmake/pybind11/pybind11Config.cmake:107 (select_cxx_standard)
CMakeLists.txt:49 (find_package)
Can you help me with solving this problem?
My settings are:
- OS: Linux Ubuntu 14.04
- cmake: 3.2.2
- g++: 4.8.4 (I also tested on another machine with g++ version 4.9, but the problem wasn't resolved)
Thank you.
Hi,
looks like the README is outdated. Can you run
git init submodules recursive
on the repostiory root? This should clone the necessary submodules in external. This should fix the initial error.
If you still get the error when building pybind11, the compiler might be outdated. The library requires a C++11 compiler, I am not sure if G++ 4.9 has already -std=c++11 or if it is -std=c++0x. Do you have any chance to update to at least version 5?
I will update the README when I find more time again.