Bug 233495 - devel/llvm70: devel/llvm60: Inconsistency in commandline options with multiple OpenCL vendor libraries installed
Summary: devel/llvm70: devel/llvm60: Inconsistency in commandline options with multipl...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-ports-bugs mailing list
: 231228 (view as bug list)
Depends on:
Blocks: 219562 223879 231226 232357
  Show dependency treegraph
Reported: 2018-11-25 09:38 UTC by O. Hartmann
Modified: 2019-06-06 21:49 UTC (History)
2 users (show)

See Also:
ohartmann: maintainer-feedback+


Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2018-11-25 09:38:11 UTC
I'd like to refer to this bug which seems to be still open and still present in all versions of LLVM since LLVM 4.0 (my guess, I did not track that down exactly).

Since this severe problem has not been solved even for LLVM 7.0, the issue not being able to use an ICD for multiple platforms available on FreeBSD in cases the OpenCL backends (lang/pocl (See https://github.com/pocl/pocl/issues/474), devel/beignet, lang/clover) are all compiled dynamically against the same LLVM backend. The issue disapperas were the backend is compiled against a different version of LLVM or statically linked. Both is inacceptable.

I'd like to refer to this LLVM bug:



Bug 30587 - Inconsistency in commandline options with multiple OpenCL vendor libraries installed :


How to reproduce:

Compile lang/clover, lang/beignet, lang/pocl against the same LLVM backend (devel/llvm60 or devel/llvm70) and use /devel/clinfo for checking. You should be presented with:

$ clinfo
CommandLine Error: Option 'enable-value-profiling' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options

The same problem occurs for several ports on which OpenCL support might be an option and enabled, like graphics/blender (PR 223879), graphics/ImageMagick6 (PR 232357).
Comment 1 Brooks Davis freebsd_committer 2018-11-26 18:39:47 UTC
The message "Inconsistency in commandline options" is just a symptom of the fact that libLLVM can't be dlopen'd twice.  My suspicion is that if libOpenCL had a direct dependency on libLLVM.so that the right thing would happen, but I'm not sure.

Until upstream LLVM makes changes to support this, I don't consider this a bug in the LLVM ports.  OpenCL ports want to use LLVM in a way that isn't supported.
Comment 2 Brooks Davis freebsd_committer 2019-01-10 05:11:10 UTC
*** Bug 231228 has been marked as a duplicate of this bug. ***