Libgourou

Issue 50: Compilation on Debian 11

Reported by sid sloth, Apr 5, 2023

Steps to reproduce the problem:

1. O/S: Debian 11 bullseye; all dependencies installed.
2. clone repos for libgourou and updfparser.
3. copy updfparser folder under libgourou/lib/updfparser.
4. terminal command in libgourou folder: `$ make DEBUG=0 all clean`

Expected result: successful compilation.

Actual result:

```
$ make DEBUG=0 all clean
Building libgourou 0.8.1
make -C utils ROOT=/home/user/source/soutade/libgourou CXX=g++ AR=ar 
DEBUG=0 STATIC_UTILS= DEST_DIR= PREFIX=/usr/local
make[1]: Entering directory 
'/home/user/source/soutade/libgourou/utils'
g++ -Wall -fPIC -I/home/user/source/soutade/libgourou/include -ggdb 
-O0 -DDEBUG drmprocessorclientimpl.cpp utils_common.cpp 
-L/home/user/source/soutade/libgourou -lcrypto -lzip -lz -lcurl 
-lpugixml -lgourou -c
drmprocessorclientimpl.cpp: In member function ‘virtual void 
DRMProcessorClientImpl::RSAPrivateEncrypt(const unsigned char*, 
unsigned int, gourou::RSAInterface::RSA_KEY_TYPE, const string&, 
const unsigned char*, unsigned int, unsigned char*)’:
drmprocessorclientimpl.cpp:345:14: error: ‘EVP_PKEY_get_size’ was 
not declared in this scope; did you mean ‘EVP_PKEY_get_attr’?
  345 |     outlen = EVP_PKEY_get_size(pkey);
      |              ^~~~~~~~~~~~~~~~~
      |              EVP_PKEY_get_attr
drmprocessorclientimpl.cpp: In member function ‘virtual void* 
DRMProcessorClientImpl::generateRSAKey(int)’:
drmprocessorclientimpl.cpp:454:5: error: 
‘EVP_PKEY_CTX_set1_rsa_keygen_pubexp’ was not declared in this 
scope; did you mean ‘EVP_PKEY_CTX_set_rsa_keygen_pubexp’?
  454 |     EVP_PKEY_CTX_set1_rsa_keygen_pubexp(ctx, bn);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |     EVP_PKEY_CTX_set_rsa_keygen_pubexp
make[1]: *** [Makefile:34: utils.a] Error 1
make[1]: Leaving directory 
'/home/user/source/soutade/libgourou/utils'
make: *** [Makefile:89: build_utils] Error 2
```

Comment 1 by Grégory Soutadé, Apr 5, 2023

You need libssl-dev with OpenSSL 3, but it doesn't seem available in 
bullseye...

you can use AppImage or try to compile v0.7.2

Status: WontFix

Comment 2 by sid sloth, Apr 5, 2023

okee-dokee!

Comment 3 by sid sloth, Apr 5, 2023

The thing is, not even the AppImage works:

```
$ ./acsmdownloader 723caf6a-0e27-44be-8733-904cede39cd2.acsm 
terminate called after throwing an instance of 'gourou::Exception'
  what():  Exception code : 0x500e
Message        : Error, OpenSSL legacy provider not available

Aborted

```

Comment 4 by Grégory Soutadé, Apr 5, 2023

I uploaded a new AppImage. Can you test it ?

Comment 5 by sid sloth, Apr 6, 2023

Where did you put the new AppImage?
still here?
https://soutade.fr/files/libgourou_utils-0.8.1-x86_64.AppImage.tar.gz

Comment 6 by sid sloth, Apr 6, 2023

downloaded the appimage archive

reusing adept folder created previously by 'knock' under:
/home/user/.local/share/knock/acsm

extract the appimage archive, cd into it.

$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD
$ export ADEPT_DIR=/home/user/.local/share/knock/acsm
$ ./acsmdownloader URLLink.acsm
$ ./adept_remove name-of-book.epub
$ ./adept_remove name-of-book.pdf

Tested both pdf and epub samples from adobe sample library.
Both work. THANK YOU!

Created: 5 months 18 days ago by sid sloth

Updated: 5 months 16 days ago

Status: WontFix

Followed by: 1 person

Labels:
Priority:Medium
Type:Defect