Hei hei,
On 20 Jan., 02:21, Byung-Ho Ahn <Byung-Ho....@PrimeSense.com> wrote:
> Please put cross compiler include directory into Platform/Linux/Build/Common/CommonCppMakefile like below.
>
> INC_DIRS += <path to compiler include>
I had a look in this file and found the following comment:
7 # Project makefile should define the following BEFORE including
this file:
8 # SRC_FILES - a list of all source files
9 # Output name under one of the following:
10 # EXE_NAME (executable),
11 # LIB_NAME (dynamic library) or
12 # SLIB_NAME (static library) or
13 # BIN_DIR - Bin directory (output dir)
14 # INC_DIRS - a list of additional include directories
15 # LIB_DIRS - a list of additional library directories
16 # USED_LIBS - a list of libraries to link with
So I appended the following to Platform/Linux/Build/OpenNI/Makefile
29 INC_DIRS += /opt/OSELAS.Toolchain-2011.03.0/arm-v5te-linux-gnueabi/
gcc-4.5.2-glibc-2.13-binutils-2.21-kernel-2.6.36-sanitized/sysroot-arm-
v5te-linux-gnueabi/include
30 INC_DIRS += /opt/OSELAS.Toolchain-2011.03.0/arm-v5te-linux-gnueabi/
gcc-4.5.2-glibc-2.13-binutils-2.21-kernel-2.6.36-sanitized/sysroot-arm-
v5te-linux-gnueabi/usr/include
just before
34 include ../Common/CommonCppMakefile
This leads to the following:
% ARM_CXX=arm-v5te-linux-gnueabi-g++ ARM_STAGING=~/build/sysroot-
arm-2 ./RedistMaker Arm
*********************************
* PrimeSense OpenNI Redist *
* 2012-01-20 09:48:08 *
*********************************
Target: Linux-Arm
Version: 1.5.2.23
Num of compile jobs: 4
* Building OpenNI...
../../../../Source/OpenNI/XnDump.cpp:136:13: note: the mangling of
'va_list' has changed in GCC 4.4
../../../../Source/OpenNI/XnLog.cpp:720:6: note: the mangling of
'va_list' has changed in GCC 4.4
/opt/OSELAS.Toolchain-2011.03.0/arm-v5te-linux-gnueabi/gcc-4.5.2-
glibc-2.13-binutils-2.21-kernel-2.6.36-sanitized/lib/gcc/arm-v5te-
linux-gnueabi/4.5.2/../../../../arm-v5te-linux-gnueabi/bin/ld: cannot
find crti.o: No such file or directory
/opt/OSELAS.Toolchain-2011.03.0/arm-v5te-linux-gnueabi/gcc-4.5.2-
glibc-2.13-binutils-2.21-kernel-2.6.36-sanitized/lib/gcc/arm-v5te-
linux-gnueabi/4.5.2/../../../../arm-v5te-linux-gnueabi/bin/ld: cannot
find -ldl
/opt/OSELAS.Toolchain-2011.03.0/arm-v5te-linux-gnueabi/gcc-4.5.2-
glibc-2.13-binutils-2.21-kernel-2.6.36-sanitized/lib/gcc/arm-v5te-
linux-gnueabi/4.5.2/../../../../arm-v5te-linux-gnueabi/bin/ld: cannot
find -lpthread
/opt/OSELAS.Toolchain-2011.03.0/arm-v5te-linux-gnueabi/gcc-4.5.2-
glibc-2.13-binutils-2.21-kernel-2.6.36-sanitized/lib/gcc/arm-v5te-
linux-gnueabi/4.5.2/../../../../arm-v5te-linux-gnueabi/bin/ld: cannot
find -lrt
/opt/OSELAS.Toolchain-2011.03.0/arm-v5te-linux-gnueabi/gcc-4.5.2-
glibc-2.13-binutils-2.21-kernel-2.6.36-sanitized/lib/gcc/arm-v5te-
linux-gnueabi/4.5.2/../../../../arm-v5te-linux-gnueabi/bin/ld: cannot
find -lm
collect2: ld returned 1 exit status
make[1]: *** [../../Bin/Arm-Release/libOpenNI.so] Fehler 1
make: *** [OpenNI] Fehler 2
failed to execute: make PLATFORM=Arm -j4 -C /home/adahl/src/OpenNI/
Platform/Linux/CreateRedist/../Build > /home/adahl/src/OpenNI/Platform/
Linux/CreateRedist/Output/BuildOpenNI.txt
Building Failed!
Ok seems he does not find some libs so I added some additional lines
to Platform/Linux/Build/OpenNI/Makefile
31 LIB_DIRS += /opt/OSELAS.Toolchain-2011.03.0/arm-v5te-linux-gnueabi/
gcc-4.5.2-glibc-2.13-binutils-2.21-kernel-2.6.36-sanitized/sysroot-arm-
v5te-linux-gnueabi/lib
32 LIB_DIRS += /opt/OSELAS.Toolchain-2011.03.0/arm-v5te-linux-gnueabi/
gcc-4.5.2-glibc-2.13-binutils-2.21-kernel-2.6.36-sanitized/sysroot-arm-
v5te-linux-gnueabi/usr/lib
Compiling still does not succeed, now with this error:
* Building OpenNI...
../../../../Source/OpenNI/XnDump.cpp:136:13: note: the mangling of
'va_list' has changed in GCC 4.4
../../../../Source/OpenNI/XnLog.cpp:720:6: note: the mangling of
'va_list' has changed in GCC 4.4
/opt/OSELAS.Toolchain-2011.03.0/arm-v5te-linux-gnueabi/gcc-4.5.2-
glibc-2.13-binutils-2.21-kernel-2.6.36-sanitized/lib/gcc/arm-v5te-
linux-gnueabi/4.5.2/../../../../arm-v5te-linux-gnueabi/bin/ld: cannot
find crti.o: No such file or directory
/opt/OSELAS.Toolchain-2011.03.0/arm-v5te-linux-gnueabi/gcc-4.5.2-
glibc-2.13-binutils-2.21-kernel-2.6.36-sanitized/lib/gcc/arm-v5te-
linux-gnueabi/4.5.2/../../../../arm-v5te-linux-gnueabi/bin/ld: cannot
find /lib/libpthread.so.0
/opt/OSELAS.Toolchain-2011.03.0/arm-v5te-linux-gnueabi/gcc-4.5.2-
glibc-2.13-binutils-2.21-kernel-2.6.36-sanitized/lib/gcc/arm-v5te-
linux-gnueabi/4.5.2/../../../../arm-v5te-linux-gnueabi/bin/ld: cannot
find /usr/lib/libpthread_nonshared.a
collect2: ld returned 1 exit status
make[1]: *** [../../Bin/Arm-Release/libOpenNI.so] Fehler 1
make: *** [OpenNI] Fehler 2
failed to execute: make PLATFORM=Arm -j4 -C /home/adahl/src/OpenNI/
Platform/Linux/CreateRedist/../Build > /home/adahl/src/OpenNI/Platform/
Linux/CreateRedist/Output/BuildOpenNI.txt
Building Failed!
However there are files crti.o, libpthread.so.0,
libpthread_nonshared.a in /opt/OSELAS.Toolchain-2011.03.0/arm-v5te-
linux-gnueabi/gcc-4.5.2-glibc-2.13-binutils-2.21-kernel-2.6.36-
sanitized/sysroot-arm-v5te-linux-gnueabi – see:
% find -L . -name 'crti.o'
./usr/lib/crti.o
% find -L . -name 'libpthread.so.0'
./lib/libpthread.so.0
% find -L . -name 'libpthread_nonshared.a'
./usr/lib/libpthread_nonshared.a
This is strange because if I have a look in /home/adahl/src/OpenNI/
Platform/Linux/CreateRedist/Output/BuildOpenNI.txt then there's no
error, maybe because just stdout is piped to this file and the error
on console comes through stderr. So I tried do execute the build
without the Python stuff:
% ARM_CXX=arm-v5te-linux-gnueabi-g++ ARM_STAGING=~/build/sysroot-arm-2
make PLATFORM=Arm -j4 -C /home/adahl/src/OpenNI/Platform/Linux/
CreateRedist/../Build
But this gives the same error as above, would have assumed that
before. So what did I miss?
Thanks so far and greets
Alex