antimof / UxPlay

AirPlay Unix mirroring server
GNU General Public License v3.0
1.28k stars 178 forks source link

Make returns an error #18

Open ZacharieALES opened 3 years ago

ZacharieALES commented 3 years ago

Hello,

I followed the installation steps but when I reach "make" it returns an error that I do not understand:

[100%] Linking CXX executable uxplay lib/libairplay.a(crypto.c.o) : Dans la fonction « aes_reset » : /home/zach/10_Soft/UxPlay-master/lib/crypto.c:98 : référence indéfinie vers « EVP_CIPHER_CTX_reset » lib/libairplay.a(crypto.c.o) : Dans la fonction « sha_init » : /home/zach/10_Soft/UxPlay-master/lib/crypto.c:175 : référence indéfinie vers « EVP_MD_CTX_new » lib/libairplay.a(crypto.c.o) : Dans la fonction « sha_reset » : /home/zach/10_Soft/UxPlay-master/lib/crypto.c:197 : référence indéfinie vers « EVP_MD_CTX_reset » lib/libairplay.a(crypto.c.o) : Dans la fonction « sha_destroy » : /home/zach/10_Soft/UxPlay-master/lib/crypto.c:206 : référence indéfinie vers « EVP_MD_CTX_free » collect2: error: ld returned 1 exit status CMakeFiles/uxplay.dir/build.make:101 : la recette pour la cible « uxplay » a échouée make[2]: *** [uxplay] Erreur 1 CMakeFiles/Makefile2:72 : la recette pour la cible « CMakeFiles/uxplay.dir/all » a échouée make[1]: *** [CMakeFiles/uxplay.dir/all] Erreur 2 Makefile:127 : la recette pour la cible « all » a échouée make: *** [all] Erreur 2 [100%] Linking CXX executable uxplay

Do you have any idea how I can solve this? Do you need the complete make output?

eprompc commented 3 years ago

+1 Ubuntu 18.04

nokobear commented 2 years ago

I had the same problem. probably, old version of evp.h is causing it.

Following four functions are not available in my env(Ubuntu 16.04). EVP_CIPHER_CTX_reset(), EVP_MD_CTX_new(), EVP_MD_CTX_reset(), EVP_MD_CTX_free() Instead of these, following are available. EVP_CIPHER_CTX_cleanup(), EVP_MD_CTX_create(), EVP_MD_CTX_cleanup(), EVP_MD_CTX_destroy()

I solved it by editing lib/crypto.c After #include lines, insert following.

#define EVP_CIPHER_CTX_reset(a) EVP_CIPHER_CTX_cleanup(a)
#define EVP_MD_CTX_new() EVP_MD_CTX_create()
#define EVP_MD_CTX_reset(a) EVP_MD_CTX_cleanup(a)
#define EVP_MD_CTX_free(a) EVP_MD_CTX_destroy(a)

Maybe it's not a good fix, but it works well on Ubuntu 16.04.