victorprad / InfiniTAM

A Framework for the Volumetric Integration of Depth Images
http://www.infinitam.org
Other
922 stars 351 forks source link

Error when compile with OpenNI #2

Closed egoist-sx closed 9 years ago

egoist-sx commented 9 years ago

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 tooniWaitForAnyStream' Engine/libEngine.a(OpenNIEngine.cpp.o): In function InfiniTAM::Engine::OpenNIEngine::getImages(ITMLib::Objects::ITMView*)': OpenNIEngine.cpp:(.text+0x29c): undefined reference tooniStreamReadFrame' OpenNIEngine.cpp:(.text+0x2b2): undefined reference to oniFrameRelease' OpenNIEngine.cpp:(.text+0x2e4): undefined reference tooniStreamReadFrame' OpenNIEngine.cpp:(.text+0x2fa): undefined reference to oniFrameRelease' Engine/libEngine.a(OpenNIEngine.cpp.o): In functionInfiniTAM::Engine::OpenNIEngine::OpenNIEngine(char const, char const, bool)': OpenNIEngine.cpp:(.text+0x74b): undefined reference to oniInitialize' OpenNIEngine.cpp:(.text+0x750): undefined reference tooniGetExtendedError' OpenNIEngine.cpp:(.text+0x7a9): undefined reference to oniDeviceSetProperty' OpenNIEngine.cpp:(.text+0x7c4): undefined reference tooniDeviceCreateStream' OpenNIEngine.cpp:(.text+0x7d1): undefined reference to oniGetExtendedError' OpenNIEngine.cpp:(.text+0x80b): undefined reference tooniDeviceCreateStream' OpenNIEngine.cpp:(.text+0x818): undefined reference to oniGetExtendedError' OpenNIEngine.cpp:(.text+0x857): undefined reference tooniShutdown' OpenNIEngine.cpp:(.text+0x8d1): undefined reference to oniStreamGetSensorInfo' OpenNIEngine.cpp:(.text+0x92e): undefined reference tooniStreamIsPropertySupported' OpenNIEngine.cpp:(.text+0x949): undefined reference to oniStreamIsPropertySupported' OpenNIEngine.cpp:(.text+0x99b): undefined reference tooniStreamGetProperty' OpenNIEngine.cpp:(.text+0x9e4): undefined reference to oniStreamSetProperty' OpenNIEngine.cpp:(.text+0xa09): undefined reference tooniStreamStart' OpenNIEngine.cpp:(.text+0xa39): undefined reference to oniDeviceOpen' OpenNIEngine.cpp:(.text+0xa46): undefined reference tooniGetExtendedError' OpenNIEngine.cpp:(.text+0xb41): undefined reference to oniStreamGetSensorInfo' OpenNIEngine.cpp:(.text+0xb9e): undefined reference tooniStreamIsPropertySupported' OpenNIEngine.cpp:(.text+0xbb9): undefined reference to oniStreamIsPropertySupported' OpenNIEngine.cpp:(.text+0xc0b): undefined reference tooniStreamGetProperty' OpenNIEngine.cpp:(.text+0xc4d): undefined reference to oniStreamSetProperty' OpenNIEngine.cpp:(.text+0xc72): undefined reference tooniStreamStart' OpenNIEngine.cpp:(.text+0xd21): undefined reference to oniGetExtendedError' OpenNIEngine.cpp:(.text+0xda1): undefined reference tooniGetExtendedError' OpenNIEngine.cpp:(.text+0xe24): undefined reference to oniStreamDestroy' OpenNIEngine.cpp:(.text+0xe34): undefined reference tooniStreamDestroy' OpenNIEngine.cpp:(.text+0x10d7): undefined reference to oniDeviceGetInfo' OpenNIEngine.cpp:(.text+0x10e5): undefined reference tooniDeviceIsPropertySupported' OpenNIEngine.cpp:(.text+0x10fc): undefined reference to oniDeviceIsPropertySupported' OpenNIEngine.cpp:(.text+0x1113): undefined reference tooniDeviceIsCommandSupported' OpenNIEngine.cpp:(.text+0x1143): undefined reference to oniDeviceIsPropertySupported' OpenNIEngine.cpp:(.text+0x120b): undefined reference tooniDeviceIsPropertySupported' OpenNIEngine.cpp:(.text+0x1222): undefined reference to oniDeviceIsCommandSupported' Engine/libEngine.a(OpenNIEngine.cpp.o): In functionInfiniTAM::Engine::OpenNIEngine::~OpenNIEngine()': OpenNIEngine.cpp:(.text+0x1286): undefined reference to oniStreamStop' OpenNIEngine.cpp:(.text+0x12fa): undefined reference tooniStreamStop' OpenNIEngine.cpp:(.text+0x13c6): undefined reference to oniFrameRelease' OpenNIEngine.cpp:(.text+0x13e2): undefined reference tooniFrameRelease' OpenNIEngine.cpp:(.text+0x1594): undefined reference to oniShutdown' OpenNIEngine.cpp:(.text+0x15b4): undefined reference tooniStreamDestroy' OpenNIEngine.cpp:(.text+0x15c4): undefined reference to oniStreamDestroy' OpenNIEngine.cpp:(.text+0x15d1): undefined reference tooniDeviceClose' OpenNIEngine.cpp:(.text+0x15e4): undefined reference to oniStreamDestroy' OpenNIEngine.cpp:(.text+0x15f4): undefined reference tooniDeviceClose' OpenNIEngine.cpp:(.text+0x1604): undefined reference to oniStreamDestroy' OpenNIEngine.cpp:(.text+0x1687): undefined reference tooniFrameRelease' Engine/libEngine.a(OpenNIEngine.cpp.o): In function openni::VideoStream::~VideoStream()': OpenNIEngine.cpp:(.text._ZN6openni11VideoStreamD2Ev[_ZN6openni11VideoStreamD5Ev]+0x74): undefined reference tooniStreamDestroy' Engine/libEngine.a(OpenNIEngine.cpp.o): In function openni::Device::~Device()': OpenNIEngine.cpp:(.text._ZN6openni6DeviceD2Ev[_ZN6openni6DeviceD5Ev]+0xa4): undefined reference tooniDeviceClose' collect2: ld returned 1 exit status make[2]: * [InfiniTAM] Error 1 make[1]: * [CMakeFiles/InfiniTAM.dir/all] Error 2 make: *\ [all] Error 2

My system is ubuntu 12.04. Thanks!

olafkaehler commented 9 years ago

Have you tried specifying the OpenNI root directory when running cmake?

cmake /path/to/InfiniTAM -DOPEN_NI_ROOT=/path/to/OpenNI2/

skymeson commented 8 years ago

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 functionopenni::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 functionopenni::VideoStream::~VideoStream()': OpenNIEngine.cpp:(.text._ZN6openni11VideoStreamD2Ev[_ZN6openni11VideoStreamD5Ev]+0x7a): 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: 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!

ashokbugude commented 8 years ago

Can I know how is the issue resolved ?

HaoguangHuang commented 7 years ago

@skymeson Have you resolved this question now? If it did, please tell me how to deal with it. Thanks a lot!