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

unable to build ORB_SLAM2 due to Pangolin #22

Closed
chaiein opened this issue Feb 15, 2016 · 10 comments
Closed

unable to build ORB_SLAM2 due to Pangolin #22

chaiein opened this issue Feb 15, 2016 · 10 comments

Comments

@chaiein
Copy link

chaiein commented Feb 15, 2016

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?

@chaiein chaiein changed the title Pangolin error unable to build ORB_SLAM2 due to Pangolin Feb 16, 2016
@tdnet12434
Copy link

try to edit CMakeList.txt

from
find_package(Pangolin REQUIRED)
to
find_package(Pangolin 0.2 REQUIRED)

@chaiein
Copy link
Author

chaiein commented Feb 28, 2016

I tried your suggestion but still the error is not cleared. Its showing the same error.

@amiltonwong
Copy link

Did u run command:
cmake -DCPP11_NO_BOOST=1 ..

And what is the output? Any error appears?

@chaiein
Copy link
Author

chaiein commented Mar 29, 2016

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

@chaiein
Copy link
Author

chaiein commented Mar 29, 2016

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);

@amiltonwong
Copy link

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

@ramtinkr
Copy link

ramtinkr commented Jun 3, 2016

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.
errorbuild1_orbslam2
errorbuild2_orbslam2
errorcompileexamples_monotum cc_orbslam2
ubuntu_gcc_version folder overview

@ywj447
Copy link

ywj447 commented Aug 26, 2016

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

@chaiein
Copy link
Author

chaiein commented Aug 26, 2016

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.

@chaiein
Copy link
Author

chaiein commented Jan 10, 2017

Edit the Pangolin openni.cpp files removed the code related to openni. This will also help in successful building of the Pangolin

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

5 participants