运行make时出现Openni2错误

时间:2014-09-15 15:23:09

标签: linux makefile kinect openni

我从github下载了Openni2并按照README中的说明运行$ make。我收到了这个错误:

g++ -MD -MP -MT "./../../../Bin/Intermediate/x86-Release/libOpenNI2.jni.so/org_openni_NativeMethods.d ../../../Bin/Intermediate/x86-Release/libOpenNI2.jni.so/org_openni_NativeMethods.o" -c -msse3 -Wall -O2 -DNDEBUG -I. -I../../../Include -I../../../ThirdParty/PSCommon/XnLib/Include  -fPIC -fvisibility=hidden -o ../../../Bin/Intermediate/x86-Release/libOpenNI2.jni.so/org_openni_NativeMethods.o org_openni_NativeMethods.cpp
g++ -o ../../../Bin/x86-Release/libOpenNI2.jni.so ./../../../Bin/Intermediate/x86-Release/libOpenNI2.jni.so/OpenNI.jni.o ./../../../Bin/Intermediate/x86-Release/libOpenNI2.jni.so/org_openni_NativeMethods.o  -L../../../Bin/x86-Release -lOpenNI2 -Wl,--no-undefined -shared
/usr/lib/i386-linux-gnu/libc_nonshared.a(stack_chk_fail_local.oS): In function `__stack_chk_fail_local':
(.text+0x10): undefined reference to `__stack_chk_fail'
collect2: error: ld returned 1 exit status
make[1]: *** [../../../Bin/x86-Release/libOpenNI2.jni.so] Error 1
make[1]: Leaving directory `/home/smalleyreaserch/OpenNI2/Wrappers/java/OpenNI.jni'
make: *** [Wrappers/java/OpenNI.jni] Error 2

我安装了所有必需的软件包。谁能帮我? 我的系统是Ubuntu 14.04 32位,但计算机是64位。那会是我得到这个错误的原因吗?

1 个答案:

答案 0 :(得分:0)

其他一些人遇到了这个问题......但主要是在i686计算机上......不管怎样,这是一个可能的解决方案。

首先,确保你有java而不是openjava ......我已经读到这有时候会出现问题。

其次,使用

export LDFLAGS+="-lc"

这应该可以解决您的问题,如果不是只是发表评论