Transferred from http://code.opencv.org/issues/4409
|| Andreas Unterweger on 2015-06-15 09:18
|| Priority: Normal
|| Affected: branch 'master' (3.0-dev)
|| Category: None
|| Tracker: Bug
|| Difficulty:
|| PR:
|| Platform: x64 / Other
OpenCL-related warning when OpenCL is disabled
Building a static version of OpenCV 3.0 on Ubuntu 14.04 with OpenCL disabled
<pre>
cmake -D WITH_OPENCL=OFF -D BUILD_SHARED_LIBS=OFF
</pre>
yields the following message when linking against the compiled version of OpenCV (path redacted):
<pre>
[Redacted]/lib/libopencv_core.a(ocl.cpp.o): In function `initOpenCLAndLoad': ocl.cpp:(.text.initOpenCLAndLoad+0x2b): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
</pre>
Why is there OpenCL-invoking code in the compiled library? Is WITH_OPENCL=OFF not enough or is this a bug?
History
Alexander Alekhin on 2015-06-15 09:31
Hi, I believe this patch should resolve this issue: https://github.com/Itseez/opencv/pull/4102
But main reason of this warning is in linker flags of the final application or OpenCV build used with this app.
More info about this warning can be found here: http://stackoverflow.com/questions/2725255/create-statically-linked-binary-that-uses-getaddrinfo
Andreas Unterweger on 2015-06-15 09:36
Alexander Alekhin wrote:
> Hi, I believe this patch should resolve this issue: https://github.com/Itseez/opencv/pull/4102
Thanks, I'm looking forward to the next release including this patch.
Transferred from http://code.opencv.org/issues/4409
OpenCL-related warning when OpenCL is disabled
History
Alexander Alekhin on 2015-06-15 09:31
Andreas Unterweger on 2015-06-15 09:36