Building failed. Running ./RedistMaker
Trying to install OpenNI to use Xbox Kinect camera. But when I follow the guide at:
http://wiki.ros.org/openni_camera https://www.20papercups.net/programming/kinect-on-ubuntu-with-openni/
I get to step 2. Then get this error. Looking around for a while, but I cant seem to find anything that fixes it. Anyone got a clue?
This is only some of the console. I cant scroll any higher. Might be a better way of doing this, but I'm trying :)
This is the command I'm running:
toby@toby-ubuntu:~/OpenNI/Platform/Linux/CreateRedist$ sudo ./RedistMaker
Thanks in advanced.
/usr/include/c++/7/bits/basic_string.h:6145:5: note: template argument deduction/substitution failed:
In file included from ../../../../../Samples/NiViewer/glh/glh_obs.h:62:0,
from ../../../../../Samples/NiViewer/NiViewer.cpp:62:
../../../../../Samples/NiViewer/glh/glh_linear.h:77:47: note: ‘const std::error_code’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’
#define GLH_EPSILON GLH_REAL(10e-6)
^
In file included from /usr/include/c++/7/string:52:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from ../../../../../Samples/NiViewer/glh/glh_convenience.h:52,
from ../../../../../Samples/NiViewer/glh/glh_glut2.h:61,
from ../../../../../Samples/NiViewer/NiViewer.cpp:63:
/usr/include/c++/7/bits/basic_string.h:6157:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
operator>(const _CharT* __lhs,
^~~~~~~~
/usr/include/c++/7/bits/basic_string.h:6157:5: note: template argument deduction/substitution failed:
In file included from ../../../../../Samples/NiViewer/glh/glh_obs.h:62:0,
from ../../../../../Samples/NiViewer/NiViewer.cpp:62:
../../../../../Samples/NiViewer/glh/glh_linear.h:77:47: note: mismatched types ‘const _CharT*’ and ‘std::error_code’
#define GLH_EPSILON GLH_REAL(10e-6)
^
make[1]: *** [x64-Release/NiViewer.o] Error 1
make: *** [Samples/NiViewer] Error 2
make: *** Waiting for unfinished jobs....
../../../../../Samples/NiUserSelection/SceneDrawer.cpp: In member function ‘void SceneDrawer::DrawDepthMapTexture()’:
../../../../../Samples/NiUserSelection/SceneDrawer.cpp:154:73: warning: narrowing conversion of ‘g_nXRes’ from ‘XnUInt16 {aka short unsigned int}’ to ‘GLfloat {aka float}’ inside { } [-Wnarrowing]
GLfloat verts[8] = { g_nXRes, g_nYRes, g_nXRes, 0, 0, 0, 0, g_nYRes };
^
../../../../../Samples/NiUserSelection/SceneDrawer.cpp:154:73: warning: narrowing conversion of ‘g_nYRes’ from ‘XnUInt16 {aka short unsigned int}’ to ‘GLfloat {aka float}’ inside { } [-Wnarrowing]
../../../../../Samples/NiUserSelection/SceneDrawer.cpp:154:73: warning: narrowing conversion of ‘g_nXRes’ from ‘XnUInt16 {aka short unsigned int}’ to ‘GLfloat {aka float}’ inside { } [-Wnarrowing]
../../../../../Samples/NiUserSelection/SceneDrawer.cpp:154:73: warning: narrowing conversion of ‘g_nYRes’ from ‘XnUInt16 {aka short unsigned int}’ to ‘GLfloat {aka float}’ inside { } [-Wnarrowing]
failed to execute: make -j4 -C /home/toby/OpenNI/Platform/Linux/CreateRedist/../Build > /home/toby/OpenNI/Platform/Linux/CreateRedist/Output/BuildOpenNI.txt
Building Failed!
Asked by Tufte on 2019-05-31 17:00:15 UTC
Answers
you can find the solution here, by a guy named AlanNaoto.
Quoting his comment:
I resolved this issue by installing an older version of GCC on Ubuntu 18.04. https://askubuntu.com/questions/26498/how-to-choose-the-default-gcc-and-g-version I ended up with gcc-4.8, gcc-6 and gcc-7 in sudo update-alternatives --config gcc, chose 4.8 and rebuilt successfully.
Thanks a lot! That worked for me (Also Ubuntu 18.04 here). I issued the following commands:
sudo apt-get install gcc-4.8 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 40 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 30
Then I choose gcc 4.8 with:
sudo update-alternatives --config gcc
Repeated the same steps for g++
sudo apt-get install g++-4.8 sudo update-alternatives --config g++ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 40 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 30
And then choosing g++ 4.8 with:
sudo update-alternatives --config g++
(commands adapted from here: http://ubuntuguide.net/how-to-install-and-setup-gcc-4-1g4-1-in-ubuntu-10-0410-10)
Had some issues installing SensorKinect later, so had to download/compile from another branch: https://stackoverflow.com/a/28323843
Asked by youssef desouky on 2021-10-11 23:11:27 UTC
Comments
The problem you're encountering seems to be one in OpenNI proper. Not in any ROS integration (yet).
The issue tracker of
OpenNI
also seems to have quite a few similar issues reported.I would suggest to try and get support there, as we're not OpenNI experts here.
Asked by gvdhoorn on 2019-06-01 03:38:43 UTC
I see, I'll try that. Thx
Asked by Tufte on 2019-06-10 19:51:28 UTC