make[2]: ** No rule to make target ../Pangolin/build/src/libpangolin.so', needed by../lib/libORB_SLAM2.so'. Stop.
make[1]: ** [CMakeFiles/ORB_SLAM2.dir/all] Error 2
make: *** [all] Error 2
is any way to resolve the above error?
try to edit CMakeList.txt
from
find_package(Pangolin REQUIRED)
to
find_package(Pangolin 0.2 REQUIRED)
I tried your suggestion but still the error is not cleared. Its showing the same error.
Did u run command:
cmake -DCPP11_NO_BOOST=1 ..
And what is the output? Any error appears?
Thank you for the solution. I used ./build.sh
Then cmake -DCPP11_NO_BOOST=1 .. its successfully built
but later on make there is following error
ubuntu:~/ORB_SLAM2$ make
[ 4%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/System.cc.o
[ 8%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Tracking.cc.o
[ 13%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/LocalMapping.cc.o
[ 17%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/LoopClosing.cc.o
[ 21%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/ORBextractor.cc.o
[ 26%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/ORBmatcher.cc.o
[ 30%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/FrameDrawer.cc.o
[ 34%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Converter.cc.o
[ 39%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/MapPoint.cc.o
[ 43%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/KeyFrame.cc.o
[ 47%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Map.cc.o
[ 52%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/MapDrawer.cc.o
[ 56%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Optimizer.cc.o
[ 60%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/PnPsolver.cc.o
[ 65%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Frame.cc.o
[ 69%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/KeyFrameDatabase.cc.o
[ 73%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Sim3Solver.cc.o
[ 78%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Initializer.cc.o
[ 82%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Viewer.cc.o
make[2]: ** No rule to make target Pangolin/build/src/libpangolin.so', needed bylib/libORB_SLAM2.so'. Stop.
make[1]: ** [CMakeFiles/ORB_SLAM2.dir/all] Error 2
make: *** [all] Error 2
When used the same command under Pangolin package ..
I get the following error
Building CXX object src/CMakeFiles/pangolin.dir/video/drivers/ffmpeg.cpp.o
In file included from /usr/include/ni/XnStatus.h:24:0,
from /usr/include/ni/XnTypes.h:27,
from /usr/include/ni/XnOpenNI.h:27,
from /usr/include/ni/XnCppWrapper.h:27,
from /home/chaiein/softwares/Pangolin/include/pangolin/video/drivers/openni.h:20,
from /home/chaiein/softwares/Pangolin/src/video/video.cpp:44:
/usr/include/ni/XnPlatform.h:73:3: error: #error OpenNI Platform Abstraction Layer - Unsupported Platform!
#error OpenNI Platform Abstraction Layer - Unsupported Platform!
^
In file included from /usr/include/ni/XnTypes.h:28:0,
from /usr/include/ni/XnOpenNI.h:27,
from /usr/include/ni/XnCppWrapper.h:27,
from /home/chaiein/softwares/Pangolin/include/pangolin/video/drivers/openni.h:20,
from /home/chaiein/softwares/Pangolin/src/video/video.cpp:44:
/usr/include/ni/XnOS.h:51:3: error: #error OpenNI OS Abstraction Layer - Unsupported Platform!
#error OpenNI OS Abstraction Layer - Unsupported Platform!
^
In file included from /home/chaiein/softwares/Pangolin/include/pangolin/video/drivers/openni.h:20:0,
from /home/chaiein/softwares/Pangolin/src/video/video.cpp:44:
/usr/include/ni/XnCppWrapper.h:10045:76: error: macro "XN_VALIDATE_NEW" passed 4 arguments, but takes just 2
XN_VALIDATE_NEW(pTrans, StateChangedCallbackTranslator, handler, pCookie);
^
/usr/include/ni/XnCppWrapper.h:10104:75: error: macro "XN_VALIDATE_NEW" passed 4 arguments, but takes just 2
XN_VALIDATE_NEW(pTrans, StateChangedCallbackTranslator, handler, pCookie);
^
In file included from /usr/include/ni/XnStatus.h:24:0,
from /usr/include/ni/XnTypes.h:27,
from /usr/include/ni/XnOpenNI.h:27,
from /usr/include/ni/XnCppWrapper.h:27,
from /home/chaiein/softwares/Pangolin/include/pangolin/video/drivers/openni.h:20,
from /home/chaiein/softwares/Pangolin/src/video/drivers/openni.cpp:28:
/usr/include/ni/XnPlatform.h:73:3: error: #error OpenNI Platform Abstraction Layer - Unsupported Platform!
#error OpenNI Platform Abstraction Layer - Unsupported Platform!
^
In file included from /usr/include/ni/XnTypes.h:28:0,
from /usr/include/ni/XnOpenNI.h:27,
from /usr/include/ni/XnCppWrapper.h:27,
from /home/chaiein/softwares/Pangolin/include/pangolin/video/drivers/openni.h:20,
from /home/chaiein/softwares/Pangolin/src/video/drivers/openni.cpp:28:
/usr/include/ni/XnOS.h:51:3: error: #error OpenNI OS Abstraction Layer - Unsupported Platform!
#error OpenNI OS Abstraction Layer - Unsupported Platform!
^
In file included from /home/chaiein/softwares/Pangolin/include/pangolin/video/drivers/openni.h:20:0,
from /home/chaiein/softwares/Pangolin/src/video/drivers/openni.cpp:28:
/usr/include/ni/XnCppWrapper.h:10045:76: error: macro "XN_VALIDATE_NEW" passed 4 arguments, but takes just 2
XN_VALIDATE_NEW(pTrans, StateChangedCallbackTranslator, handler, pCookie);
^
/usr/include/ni/XnCppWrapper.h:10104:75: error: macro "XN_VALIDATE_NEW" passed 4 arguments, but takes just 2
XN_VALIDATE_NEW(pTrans, StateChangedCallbackTranslator, handler, pCookie);
It seems you still couldn't compile Pangolin successfully.
I had tried the following commands with no failure.
git clone https://github.com/stevenlovegrove/Pangolin.git
cd Pangolin
mkdir build
cd build
cmake -DCPP11_NO_BOOST=1 ..
make -j
Hello everyone,
I have somehow the same problem. I'd like to run ORB-SLAM2 on Linux OS (Ubuntu 16.06 Xenial) with CPU intel Corei7 , 2.2 GHZ and I have tried to install the prerequisities, which were written in the README.md file on github.com. But the problem is I have faced several errors during building ORB_SLAM2 and compiling ORB_SLAM2 Examples for mono_tum.cc and mono_kitti.cc. It would be so kind if you can help me in this way because the type of error is somehow the same as above but I have built Pangolin successfully.




Hi everyone! I met the same problem as @chaiein . Did you clone the Pangolin into your system for many times and i did, so I reserve only one piece and delete rest of them. Then, compile it like following:
git clone https://github.com/stevenlovegrove/Pangolin.git
cd Pangolin
mkdir build
cd build
cmake -DCPP11_NO_BOOST=1 ..
make -j1
Then,
cd ORB_SLAM2
chmod +x build.sh
./build.sh
wish it could be helpful
I solved this problem after I got virtual and operating system reinstalled. I again used the ORB_SLAM2 freshely it worked with out any problem.
Edit the Pangolin openni.cpp files removed the code related to openni. This will also help in successful building of the Pangolin
Most helpful comment
Hi everyone! I met the same problem as @chaiein . Did you clone the Pangolin into your system for many times and i did, so I reserve only one piece and delete rest of them. Then, compile it like following:
git clone https://github.com/stevenlovegrove/Pangolin.git
cd Pangolin
mkdir build
cd build
cmake -DCPP11_NO_BOOST=1 ..
make -j1
Then,
cd ORB_SLAM2
chmod +x build.sh
./build.sh
wish it could be helpful