Bug 61415 - Clover ignores --with-opencl-libdir path
Summary: Clover ignores --with-opencl-libdir path
Status: RESOLVED NOTABUG
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-24 23:51 UTC by Mike Lothian
Modified: 2014-09-27 14:33 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Lothian 2013-02-24 23:51:08 UTC
When compiling clover an installation directory can be given using --with-opencl-libdir

This currently doesn't work - I'm guessing it used to and I'm going to hazard a guess that it was the automake conversion that introduced the issue

Built with --with-opencl-libdir="${EPREFIX}/usr/$(get_libdir)/OpenCL/vendors/mesa"

Expected /usr/lib64/OpenCL/vendors/mesa/libOpenCL.so.1.0.0

Get /usr/lib64/libOpenCL.so.1.0.0
Comment 1 Francisco Jerez 2013-02-25 11:37:32 UTC
It isn't supposed to do that, use "--libdir" to change the installation path of libOpenCL.so, "--with-opencl-libdir" just sets the installation path of the auxiliary libraries that are used internally by the OpenCL implementation.

I guess the parameter description is a bit unclear about this, I'll fix it...
Comment 2 Mike Lothian 2013-02-25 12:40:36 UTC
Doesn't --libdir change the installation directory for all libraries not just the OpenCL ones?
Comment 3 Francisco Jerez 2013-02-25 12:47:51 UTC
(In reply to comment #2)
> Doesn't --libdir change the installation directory for all libraries not
> just the OpenCL ones?

Yes, exactly.
Comment 4 Mike Lothian 2013-02-25 14:04:06 UTC
Out of interest what are the auxiliary libraries? As I'm not getting anything in that directory
Comment 5 Francisco Jerez 2013-02-26 12:56:49 UTC
(In reply to comment #4)
> Out of interest what are the auxiliary libraries? As I'm not getting
> anything in that directory

You should be getting a .so file for each pipe driver you're building.
Comment 6 Francisco Jerez 2013-02-27 11:33:45 UTC
Just pushed a patch clarifying the meanining of this configure option.  Closing as fixed...
Comment 7 Mike Lothian 2013-02-27 12:03:00 UTC
Please could you clarify what libraries should be installed into this directory? 

I was building i965 r600g and clover all together and wasn't seeing anything in there
Comment 8 Francisco Jerez 2013-02-27 12:33:59 UTC
(In reply to comment #7)
> Please could you clarify what libraries should be installed into this
> directory? 
> 
> I was building i965 r600g and clover all together and wasn't seeing anything
> in there

You should be getting a pipe_r600.so file.
Comment 9 Francisco Jerez 2013-02-28 14:08:58 UTC
(In reply to comment #7)
> Please could you clarify what libraries should be installed into this
> directory? 
> 
> I was building i965 r600g and clover all together and wasn't seeing anything
> in there

Looking through the commit logs, this seems to have broken it:

> commit 45270fb0fd1abd7619933c2845f9dc74cdfbe6fd
> Author: Matt Turner <mattst88@gmail.com>
> Date:   Thu Sep 13 10:45:01 2012 -0700
> 
>     targets/pipe-loader: Convert to automake
> 

After this commit the PIPE_INSTALL_DIR environment variable is ignored and pipe libraries are installed unconditionally into "$(libdir)/gallium-pipe" (which seems OK by itself but it breaks the expected behaviour of the "--with-opencl-libdir" configure option). A possible solution would be to rename this option to "--with-pipe-libdir" (or something similar) and fix "targets/pipe-loader/Makefile.am" to take it into account correctly.

Reopening and adding Matt to the CC list.
Comment 10 Emil Velikov 2014-09-22 17:12:36 UTC
The description of the parameter states

  "directory for auxiliary libraries used by the OpenCL implementation"

The parameter does not control where the OpenCL library is installed, but the modules used by it - i.e. the gallium pipe-drivers.

Considering that the latter can be used with almost any target, and this configure option has been non functional for 2+ years we can just drop it.

I'll send a patch in a bit.
Comment 11 Emil Velikov 2014-09-27 14:31:59 UTC
Fwiw I've nuked the configure parameter considering it was broken for 2+ years as well as somewhat misleading.
Comment 12 Mike Lothian 2014-09-27 14:33:22 UTC
No complaints from me


bug/show.html.tmpl processed on Feb 26, 2017 at 07:45:35.
(provided by the Example extension).