Aw: Re: Recompilation problems opencv (python3-cv2 --> python3.8)

wilhelm-eger@web.de wilhelm-eger@web.de
Thu Jan 14 09:59:35 GMT 2021


Dear Csaba,

Thank you for you reply.

However, it does not seem to work. I have tried several things. Based on this post:

https://stackoverflow.com/questions/38296756/what-is-the-idiomatic-way-in-cmake-to-add-the-fpic-compiler-option

I have added -DENABLE_PIC=ON to the cmake command of the cygport file from the git repository. Further, I have tried -DCMAKE_POSITION_INDEPENDENT_CODE=ON without success. Finally, I have tried to add -fPIC to the respective compilation commands in the build.ninja file for ittnotify and the linker command without any success.

This seems to be odd, as neither the cygport file nor the source code could have changed since this package has been compiled the last time for python36.

(And yes, I have searched the web for the respective phrase)

Any other hint? Thanks in advance.

Wilhelm 

Gesendet: Donnerstag, 14. Januar 2021 um 09:18 Uhr
Von: "Csaba Raduly" <rcsaba@gmail.com>
An: wilhelm-eger@web.de
Cc: "cygwin list" <cygwin@cygwin.com>
Betreff: Re: Recompilation problems opencv (python3-cv2 --> python3.8)
Hi Wilhelm,

On Thu, 14 Jan 2021 at 08:10, wilhelm-eger--- via Cygwin
<cygwin@cygwin.com> wrote:
(snip)
> 3rdparty/lib/libittnotify.a(ittnotify_static.c.o): in function `__itt_fini_ittlib':
> /usr/src/debug/opencv-3.4.1-2/3rdparty/ittnotify/src/ittnotify/ittnotify_static.c:1076:(.text$__itt_fini_ittlib+0x104): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `dlsym'
> 3rdparty/lib/libittnotify.a(ittnotify_static.c.o): in function `__itt_init_ittlib':
> /usr/src/debug/opencv-3.4.1-2/3rdparty/ittnotify/src/ittnotify/ittnotify_static.c:1123:(.text$__itt_init_ittlib+0x14b): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `dlopen'
> /usr/src/debug/opencv-3.4.1-2/3rdparty/ittnotify/src/ittnotify/ittnotify_static.c:1123:(.text$__itt_init_ittlib+0x155): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `dlsym'
> /usr/src/debug/opencv-3.4.1-2/3rdparty/ittnotify/src/ittnotify/ittnotify_static.c:1123:(.text$__itt_init_ittlib+0x168): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `dlclose'
> /usr/src/debug/opencv-3.4.1-2/3rdparty/ittnotify/src/ittnotify/ittnotify_static.c:1125:(.text$__itt_init_ittlib+0x2a6): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `dlopen'
> 3rdparty/lib/libittnotify.a(ittnotify_static.c.o): in function `__itt_lib_version':
> /usr/src/debug/opencv-3.4.1-2/3rdparty/ittnotify/src/ittnotify/ittnotify_static.c:1030:(.text$__itt_init_ittlib+0x2c8): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `dlsym'
> 3rdparty/lib/libittnotify.a(ittnotify_static.c.o): in function `__itt_init_ittlib':
> /usr/src/debug/opencv-3.4.1-2/3rdparty/ittnotify/src/ittnotify/ittnotify_static.c:1179:(.text$__itt_init_ittlib+0x2e4): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `dlsym'
> 3rdparty/lib/libittnotify.a(ittnotify_static.c.o): in function `__itt_lib_version':
> /usr/src/debug/opencv-3.4.1-2/3rdparty/ittnotify/src/ittnotify/ittnotify_static.c:1032:(.text$__itt_init_ittlib+0x3c6): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `dlsym'
> 3rdparty/lib/libittnotify.a(ittnotify_static.c.o): in function `__itt_init_ittlib':
> /usr/src/debug/opencv-3.4.1-2/3rdparty/ittnotify/src/ittnotify/ittnotify_static.c:1141:(.text$__itt_init_ittlib+0x41c): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `dlsym'

You need to compile with -fPIC.
Did you try searching the Internet for "relocation truncated to fit:
R_X86_64_PC32 against undefined symbol" ?

Csaba
--
You can get very substantial performance improvements
by not doing the right thing. - Scott Meyers, An Effective C++11/14 Sampler
So if you're looking for a completely portable, 100% standards-conformant way
to get the wrong information: this is what you want. - Scott Meyers (C++TDaWYK)


More information about the Cygwin mailing list