crypto.mod, OpenSSL and Ubuntu Linux 7.10 ...

BlitzMax Forums/Brucey's Modules/crypto.mod, OpenSSL and Ubuntu Linux 7.10 ...

lodger(Posted 2008) [#1]
I've just downloaded and installed the crypto module for BlitzMax (1.28). Unfortunately, on Ubuntu Linux 7.10 I get the following error when trying to compile the examples (I've already installed the OpenSSL + OpenSSL development packages.):


Linking:encrypt_decrypt /home/nhaede/Desktop/BlitzMax/mod/bah.mod/crypto.mod/crypto.release.linux.x86.a(crypto.bmx.release.linux.x86.o): In function `bah_crypto_EVP_CIPHER_rc5_32_12_16_cbc': (code+0x8cf): undefined reference to `EVP_rc5_32_12_16_cbc' /home/nhaede/Desktop/BlitzMax/mod/bah.mod/crypto.mod/crypto.release.linux.x86.a(crypto.bmx.release.linux.x86.o): In function `bah_crypto_EVP_CIPHER_rc5_32_12_16_ecb': (code+0x8f1): undefined reference to `EVP_rc5_32_12_16_ecb' /home/nhaede/Desktop/BlitzMax/mod/bah.mod/crypto.mod/crypto.release.linux.x86.a(crypto.bmx.release.linux.x86.o): In function `bah_crypto_EVP_CIPHER_rc5_32_12_16_cfb': (code+0x913): undefined reference to `EVP_rc5_32_12_16_cfb' /home/nhaede/Desktop/BlitzMax/mod/bah.mod/crypto.mod/crypto.release.linux.x86.a(crypto.bmx.release.linux.x86.o): In function `bah_crypto_EVP_CIPHER_rc5_32_12_16_ofb': (code+0x935): undefined reference to `EVP_rc5_32_12_16_ofb' collect2: ld returned 1 exit status Build Error: Failed to link /home/nhaede/Desktop/BlitzMax/mod/bah.mod/crypto.mod/examples/encrypt_decrypt Process complete

However, on OS X Leopard there is no problem compiling and linking the demo app. So I guess this is a Linux / Ubuntu specific problem. Does anyone know how to make things work?


Brucey(Posted 2008) [#2]
As a quick fix, try changing

line 570 of crypto.bmx from
?Not Win32

to
?MacOS


and line 121 of common.bmx in the same way, and see how it goes.

Seems that those functions must only available on OS X for some reason...

thanks.


lodger(Posted 2008) [#3]
Yes, it works!!! Your changes make crypto.mod work perfect on Linux now - thanks for helping me out that quick. :)