Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use RTLD_DEFAULT to unbreak on non-Linux #57

Closed
wants to merge 1 commit into from
Closed

Use RTLD_DEFAULT to unbreak on non-Linux #57

wants to merge 1 commit into from

Conversation

jbeich
Copy link
Contributor

@jbeich jbeich commented Nov 26, 2020

clinfo fails to look up available libOpenCL symbols and falls back to 1.0.

clinfo/src/clinfo.c

Lines 3040 to 3042 in 59d0daf

/* Initialize icdl_data ret versions */
icdl.detected_version = 10;
icdl.reported_version = 0;

$ pkg install clinfo intel-compute-runtime
$ clinfo
[...]
        NOTE:   your OpenCL library declares to support OpenCL 2.2,
                but it seems to support up to OpenCL 1.0 only.
        NOTE:   your OpenCL library only supports OpenCL 1.0,
                but some installed platforms support OpenCL 3.0.
                Programs using 3.0 features may crash
                or behave unexpectedly

$ pkg info -x opencl ocl
opencl-2.2_2
ocl-icd-2.2.12

https://github.com/DragonFlyBSD/DragonFlyBSD/blob/v5.8.3/include/dlfcn.h#L59-L65
https://github.com/freebsd/freebsd/blob/releng/12.2/include/dlfcn.h#L62-L67
https://github.com/NetBSD/src/blob/2518280dc5e5/include/dlfcn.h#L84-L89
https://github.com/openbsd/src/blob/88eb9092f38b/include/dlfcn.h#L46-L51
https://github.com/illumos/illumos-gate/blob/4e0c5eff9af3/usr/src/head/dlfcn.h#L127-L137

On BSD-like and Solaris-like systems RTLD_DEFAULT is ((void *) -2)
@Oblomov
Copy link
Owner

Oblomov commented Nov 27, 2020

Ugh, thanks for catching this, I cherry picked your comment and pushed to the latest master.

(I keep telling myself that I should get me a BSD VM for testing these stuff locally when making big changes, but I keep procrastinating.)

@Oblomov Oblomov closed this Nov 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants