Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 692404 - dev-libs/rocm-opencl-driver-2.7.0 - src/driver/libopencl_driver.so: error: undefined reference to 'llvm::WriteBitcodeToFile(llvm::Module const&, llvm::raw_ostream&, bool, llvm::ModuleSummaryIndex const*, bool, std::array<unsigned int, 5ul>*)'
Summary: dev-libs/rocm-opencl-driver-2.7.0 - src/driver/libopencl_driver.so: error: un...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Craig Andrews
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-17 23:01 UTC by Mike Lothian
Modified: 2019-08-27 13:04 UTC (History)
1 user (show)

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


Attachments
GCC failure (build.log,13.09 KB, text/plain)
2019-08-17 23:01 UTC, Mike Lothian
Details
Clang failure (build.log,4.74 KB, text/plain)
2019-08-17 23:02 UTC, Mike Lothian
Details
Fix (rocm-opencl-driver-2.7.0-include-more-libs.patch,458 bytes, text/plain)
2019-08-27 10:27 UTC, Mike Lothian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Lothian 2019-08-17 23:01:40 UTC
Created attachment 587226 [details]
GCC failure

I've tried compiling with GCC-9 and using Clang from the llvm-roc package

They both fail with different issues
Comment 1 Mike Lothian 2019-08-17 23:02:48 UTC
Created attachment 587228 [details]
Clang failure
Comment 2 Juho-Mikko Pellinen 2019-08-26 17:50:08 UTC
I had similar issues.

But after emerging the package sys-devel/llvm-roc-2.7.0 my compilation errors went away.

Dunno what was wrong there. Perhaps some incompatibility with previously used justxi overlay of rocm packages.
Comment 3 Craig Andrews gentoo-dev 2019-08-26 21:18:44 UTC
Thank you for following up!
Comment 4 Mike Lothian 2019-08-27 08:45:58 UTC
This didn't fix things for me

I've never used the overlay, this is a clean install of rocm-opencl-runtime which pulls in dev-libs/rocm-opencl-driver, sys-devel/llvm-roc-2.7.0 has already compiled at this point
Comment 5 Mike Lothian 2019-08-27 10:27:03 UTC
Adding these libraries manually to the build.ninja file got the build working for me:

/usr/lib/llvm/roc/lib/libLLVMBitWriter.so.9roc /usr/lib/llvm/roc/lib/libLLVMLinker.so.9roc /usr/lib/llvm/roc/lib/libLLVMIRReader.so.9roc /usr/lib/llvm/roc/lib/libLLVMMCParser.so.9roc /usr/lib/llvm/roc/lib/libclangSerialization.so.9roc
Comment 6 Mike Lothian 2019-08-27 10:27:59 UTC
Created attachment 588254 [details]
Fix

This patch gets things working

It's in the FireBurn overlay
Comment 7 Mike Lothian 2019-08-27 10:43:04 UTC
Pull request submitted upstream

https://github.com/RadeonOpenCompute/ROCm-OpenCL-Driver/pull/88
Comment 8 Larry the Git Cow gentoo-dev 2019-08-27 13:04:50 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a31c9aa8de9537fe1918546bd4895c187917eabb

commit a31c9aa8de9537fe1918546bd4895c187917eabb
Author:     Craig Andrews <candrews@gentoo.org>
AuthorDate: 2019-08-27 13:04:10 +0000
Commit:     Craig Andrews <candrews@gentoo.org>
CommitDate: 2019-08-27 13:04:43 +0000

    dev-libs/rocm-opencl-driver: Include more link libraries
    
    Closes: https://bugs.gentoo.org/692404
    Package-Manager: Portage-2.3.73, Repoman-2.3.17
    Signed-off-by: Craig Andrews <candrews@gentoo.org>

 .../files/rocm-opencl-driver-2.7.0-libraries.patch | 40 ++++++++++++++++++++++
 .../rocm-opencl-driver-2.7.0.ebuild                |  1 +
 2 files changed, 41 insertions(+)