Closed HosameldinMohamed closed 2 years ago
I don't see the variable pkgcfg_lib_openvr_dl
in this case.
Just to double check, are you sure you compiled https://github.com/ami-iit/openvr with BUILD_SHARED
set to OFF
as specified in https://github.com/ami-iit/yarp-openvr-trackers#install-openvr ? Are you sure that you are using the fix_upstream
branch?
Just to double check, are you sure you compiled https://github.com/ami-iit/openvr with
BUILD_SHARED
set toOFF
as specified in https://github.com/ami-iit/yarp-openvr-trackers#install-openvr ? Are you sure that you are using thefix_upstream
branch?
@traversaro I doubled-checked. The branch is correct and the BUILD_SHARED
is already OFF
.
@HosameldinMohamed did you solved the problem? If not, feel free to schedule a 0.5/1 hour to debug the problem with me.
Just to double check, are you sure you compiled https://github.com/ami-iit/openvr with
BUILD_SHARED
set toOFF
as specified in https://github.com/ami-iit/yarp-openvr-trackers#install-openvr ? Are you sure that you are using thefix_upstream
branch?@traversaro I doubled-checked. The branch is correct and the
BUILD_SHARED
is alreadyOFF
.
In https://github.com/robotology/robotology-superbuild/pull/1115#issuecomment-1124917869 I fixed the problem by setting BUILD_SHARED
to ON
. Perhaps the documentation in https://github.com/ami-iit/yarp-openvr-trackers/blame/5c63b85e22d80c18ea82da96151f6cf70fff0610/README.md#L53 should be fixed to specify that BUILD_SHARED
should be set to ON
? fyi @prashanthr05
Just to double check, are you sure you compiled https://github.com/ami-iit/openvr with
BUILD_SHARED
set toOFF
as specified in https://github.com/ami-iit/yarp-openvr-trackers#install-openvr ? Are you sure that you are using thefix_upstream
branch?@traversaro I doubled-checked. The branch is correct and the
BUILD_SHARED
is alreadyOFF
.In robotology/robotology-superbuild#1115 (comment) I fixed the problem by setting
BUILD_SHARED
toON
. Perhaps the documentation in https://github.com/ami-iit/yarp-openvr-trackers/blame/5c63b85e22d80c18ea82da96151f6cf70fff0610/README.md#L53 should be fixed to specify thatBUILD_SHARED
should be set toON
? fyi @prashanthr05
I believe @S-Dafarra also faced something similar while trying to setup on a new laptop.
Just to double check, are you sure you compiled https://github.com/ami-iit/openvr with
BUILD_SHARED
set toOFF
as specified in https://github.com/ami-iit/yarp-openvr-trackers#install-openvr ? Are you sure that you are using thefix_upstream
branch?@traversaro I doubled-checked. The branch is correct and the
BUILD_SHARED
is alreadyOFF
.In robotology/robotology-superbuild#1115 (comment) I fixed the problem by setting
BUILD_SHARED
toON
. Perhaps the documentation in https://github.com/ami-iit/yarp-openvr-trackers/blame/5c63b85e22d80c18ea82da96151f6cf70fff0610/README.md#L53 should be fixed to specify thatBUILD_SHARED
should be set toON
? fyi @prashanthr05
@traversaro the problem is solved when setting BUILD_SHARED
to ON
on my PC too (Windows).
It's strange that in Linux it can be compiled with BUILD_SHARED
set to OFF
.
@traversaro the problem is solved when setting
BUILD_SHARED
toON
on my PC too (Windows).It's strange that in Linux it can be compiled with
BUILD_SHARED
set toOFF
.
The main problem is that by default the visibility of symbol in libraries in Linux/macOS is public, while on Windows is private and symbols need to be exposed via "complex" techniques (see https://docs.microsoft.com/en-us/cpp/build/exporting-from-a-dll-using-declspec-dllexport?view=msvc-170). We tipically avoid this by using CMake's CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
, but if the library are not correctly implemented it is quite possible that you get linking problem either in the static or in the shared case on Windows.
I guess we can close this issue since we know how to install the current version of software in Windows and Linux..
I guess we can close this issue since we know how to install the current version of software in Windows and Linux..
Just saw this, is an action required to update the README?
Just saw this, is an action required to update the README?
Sorry, I forgot that the README needs to be updated. I'll open a PR
PR landed. Thanks @HosameldinMohamed.
In my PC (running Windows) I am trying to install the software following the main README, but when I was installing
yarp-openvr-trackers
I am getting a linking error.I even managed to do (following https://github.com/ami-iit/yarp-openvr-trackers#install-openvr):
Linking error
``` Microsoft (R) Build Engine version 17.0.0+c9eb9dd64 for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved. Checking Build System Building Custom Rule C:/Users/hmohamed/code/vr/yarp-openvr-trackers/src/CMakeLists.txt OpenVRTrackersDriver.cpp C:\Users\hmohamed\code\vr\yarp-openvr-trackers\src\OpenVRTrackersDriver.cpp(139,1): warning C4267: 'argument': conversi on from 'size_t' to 'vr::TrackedDeviceIndex_t', possible loss of data [C:\Users\hmohamed\code\vr\yarp-openvr-trackers\b uild\src\openvr-trackers.vcxproj] C:\Users\hmohamed\code\vr\yarp-openvr-trackers\src\OpenVRTrackersDriver.cpp(189,8): warning C4267: 'argument': conversi on from 'size_t' to 'vr::TrackedDeviceIndex_t', possible loss of data [C:\Users\hmohamed\code\vr\yarp-openvr-trackers\b uild\src\openvr-trackers.vcxproj] C:\Users\hmohamed\code\vr\yarp-openvr-trackers\src\OpenVRTrackersDriver.cpp(197,56): warning C4267: 'argument': convers ion from 'size_t' to 'const uint32_t', possible loss of data [C:\Users\hmohamed\code\vr\yarp-openvr-trackers\build\src\ openvr-trackers.vcxproj] C:\Users\hmohamed\code\vr\yarp-openvr-trackers\src\OpenVRTrackersDriver.cpp(201,65): warning C4267: 'argument': convers ion from 'size_t' to 'vr::TrackedDeviceIndex_t', possible loss of data [C:\Users\hmohamed\code\vr\yarp-openvr-trackers\ build\src\openvr-trackers.vcxproj] C:\Users\hmohamed\code\vr\yarp-openvr-trackers\src\OpenVRTrackersDriver.cpp(300,1): warning C4267: 'argument': conversi on from 'size_t' to 'vr::TrackedDeviceIndex_t', possible loss of data [C:\Users\hmohamed\code\vr\yarp-openvr-trackers\b uild\src\openvr-trackers.vcxproj] C:\Users\hmohamed\code\vr\yarp-openvr-trackers\src\OpenVRTrackersDriver.cpp(314,14): warning C4267: 'argument': convers ion from 'size_t' to 'vr::TrackedDeviceIndex_t', possible loss of data [C:\Users\hmohamed\code\vr\yarp-openvr-trackers\ build\src\openvr-trackers.vcxproj] openvr-trackers.vcxproj -> C:\Users\hmohamed\code\vr\yarp-openvr-trackers\build\lib\Release\openvr-trackers.lib Building Custom Rule C:/Users/hmohamed/code/vr/yarp-openvr-trackers/src/CMakeLists.txt run_driver.cpp openvr-trackers.lib(OpenVRTrackersDriver.obj) : error LNK2019: unresolved external symbol __imp_VR_GetVRInitErrorAsEngl ishDescription referenced in function "public: bool __cdecl openvr::DevicesManager::initialize(void)" (?initialize@Devi cesManager@openvr@@QEAA_NXZ) [C:\Users\hmohamed\code\vr\yarp-openvr-trackers\build\src\run_driver.vcxproj] openvr-trackers.lib(OpenVRTrackersDriver.obj) : error LNK2019: unresolved external symbol __imp_VR_GetGenericInterface referenced in function "public: bool __cdecl openvr::DevicesManager::initialize(void)" (?initialize@DevicesManager@open vr@@QEAA_NXZ) [C:\Users\hmohamed\code\vr\yarp-openvr-trackers\build\src\run_driver.vcxproj] openvr-trackers.lib(OpenVRTrackersDriver.obj) : error LNK2019: unresolved external symbol __imp_VR_IsInterfaceVersionVa lid referenced in function "public: bool __cdecl openvr::DevicesManager::initialize(void)" (?initialize@DevicesManager@ openvr@@QEAA_NXZ) [C:\Users\hmohamed\code\vr\yarp-openvr-trackers\build\src\run_driver.vcxproj] openvr-trackers.lib(OpenVRTrackersDriver.obj) : error LNK2019: unresolved external symbol __imp_VR_GetInitToken referen ced in function "public: void __cdecl vr::COpenVRContext::CheckClear(void)" (?CheckClear@COpenVRContext@vr@@QEAAXXZ) [C :\Users\hmohamed\code\vr\yarp-openvr-trackers\build\src\run_driver.vcxproj] openvr-trackers.lib(OpenVRTrackersDriver.obj) : error LNK2019: unresolved external symbol __imp_VR_InitInternal2 refere nced in function "public: bool __cdecl openvr::DevicesManager::initialize(void)" (?initialize@DevicesManager@openvr@@QE AA_NXZ) [C:\Users\hmohamed\code\vr\yarp-openvr-trackers\build\src\run_driver.vcxproj] openvr-trackers.lib(OpenVRTrackersDriver.obj) : error LNK2019: unresolved external symbol __imp_VR_ShutdownInternal ref erenced in function "public: __cdecl openvr::DevicesManager::~DevicesManager(void)" (??1DevicesManager@openvr@@QEAA@XZ) [C:\Users\hmohamed\code\vr\yarp-openvr-trackers\build\src\run_driver.vcxproj] C:\Users\hmohamed\code\vr\yarp-openvr-trackers\build\bin\Release\run_driver.exe : fatal error LNK1120: 6 unresolved ext ernals [C:\Users\hmohamed\code\vr\yarp-openvr-trackers\build\src\run_driver.vcxproj] Generating code from thrifts/OpenVRTrackersCommands.thrift Building Custom Rule C:/Users/hmohamed/code/vr/yarp-openvr-trackers/src/CMakeLists.txt OpenVRTrackersModule.cpp C:\Users\hmohamed\AppData\Local\mambaforge\envs\openvr\Library\include\yarp/sig/Vector.h(119,20): warning C4251: 'yarp: :sig::VectorOf