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

"/usr/bin/ld: cannot find -lOpenCL" build error on Ubuntu 16.04 #54

Closed
peterVG opened this issue Oct 31, 2016 · 3 comments
Closed

"/usr/bin/ld: cannot find -lOpenCL" build error on Ubuntu 16.04 #54

peterVG opened this issue Oct 31, 2016 · 3 comments

Comments

@peterVG
Copy link

@peterVG peterVG commented Oct 31, 2016

I have done 2 clean install and uninstalls of the AMDGPU-Pro Driver (Version 16.40 for Ubuntu 16.04) as per the build instructions & link but I keep getting the "/usr/bin/ld: cannot find -lOpenCL" error when I execute the "$ ./zcutil/build.sh -j$(nproc)" command. My clinfo output indicates that OpenCL is correctly installed so I'm guessing that something about my setup (all brand new, straight out-of-box installation) makes it so that the Zogminer build doesn't have the right dynamic links to my OpenGL library?

My specs: Intel i5 AMD RX470 Ubuntu 16.04

~$ clinfo
Number of platforms 1
Platform Name AMD Accelerated Parallel Processing
Platform Vendor Advanced Micro Devices, Inc.
Platform Version OpenCL 2.0 AMD-APP (2117.10)
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd cl_amd_event_callback cl_amd_offline_devices
Platform Extensions function suffix AMD

Platform Name AMD Accelerated Parallel Processing
Number of devices 2
Device Name Ellesmere
Device Vendor Advanced Micro Devices, Inc.
Device Vendor ID 0x1002
Device Version OpenCL 1.2 AMD-APP (2117.10)
Driver Version 2117.10 (VM)
Device OpenCL C Version OpenCL C 1.2
Device Type GPU
Device Profile FULL_PROFILE

@strusty
Copy link

@strusty strusty commented Oct 31, 2016

must simlink:
lrwxrwxrwx 1 root root 23 Oct 30 07:12 libOpenCL.so -> /usr/lib/libOpenCL.so.1

@peterVG
Copy link
Author

@peterVG peterVG commented Oct 31, 2016

Ah yes, apologies, I should have checked closed issues. I see this was already addressed in #4 and #18.

FYI. In my case I eventually found the OpenCL libraries in /usr/lib/x86_64-linux-gnu/ so this did the trick:

sudo ln -s /usr/lib/x86_64-linux-gnu/libOpenCL.so.1 /usr/lib/libOpenCL.so

@peterVG peterVG closed this Oct 31, 2016
@alexcdot
Copy link

@alexcdot alexcdot commented May 18, 2019

FYI, on the Nvidia jetson tx2, I had to run
sudo ln -s /usr/lib/aarch64-linux-gnu/libOpenCL.so.1 /usr/lib/libOpenCL.so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants