[Mesa-dev] [Libclc-dev] opencl-example: didn't compile (run) with latest LLVM git (for some days)

Emil Velikov emil.l.velikov at gmail.com
Tue Oct 3 13:11:31 UTC 2017


On 28 September 2017 at 13:15, Dieter Nützel <Dieter at nuetzel-hh.de> wrote:
> Hello Jan, hello Emil,
>
> I've found it. It isn't a LLVM but a Mesa clover build problem. After Jan
> pointed me to build clover with
>
> --enable-opencl_icd switch in mesa to create an ICD driver
> (libMesaOpenCL.so) and the corresponding vendors file (installed as
> /etc/OpenCL/vendors/mesa.icd)
>
You're having a symbol issue, I doubt this will make any difference.

> libOpenCL.so wouldn't be build the right way.
>
> With --enable-opencl_icd a 'new' libMesaOpenCL.so.1.0.0 would be build in
> mesa/lib64/gallium/ and a 'linked'  libOpenCL.so.1.0.0 version. But the
> later is broken (missing symbols).
>
What do you mean here?

When using --enable-opencl-icd no libOpenCL.so is build... or it
wasn't last time I checked.
With ICD the flow is as follows:
 App -> opencl loader (libOpenCL.so from ocl-icd)  -> opencl driver
(libMesaOpenCL.so for mesa) -> HW

This way you don't have the multiple conflicting libOpenCL.so files
(one from Vendor X, another from Y).
One might even be able to select the implementation at run time - say
Mesa vs AMD.

> A 'rebuild' without '--enable-opencl_icd' isn't enough to circumvent this
> mess. I had to 'make distclean' plus remove all libMesaOpenCL* references by
> hand to build a new clean _working_ libOpenCL* lib.
>
The order tends to be as follows:
configure ... make ... make install... make uninstall ... make clean
... configure ...

Admittedly I've not looked at it too closely... recently.

HTH
Emil


More information about the mesa-dev mailing list