Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 646122 - dev-libs/ocl-icd-2.2.11 ld: .libs/libOpenCL.so.1.0.0: hidden symbol `dump_vendor_icd' isn't defined
Summary: dev-libs/ocl-icd-2.2.11 ld: .libs/libOpenCL.so.1.0.0: hidden symbol `dump_ven...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Patrick Lauer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-30 12:53 UTC by ernsteiswuerfel
Modified: 2020-08-25 01:23 UTC (History)
1 user (show)

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


Attachments
emerge --info (file_646122.txt,6.03 KB, text/plain)
2018-01-30 12:53 UTC, ernsteiswuerfel
Details
build.log (build.log,18.21 KB, text/plain)
2018-01-30 12:54 UTC, ernsteiswuerfel
Details
use static inline (ocl-icd-2.2.11-static-inline.patch,481 bytes, patch)
2018-12-27 10:02 UTC, Steven Newbury
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2018-01-30 12:53:24 UTC
Created attachment 517122 [details]
emerge --info

After an emerge -e @world, /ocl-icd fails to build. Most probably due to gcc-7.3.0, 'cause I didn't change anything else in the toolchain.
Comment 1 ernsteiswuerfel archtester 2018-01-30 12:54:11 UTC
Created attachment 517124 [details]
build.log
Comment 2 ernsteiswuerfel archtester 2018-06-08 14:00:16 UTC
By chance I figured out what was causing the bug.

dev-libs/ocl-icd-2.2.11 does not like "-Os". Setting CFLAGS back to "-O2" makes it build again.
Comment 3 Larry the Git Cow gentoo-dev 2018-10-08 15:43:25 UTC
The bug has been closed via the following commit(s):

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

commit b9fac3ab728ed3a7c0e40a69dae16681de89f5d5
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2018-10-08 13:09:05 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2018-10-08 15:43:13 +0000

    dev-libs/ocl-icd: Version bump to 2.2.12
    
    Closes: https://bugs.gentoo.org/637964
    Closes: https://bugs.gentoo.org/646122
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 dev-libs/ocl-icd/Manifest              |  1 +
 dev-libs/ocl-icd/ocl-icd-2.2.12.ebuild | 45 ++++++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+)
Comment 4 Steven Newbury 2018-12-27 10:02:01 UTC
Created attachment 558586 [details, diff]
use static inline

Proper fix would be to change the "inline" to "static inline".

With inline the compiler can choose whether to inline or not, it's only a hint.  It does so at -O2 but does not at -Os.  When it doesn't inline the function the symbol doesn't get resolved during linking unless provided elsewhere.

Using "static inline" ensures the function is also emitted in the local object scope whether inlined or not.

I've been using this patch in my gentoo-gpu Overlay for ages.
Comment 5 Ionen Wolkens gentoo-dev 2020-08-25 01:23:52 UTC
This old issue came up on the forums because user was missing -O2 (was building with no -O at all), so the issue is not limited to -Os.

It may be worth revisiting for a proper fix like the previous comment suggested. Things breaking with more optimizations is nothing special but breaking with less seems fickle and will likely cause more problems down the line as compilers and optimizations change.

https://forums.gentoo.org/viewtopic-t-1118014.html