Closed egoist-sx closed 9 years ago
Have you tried specifying the OpenNI root directory when running cmake?
cmake /path/to/InfiniTAM -DOPEN_NI_ROOT=/path/to/OpenNI2/
Hi there,
Closed thread but I'm getting the same error. I have tried setting the OpenNI path but I'm not sure if I have the right path or not.
I have built OpenNI2 into following directory cd /home/skymeson/kinect/OpenNI2-master make
Then I build InfiniTAM using cd /home/skymeson/kinect/InfiniTAM-master/InfiniTAM/build cmake .. -DOPEN_NI_ROOT=/home/skymeson/kinect/OpenNI2-master
I see that it finds OpenNI in the following output
-- CUDA found: TRUE -- OpenNI found: TRUE -- libuvc found: FALSE -- libpng found: TRUE -- Configuring done -- Generating done
Errors
OpenNIEngine.cpp:(.text+0x27a9): undefined reference to oniFrameRelease' Engine/libEngine.a(OpenNIEngine.cpp.o): In function
openni::OpenNI::waitForAnyStream(openni::VideoStream*, int, int, int)':
OpenNIEngine.cpp:(.text._ZN6openni6OpenNI16waitForAnyStreamEPPNS_11VideoStreamEiPii[_ZN6openni6OpenNI16waitForAnyStreamEPPNS_11VideoStreamEiPii]+0x64): undefined reference to oniWaitForAnyStream' Engine/libEngine.a(OpenNIEngine.cpp.o): In function
openni::VideoStream::~VideoStream()':
OpenNIEngine.cpp:(.text._ZN6openni11VideoStreamD2Ev[_ZN6openni11VideoStreamD5Ev]+0x7a): undefined reference to oniStreamDestroy' Engine/libEngine.a(OpenNIEngine.cpp.o): In function
openni::Device::~Device()':
OpenNIEngine.cpp:(.text._ZN6openni6DeviceD2Ev[_ZN6openni6DeviceD5Ev]+0xa4): undefined reference to `oniDeviceClose'
collect2: error: ld returned 1 exit status
make[2]: * [InfiniTAM] Error 1
make[1]: * [CMakeFiles/InfiniTAM.dir/all] Error 2
make: *\ [all] Error 2
Am I missing something? Did OpenNI2 change its library paths? Any help would be appreciated. Thanks!
Can I know how is the issue resolved ?
@skymeson Have you resolved this question now? If it did, please tell me how to deal with it. Thanks a lot!
I have downloaded openni2 from structure.io, but after running ./install.sh, 'cmake' still shows could not find openni_include_dir. I then edited include path explicitly to Include folder inside downloaded folder from structure.io in /cmake/FindOpenNI.cmake. When I run 'make' this error shows
[100%] Building CXX object CMakeFiles/InfiniTAM.dir/InfiniTAM.cpp.o Linking CXX executable InfiniTAM Engine/libEngine.a(OpenNIEngine.cpp.o): In function
openni::OpenNI::waitForAnyStream(openni::VideoStream**, int, int*, int) [clone .constprop.20]': OpenNIEngine.cpp:(.text+0xa5): undefined reference to
oniWaitForAnyStream' Engine/libEngine.a(OpenNIEngine.cpp.o): In functionInfiniTAM::Engine::OpenNIEngine::getImages(ITMLib::Objects::ITMView*)': OpenNIEngine.cpp:(.text+0x29c): undefined reference to
oniStreamReadFrame' OpenNIEngine.cpp:(.text+0x2b2): undefined reference tooniFrameRelease' OpenNIEngine.cpp:(.text+0x2e4): undefined reference to
oniStreamReadFrame' OpenNIEngine.cpp:(.text+0x2fa): undefined reference tooniFrameRelease' Engine/libEngine.a(OpenNIEngine.cpp.o): In function
InfiniTAM::Engine::OpenNIEngine::OpenNIEngine(char const, char const, bool)': OpenNIEngine.cpp:(.text+0x74b): undefined reference tooniInitialize' OpenNIEngine.cpp:(.text+0x750): undefined reference to
oniGetExtendedError' OpenNIEngine.cpp:(.text+0x7a9): undefined reference tooniDeviceSetProperty' OpenNIEngine.cpp:(.text+0x7c4): undefined reference to
oniDeviceCreateStream' OpenNIEngine.cpp:(.text+0x7d1): undefined reference tooniGetExtendedError' OpenNIEngine.cpp:(.text+0x80b): undefined reference to
oniDeviceCreateStream' OpenNIEngine.cpp:(.text+0x818): undefined reference tooniGetExtendedError' OpenNIEngine.cpp:(.text+0x857): undefined reference to
oniShutdown' OpenNIEngine.cpp:(.text+0x8d1): undefined reference tooniStreamGetSensorInfo' OpenNIEngine.cpp:(.text+0x92e): undefined reference to
oniStreamIsPropertySupported' OpenNIEngine.cpp:(.text+0x949): undefined reference tooniStreamIsPropertySupported' OpenNIEngine.cpp:(.text+0x99b): undefined reference to
oniStreamGetProperty' OpenNIEngine.cpp:(.text+0x9e4): undefined reference tooniStreamSetProperty' OpenNIEngine.cpp:(.text+0xa09): undefined reference to
oniStreamStart' OpenNIEngine.cpp:(.text+0xa39): undefined reference tooniDeviceOpen' OpenNIEngine.cpp:(.text+0xa46): undefined reference to
oniGetExtendedError' OpenNIEngine.cpp:(.text+0xb41): undefined reference tooniStreamGetSensorInfo' OpenNIEngine.cpp:(.text+0xb9e): undefined reference to
oniStreamIsPropertySupported' OpenNIEngine.cpp:(.text+0xbb9): undefined reference tooniStreamIsPropertySupported' OpenNIEngine.cpp:(.text+0xc0b): undefined reference to
oniStreamGetProperty' OpenNIEngine.cpp:(.text+0xc4d): undefined reference tooniStreamSetProperty' OpenNIEngine.cpp:(.text+0xc72): undefined reference to
oniStreamStart' OpenNIEngine.cpp:(.text+0xd21): undefined reference tooniGetExtendedError' OpenNIEngine.cpp:(.text+0xda1): undefined reference to
oniGetExtendedError' OpenNIEngine.cpp:(.text+0xe24): undefined reference tooniStreamDestroy' OpenNIEngine.cpp:(.text+0xe34): undefined reference to
oniStreamDestroy' OpenNIEngine.cpp:(.text+0x10d7): undefined reference tooniDeviceGetInfo' OpenNIEngine.cpp:(.text+0x10e5): undefined reference to
oniDeviceIsPropertySupported' OpenNIEngine.cpp:(.text+0x10fc): undefined reference tooniDeviceIsPropertySupported' OpenNIEngine.cpp:(.text+0x1113): undefined reference to
oniDeviceIsCommandSupported' OpenNIEngine.cpp:(.text+0x1143): undefined reference tooniDeviceIsPropertySupported' OpenNIEngine.cpp:(.text+0x120b): undefined reference to
oniDeviceIsPropertySupported' OpenNIEngine.cpp:(.text+0x1222): undefined reference tooniDeviceIsCommandSupported' Engine/libEngine.a(OpenNIEngine.cpp.o): In function
InfiniTAM::Engine::OpenNIEngine::~OpenNIEngine()': OpenNIEngine.cpp:(.text+0x1286): undefined reference tooniStreamStop' OpenNIEngine.cpp:(.text+0x12fa): undefined reference to
oniStreamStop' OpenNIEngine.cpp:(.text+0x13c6): undefined reference tooniFrameRelease' OpenNIEngine.cpp:(.text+0x13e2): undefined reference to
oniFrameRelease' OpenNIEngine.cpp:(.text+0x1594): undefined reference tooniShutdown' OpenNIEngine.cpp:(.text+0x15b4): undefined reference to
oniStreamDestroy' OpenNIEngine.cpp:(.text+0x15c4): undefined reference tooniStreamDestroy' OpenNIEngine.cpp:(.text+0x15d1): undefined reference to
oniDeviceClose' OpenNIEngine.cpp:(.text+0x15e4): undefined reference tooniStreamDestroy' OpenNIEngine.cpp:(.text+0x15f4): undefined reference to
oniDeviceClose' OpenNIEngine.cpp:(.text+0x1604): undefined reference tooniStreamDestroy' OpenNIEngine.cpp:(.text+0x1687): undefined reference to
oniFrameRelease' Engine/libEngine.a(OpenNIEngine.cpp.o): In functionopenni::VideoStream::~VideoStream()': OpenNIEngine.cpp:(.text._ZN6openni11VideoStreamD2Ev[_ZN6openni11VideoStreamD5Ev]+0x74): undefined reference to
oniStreamDestroy' Engine/libEngine.a(OpenNIEngine.cpp.o): In functionopenni::Device::~Device()': OpenNIEngine.cpp:(.text._ZN6openni6DeviceD2Ev[_ZN6openni6DeviceD5Ev]+0xa4): undefined reference to
oniDeviceClose' collect2: ld returned 1 exit status make[2]: * [InfiniTAM] Error 1 make[1]: * [CMakeFiles/InfiniTAM.dir/all] Error 2 make: *\ [all] Error 2My system is ubuntu 12.04. Thanks!