Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 409015 - dev-util/intel-ocl-sdk: libOpenCL.so uses incompatible SONAME without SOVERSION
Summary: dev-util/intel-ocl-sdk: libOpenCL.so uses incompatible SONAME without SOVERSION
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Rick Farina (Zero_Chaos)
URL: http://software.intel.com/en-us/forum...
Whiteboard:
Keywords: NeedPatch
Depends on:
Blocks:
 
Reported: 2012-03-20 14:20 UTC by Dennis Schridde
Modified: 2018-04-09 19:52 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Schridde 2012-03-20 14:20:57 UTC
I compiled net-misc/cgminer-2.3.1.2 against x11-drivers/ati-drivers-12.2, which installs /usr/lib64/OpenCL/vendors/amd/libOpenCL.so.1, set by eselect-opencl as "/usr/lib64/libOpenCL.so.1 -> OpenCL/vendors/amd/libOpenCL.so.1", resulting in following linkage:
# scanelf -n /usr/bin/cgminer 
 TYPE   NEEDED FILE 
ET_EXEC ...,libOpenCL.so.1,... /usr/bin/cgminer

dev-util/intel-ocl-sdk-1.5 currently installs /usr/lib64/OpenCL/vendors/intel/libOpenCL.so and app-admin/eselect-opencl-1.1.0-r1 sets "/usr/lib64/libOpenCL.so -> OpenCL/vendors/intel/libOpenCL.so".

Now, after switching from the amd opencl implementation to the intel one, I get: "cgminer: error while loading shared libraries: libOpenCL.so.1: cannot open shared object file: No such file or directory"

It would be nice if dev-util/intel-ocl-sdk-1.5 could append the soversion to the filename (i.e. naming it libOpenCL.so.1, and creating a symlink "libOpenCL.so -> libOpenCL.so.1"), so that its implementation could be exchanged with the one from x11-drivers/ati-drivers-12.2 without problems.

Reproducible: Always
Comment 1 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2012-10-02 05:55:17 UTC
Latest version has exactly what you asked for, though I'm not sure this will fix the underlying problem. Please test
Comment 2 Dennis Schridde 2012-10-02 15:42:07 UTC
Still does not work. Maybe the eselect module needs to be updated?

# eselect opencl set amd
# ll /usr/lib/libOpenCL.so*
lrwxrwxrwx 1 root root 33 Oct  2 17:37 /usr/lib/libOpenCL.so -> OpenCL/vendors/amd/libOpenCL.so.1
lrwxrwxrwx 1 root root 33 Oct  2 17:37 /usr/lib/libOpenCL.so.1 -> OpenCL/vendors/amd/libOpenCL.so.1

# eselect opencl set intel
# ll /usr/lib/libOpenCL.so*
lrwxrwxrwx 1 root root 35 Oct  2 17:39 /usr/lib/libOpenCL.so -> OpenCL/vendors/intel/libOpenCL.so.1
# ll /usr/lib/OpenCL/vendors/intel/libOpenCL.so*
lrwxrwxrwx 1 root root    14 Oct  2 17:08 /usr/lib/OpenCL/vendors/intel/libOpenCL.so -> libOpenCL.so.1
-rwxr-xr-x 1 root root 26744 Oct  2 17:07 /usr/lib/OpenCL/vendors/intel/libOpenCL.so.1
Comment 3 Dennis Schridde 2012-10-02 15:47:55 UTC
Found the issue. The eselect opencl module uses the SONAME to setup the symlinks, which is wrong for the intel implementation:
# scanelf -S /usr/lib/OpenCL/vendors/*/libOpenCL.so.1
 TYPE   SONAME FILE
ET_DYN libOpenCL.so.1 /usr/lib/OpenCL/vendors/amd/libOpenCL.so.1
ET_DYN libOpenCL.so /usr/lib/OpenCL/vendors/intel/libOpenCL.so.1
Comment 4 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2012-10-02 15:57:00 UTC
(In reply to comment #3)
> Found the issue. The eselect opencl module uses the SONAME to setup the
> symlinks, which is wrong for the intel implementation:
> # scanelf -S /usr/lib/OpenCL/vendors/*/libOpenCL.so.1
>  TYPE   SONAME FILE
> ET_DYN libOpenCL.so.1 /usr/lib/OpenCL/vendors/amd/libOpenCL.so.1
> ET_DYN libOpenCL.so /usr/lib/OpenCL/vendors/intel/libOpenCL.so.1
The question is will it work with the symlink, if soname is wrong?
Do that link manually, if it helps I'll fix eselect-opencl
Comment 5 Dennis Schridde 2012-10-02 16:26:22 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Found the issue. The eselect opencl module uses the SONAME to setup the
> > symlinks, which is wrong for the intel implementation:
> > # scanelf -S /usr/lib/OpenCL/vendors/*/libOpenCL.so.1
> >  TYPE   SONAME FILE
> > ET_DYN libOpenCL.so.1 /usr/lib/OpenCL/vendors/amd/libOpenCL.so.1
> > ET_DYN libOpenCL.so /usr/lib/OpenCL/vendors/intel/libOpenCL.so.1
> The question is will it work with the symlink, if soname is wrong?
> Do that link manually, if it helps I'll fix eselect-opencl

This made cgminer start:
ln -s OpenCL/vendors/intel/libOpenCL.so.1 /usr/lib/libOpenCL.so.1

It reports no usable GPUs, though:
 [2012-10-02 18:06:38] Error -1: Getting Device IDs (num)
 [2012-10-02 18:06:38] Error -1: Getting Device IDs (num)
 [2012-10-02 18:06:38] clDevicesNum returned error, no GPUs usable

The reasons could be numerous. For starters I have neither an Intel CPU nor GPU.

Anyway, I found a bugreport in their forum on this matter:
http://software.intel.com/en-us/forums/topic/277598
Comment 6 Rick Farina (Zero_Chaos) gentoo-dev 2014-08-30 18:30:34 UTC
please see if the new 4.4.0 in portage meets your needs.
Comment 7 Artyom 2014-09-11 12:14:27 UTC
Hi!
Version 4.4.0 not working.
If i use 2.0.31360, i have OpenCl 1.1
I want to use 1.2, but after building (building - OK)

I am using http://wiki.tiker.net/OpenCLHowTo
to test opencl works

At version 2.0.31360
artem_lin tools-master # ./print-devices 
platform 0: vendor 'Intel(R) Corporation'
  device 0: '        Intel(R) Core(TM) i5-3330 CPU @ 3.00GHz'
platform 1: vendor 'NVIDIA Corporation'
  device 0: 'GeForce GT 440'

At version 4.4.0
artem_lin tools-master # ./print-devices 
platform 0: vendor 'NVIDIA Corporation'
  device 0: 'GeForce GT 440'

Boinc also doesn't find Intel OpenCL

P.S. Sorry for my English....