plowshare-module-mega icon indicating copy to clipboard operation
plowshare-module-mega copied to clipboard

make error

Open hepha opened this issue 7 years ago • 7 comments

pls hellp me thanks Making install in src make[1]: Entering directory '/home/hepha/plowshare-module-mega/src' CCLD mega mega-crypto.o: In function aes_128_ctr': /home/hepha/plowshare-module-mega/src/crypto.c:182: undefined reference to AES_ctr128_encrypt' /home/hepha/plowshare-module-mega/src/crypto.c:182: undefined reference to `AES_ctr128_encrypt' collect2: error: ld returned 1 exit status make[1]: *** [Makefile:339: mega] Error 1 make[1]: Leaving directory '/home/hepha/plowshare-module-mega/src' make: *** [Makefile:338: install-recursive] Error 1

hepha avatar Jun 09 '17 09:06 hepha

Hi,

It seems that AES_ctr128_encrypt was removed in openSSL 1.1.0 ? It seems to work on my debian. Once figured out, I'll update configure.ac.

Regards, Matthieu

mcrapet avatar Jun 09 '17 10:06 mcrapet

hi i install this but not work Arch Linux - openssl 1.1.0.f-1 (x86_64) https://www.archlinux.org/packages/core/x86_64/openssl/

hepha avatar Jun 12 '17 06:06 hepha

Any news on this? I'm facing the same issue, found this: https://stackoverflow.com/questions/10718418/openssl-aes-h-linker-error-undefined-reference-to But i didn't manage to use it to fix it.

EDIT; i also found this very interesting https://stackoverflow.com/questions/44246967/how-to-convert-aes-encrypt-in-counter-mode-to-evp-interfaces but i didn't have time to dig into it.

kot7k avatar Jul 21 '17 10:07 kot7k

Hi, I have Arch GNU/Linux, with OpenSSL 1.1.0g 2 Nov 2017 installed, which wouldn't work, with the same error above, but I was able to work around this issue, here's how I did it:

  1. Install the openssl-1.0 package.
  2. Run ./configure with the following arguments:
./configure --enable-local OPENSSL_LIBS='-L/usr/lib/openssl-1.0 -lssl -lcrypto' OPENSSL_CFLAGS='-I/usr/include/openssl-1.0'
  1. run make

It should work.

sheeit avatar Feb 08 '18 21:02 sheeit

Hi, I have Arch GNU/Linux, with OpenSSL 1.1.0g 2 Nov 2017 installed, which wouldn't work, with the same error above, but I was able to work around this issue, here's how I did it:

1. Install the [openssl-1.0](https://www.archlinux.org/packages/?name=openssl-1.0) package.

2. Run ./configure with the following arguments:
./configure --enable-local OPENSSL_LIBS='-L/usr/lib/openssl-1.0 -lssl -lcrypto' OPENSSL_CFLAGS='-I/usr/include/openssl-1.0'
1. run `make`

It should work.

I'm running Arch Linux ARM, had the same issue as described by OP, then tried sheeit's method, and now get the following error. Any suggestions?

Making all in src
make[1]: Entering directory '/home/user/.config/plowshare/modules.d/mega.git/src'
  CCLD     mega
/usr/bin/ld: mega-crypto.o: in function `main':
/home/user/.config/plowshare/modules.d/mega.git/src/crypto.c:470: undefined reference to `OPENSSL_init_crypto'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:339: mega] Error 1
make[1]: Leaving directory '/home/user/.config/plowshare/modules.d/mega.git/src'
make: *** [Makefile:338: all-recursive] Error 1

oimaasi avatar Sep 16 '18 16:09 oimaasi

Strangely, I repeated the whole process from scratch and now it works. Anyway, many thanks for sharing the work around for Arch.

oimaasi avatar Sep 16 '18 18:09 oimaasi

Hello @mcrapet, I figured out the problem in crypto.c: AES_ctr128_encrypt was depreciated in openssl. For a workaround, I added openssl/modes.h header and changed AES_ctr128_encrypt with CRYPTO_ctr128_encrypt. This seems to work just fine on my Ubuntu 18.04 so I created a pull request.

yellowjacketcoder avatar Aug 27 '19 08:08 yellowjacketcoder