OpenNI/OpenNI — Issue #52: when cross compiling install.sh fails when calling niReg
Author: LeSpocky
Created: 2012-01-23 14:23:14+00:00
State: open

After cross-compiling OpenNI, installing with option -c from Redist folder results in:

% ./install.sh -c ~/build/sysroot-arm
Installing OpenNI
****************************

copying shared libraries...OK
copying executables...OK
copying include files...OK
creating database directory...OK
registering module 'libnimMockNodes.so'.../home/adahl/build/sysroot-arm/usr/bin/niReg: 1: Syntax error: word unexpected (expecting ")")

This is because of the following part of install.sh:

110 # register modules
111 for module in $MODULES; do
112 printf "registering module '$module'..."
113 $INSTALL_BIN/niReg -r $INSTALL_LIB/$module
114 printf "OK\n"
115 done

The script tries to execute the cross-compiled niReg which of course fails because it's not possible to execute arm binaries on x64.