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

Missing file on extraction #33

Closed
Pseudonym96 opened this issue Nov 5, 2016 · 6 comments
Closed

Missing file on extraction #33

Pseudonym96 opened this issue Nov 5, 2016 · 6 comments

Comments

@Pseudonym96
Copy link

Pseudonym96 commented Nov 5, 2016

I extracted the Silentarmy master folder and ran the make command, but it did not provide the Sa solver file. Here is the cmd line error

echo 'const char *ocl_code = R"mrb(' >_kernel.h
cpp input.cl >>_kernel.h
echo ')mrb";' >>_kernel.h
gcc -std=gnu99 -pedantic -Wextra -Wall -ggdb -Wno-deprecated-declarations -Wno-overlength-strings -I"/opt/AMDAPPSDK-3.0/include" -c -o main.o main.c
gcc -std=gnu99 -pedantic -Wextra -Wall -ggdb -Wno-deprecated-declarations -Wno-overlength-strings -I"/opt/AMDAPPSDK-3.0/include" -c -o blake.o blake.c
gcc -std=gnu99 -pedantic -Wextra -Wall -ggdb -Wno-deprecated-declarations -Wno-overlength-strings -I"/opt/AMDAPPSDK-3.0/include" -c -o sha256.o sha256.c
gcc -o sa-solver main.o blake.o sha256.o -rdynamic -L"/opt/amdgpu-pro/lib/x86_64-linux-gnu" -lOpenCL
/usr/bin/ld: cannot find -lOpenCL
collect2: error: ld returned 1 exit status
Makefile:20: recipe for target 'sa-solver' failed
make: *** [sa-solver] Error 1

@ghost
Copy link

ghost commented Nov 5, 2016

@Untuchabull looks like compiler can't find your OpenCL library:

/usr/bin/ld: cannot find -lOpenCL

@Pseudonym96
Copy link
Author

How do I fix this? :(

@mbevand
Copy link
Owner

mbevand commented Nov 5, 2016

Can you find where is the OpenCL lib on your system?:

find / -name "libOpenCL.so*" 2>/dev/null

@Pseudonym96
Copy link
Author

Pseudonym96 commented Nov 5, 2016

I got this after running that command: /opt/AMDAPPSDK-3.0/lib/x86/libOpenCL.so
/opt/AMDAPPSDK-3.0/lib/x86/libOpenCL.so.1
/opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so
/opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libOpenCL.so
/opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libOpenCL.so.1
/usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0.0
/usr/lib/x86_64-linux-gnu/libOpenCL.so.1
/usr/share/man/man7/libOpenCL.so.7.gz

Sorry I am a super scrub haha, this is my first time using Linux and diving into the world of crypto currency mining

@mbevand
Copy link
Owner

mbevand commented Nov 5, 2016

Compile with this command and it will work:

make LIBOPENCL=/opt/AMDAPPSDK-3.0/lib/x86_64

The reason of your problem is because for some reason the AMDGPU-PRO driver doesn't create a .so file but instead a .so.1 -- however you can just tell it to use the .so installed by AMDAPPSDK

Alternatively if you don't want to use this complicated make command every time you want to compile it, you can fix the problem permanently on your system by creating a symlink:

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

Then just compile with:

make

Good luck :)

@mbevand mbevand closed this as completed Nov 5, 2016
@Pseudonym96
Copy link
Author

ok, I got rid of all the previous files and I am installing everything from scratch again, I will try this shortly, thank you so much!

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

No branches or pull requests

2 participants