heipei / engine-cuda

engine-cuda is a CUDA/OpenCL engine for the popular OpenSSL cryptography framework.
GNU General Public License v3.0
73 stars 27 forks source link

library not working? #3

Open blackdiamont opened 10 years ago

blackdiamont commented 10 years ago

Hi,

ive just followed your instructions and compiled the source, if i wanna test with openssl its not working:

OpenSSL> engine -t dynamic -pre SO_PATH:/usr/local/lib/engines/libcudamrg.so -pre ID:cudamrg -pre LIST_ADD:1 -pre LOAD (dynamic) Dynamic engine loading support

140018746762912:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(/usr/local/lib/engines/libcudamrg.so): /usr/local/lib/engines/libcudamrg.so: undefined symbol: cudaGetDeviceCount 140018746762912:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244: 140018746762912:error:260B6084:engine routines:DYNAMIC_LOAD:dso not found:eng_dyn.c:450: [ unavailable ]

on the other issue i saw the compiler flag -Wl,--no-as-needed but its still not working :(

Im using Ubuntu 12.04 x64 gcc-Version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) Cuda compilation tools, release 5.5, V5.5.0

EDIT: Ive tested it on Debian Wheezy and its working! YaY

heipei commented 10 years ago

Strange. I haven't worked with the code in more than two years. The error message clearly says that the shared object (the engine) can't find the cudaGetDeviceCount symbol, meaning it is not linked correctly against it. If you get it working, please document it here (and/or create a pull request).

securebrowser828 commented 10 years ago

Hello All,

Has there been a resolution to this error? I am trying to use engine-cuda and am running into the same error as shown by blackdiamont. My setup is also the same as blackdiamont, except I am using Cuda 6.0.

I tried setting up engine-cuda on a Debian Wheezy system, but I got the same error.

Thanks in advance.

EDIT: Now I am getting the same type of error, just with EVP_CIPHER_set_asn1_iv as the undefined symbol rather than cudaGetDeviceCount. Here are the error messages:

OpenSSL> engine -tt -vvvv dynamic -pre SO_PATH:/opt/lib/engines/libcudamrg.so -pre ID:cudamrg -pre LIST_ADD:1 -pre LOAD (dynamic) Dynamic engine loading support

139866030941856:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:187:filename(/opt/lib/engines/libcudamrg.so): /opt/lib/engines/libcudamrg.so: undefined symbol: EVP_CIPHER_set_asn1_iv 139866030941856:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244: 139866030941856:error:260B6084:engine routines:DYNAMIC_LOAD:dso not found:eng_dyn.c:450:

as well as

/trunk$ /opt/bin/openssl engine -vvvv cudamrg -c 140099405747872:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:187:filename(/opt/lib/engines/libcudamrg.so): /opt/lib/engines/libcudamrg.so: undefined symbol: EVP_CIPHER_set_asn1_iv 140099405747872:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244: 140099405747872:error:260B6084:engine routines:DYNAMIC_LOAD:dso not found:eng_dyn.c:450: 140099405747872:error:2606A074:engine routines:ENGINE_by_id:no such engine:eng_list.c:418:id=cudamrg

Any help would be much appreciated. Thanks!

dast99 commented 8 years ago

I was having the same issue I'm using openssl v1.0.1e on Ubuntu 14.04

OpenSSL> engine -t dynamic -pre SO_PATH:/usr/local/lib/engines/libcudamrg.so -pre ID:cudamrg -pre LIST_ADD:1 -pre LOAD (dynamic) Dynamic engine loading support

140126380431008:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:187:filename(/usr/local/lib/engines/libcudamrg.so): /usr/local/lib/engines/libcudamrg.so: undefined symbol: EVP_CIPHER_set_asn1_iv 140126380431008:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244: 140126380431008:error:260B6084:engine routines:DYNAMIC_LOAD:dso not found:eng_dyn.c:450: [ unavailable ]

I found that in the make file the LDFLAGS and LIBS variables had to go at the end of the build commands, once I changed this it worked fine

abu-naser commented 5 years ago

Hi, I also have the same issue. To solve that, I have configure the Openssl with shared option. And it worked for me. ./config --prefix=/opt shared make && sudo make install By the way, my OpenSSL version is OpenSSL 1.0.2q 20 Nov 2018 & Ubuntu 18.04 Thanks!

Hello All,

Has there been a resolution to this error? I am trying to use engine-cuda and am running into the same error as shown by blackdiamont. My setup is also the same as blackdiamont, except I am using Cuda 6.0.

I tried setting up engine-cuda on a Debian Wheezy system, but I got the same error.

Thanks in advance.

EDIT: Now I am getting the same type of error, just with EVP_CIPHER_set_asn1_iv as the undefined symbol rather than cudaGetDeviceCount. Here are the error messages:

OpenSSL> engine -tt -vvvv dynamic -pre SO_PATH:/opt/lib/engines/libcudamrg.so -pre ID:cudamrg -pre LIST_ADD:1 -pre LOAD (dynamic) Dynamic engine loading support

139866030941856:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:187:filename(/opt/lib/engines/libcudamrg.so): /opt/lib/engines/libcudamrg.so: undefined symbol: EVP_CIPHER_set_asn1_iv 139866030941856:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244: 139866030941856:error:260B6084:engine routines:DYNAMIC_LOAD:dso not found:eng_dyn.c:450:

as well as

/trunk$ /opt/bin/openssl engine -vvvv cudamrg -c 140099405747872:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:187:filename(/opt/lib/engines/libcudamrg.so): /opt/lib/engines/libcudamrg.so: undefined symbol: EVP_CIPHER_set_asn1_iv 140099405747872:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244: 140099405747872:error:260B6084:engine routines:DYNAMIC_LOAD:dso not found:eng_dyn.c:450: 140099405747872:error:2606A074:engine routines:ENGINE_by_id:no such engine:eng_list.c:418:id=cudamrg

Any help would be much appreciated. Thanks!

blackdiamont commented 5 years ago

Hi,

I didn't use it for some years but I can give it a try with Debian Stretch and see if I can help. Edit: nvm I've read the quote and not the answere lol But I'll give it a try too since this engine is great :)

-black