Closed fontviea closed 12 years ago
Which OS? Which Architecture? Which Compiler/Version?
You usually don't want the "libcv-dev" package, but the "libopencv-dev" package. libcv-dev is the old, transitional packages and might go away in the future.
Hi, more precision :
ld 2.21.0.20110327 I installed opencv from this repo : http://opencv.willowgarage.com/wiki/Ubuntu_Packages
Build configuration Debug build: No Tracker library: No (disabled)
Language bindings Python: Yes Java: No (disabled) C#: No (disabled) Processing: No (disabled) Qt: No (disabled)
Tracker PS Eye support: No HTML tracing: No Use CL Eye SDK: No (Windows only)
Additional targets C example apps: Yes C test programs: Yes C++ TUIO server: No
-- Configuring done -- Generating done -- Build files have been written to: /opt/psmove/psmoveapi2/psmoveapi/build [ 30%] Built target psmoveapi_static Linking C shared module _psmove.so /usr/bin/ld: libpsmoveapi_static.a(psmove.c.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC libpsmoveapi_static.a: could not read symbols: Bad value collect2: ld returned 1 exit status make[2]: * [_psmove.so] Erreur 1 make[1]: * [CMakeFiles/_psmove.dir/all] Erreur 2 make: *\ [all] Erreur 2
Can you try adding add_definitions(-fPIC)
to the CMakeLists.txt file, then re-run cmake and then re-run make? Does this fix the issue?
Hello,
I've got the same error on my machine: -- Ubuntu 12.04 kernel: 3.2.0-32-generic -- ccmake version 2.8.7 -- gcc (Ubuntu/Linaro 4.4.7-1ubuntu2) 4.4.7 -- GNU ld (GNU Binutils for Ubuntu) 2.22
After adding your suggestion to CMakeLists.txt the psmoveapi compiled succesfully. Thanks.
Thanks - so, after some investigation the problem seems to be that we can't link the Python module (itself a shared library) to the PS Move API static library. I've added the -fPIC switch as a temporary workaround now until (if ever) we find a better solution. Commit 3eeef2d
There's an interesting thread over at the FreeBSD mailing list related to that very issue, from 2005: http://lists.freebsd.org/pipermail/freebsd-amd64/2005-April/004644.html
Hi,
I've got a compilation error during link stage of psmoveapi static lib :
Linking C shared module _psmove.so /usr/bin/ld: libpsmoveapi_static.a(psmove.c.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC libpsmoveapi_static.a: could not read symbols: Bad value collect2: ld returned 1 exit status
When trying to build using package It complains about libopencv-dev not found (the lib is called libcv-dev on my distrib (Mint))
All sources come from repo, following all README instructions.