OpenNI compilation error, Diamondback, version mobile, ARM
Hi,
I'm trying to build the openNI
stack on BeagleBoard-xM (ARM). I have Ubuntu 10.04 and installed Diamondback variant mobile before, roscore
runs fine. As I wanted to add Kinect support I proceeded as described here, with the only difference, I cloned the git
source into my ros folder instead of using rosinstall
(and updated ROS_PACKAGE_PATH accordingly, the same worked fine for me yesterday on my desktop PC, x386). But when I run rosmake ni --rosdep-install
I'm getting the following error:
[rosmake-0] Starting >>> openni [ make ]
[ rosmake ] All 26 linespenni: 7.5 sec ] [ 1 Active 25/61 Complete ]
{-------------------------------------------------------------------------------
### Patching the main Makefile for OpenNI...
/home/user/ros_mobile/ni/openni
### Patching the output library for OpenNI...
/home/user/ros_mobile/ni/openni
### Patching the output library for all library Modules...
/home/user/ros_mobile/ni/openni
### Patching the output location for all samples...
/home/user/ros_mobile/ni/openni
### Patching the output location for all tools...
/home/user/ros_mobile/ni/openni
### Patching the location of modules.xml...
/home/user/ros_mobile/ni/openni
### Patching the location of SamplesConfig.xml...
/home/user/ros_mobile/ni/openni
cd build/openni/Platform/Linux-x86/Build && make core samples && cd -
make[1]: Entering directory `/home/user/ros_mobile/ni/openni/build/openni/Platform/Linux-x86/Build'
make -C OpenNI
make[2]: Entering directory `/home/user/ros_mobile/ni/openni/build/openni/Platform/Linux-x86/Build/OpenNI'
g++ -MD -MP -MT "./lib/openNI.d lib/openNI.o" -c -O3 -msse2 -malign-double -fPIC -fvisibility=hidden -I../../../../Include -I../../../../Source -I../../../../Source/External/TinyXml -DXN_EXPORTS -o lib/openNI.o ../../../../Source/OpenNI/openNI.cpp
cc1plus: error: unrecognized command line option "-msse2"
cc1plus: error: unrecognized command line option "-malign-double"
make[2]: *** [lib/openNI.o] Error 1
make[2]: Leaving directory `/home/user/ros_mobile/ni/openni/build/openni/Platform/Linux-x86/Build/OpenNI'
make[1]: *** [OpenNI] Error 2
make[1]: Leaving directory `/home/user/ros_mobile/ni/openni/build/openni/Platform/Linux-x86/Build'
-------------------------------------------------------------------------------}
The first thing I noticed is the assumption there I'm using a x386 platform (where does it come from?), but then again, it's just a folder name. g++ --version
returns:
g++ --version
g++ (Ubuntu 4.4.3-4ubuntu5) 4.4.3
EDIT: I suppose removing those flags -msse2 and -malign-double could help, but I don't know how to do it. Those, AFAIK, are not available on all platforms.
I hope someone can help, Tom.
The Beagle Board compiler doesn't have sse acceleration nor the -malign-double option. Unfortunately these are currently hard coded into the openni package. You can comment these lines in openni/include/ni/CommonMakefile to get it to compile. CFLAGS += -malign-double CFLAGS += -msse2