ElektraInitiative / libelektra

Elektra serves as a universal and secure framework to access configuration settings in a global, hierarchical key database.
https://www.libelektra.org
BSD 3-Clause "New" or "Revised" License
208 stars 123 forks source link

compile_openssl.c does not compile on debian stretch #1437

Closed reox closed 7 years ago

reox commented 7 years ago

The CMAKE OpenSSL search fails, because the short test snippet can not be compiled:

vmmanage@build-stretch-amd64:~/tmpbuilddir/libelektra/src/plugins/crypto$ gcc compile_openssl.c 
compile_openssl.c: In function ‘main’:
compile_openssl.c:14:17: error: storage size of ‘opensslSpecificType’ isn’t known
  EVP_CIPHER_CTX opensslSpecificType;
                 ^~~~~~~~~~~~~~~~~~~

On a jessie Machine this works.

$ openssl version OpenSSL 1.1.0e 16 Feb 2017

markus2330 commented 7 years ago

Thanks for reporting! We had the same idea ;)

petermax2 commented 7 years ago

Thx for reporting. I will look into it in the evening.

markus2330 commented 7 years ago

I will look into it in the evening.

Thank you!

Related to this issue, the testmod_crypto_openssl fails with our Debian packages (because the openssl plugin got excluded while building as reported here).

CYPTO        TESTS
==================

/home/jenkins/workspace/workspace/elektra-git-buildpackage-jessie/libelektra/src/plugins/crypto/test_internals.h:116: error in test_init: failed to open the plugin
/home/jenkins/workspace/workspace/elektra-git-buildpackage-jessie/libelektra/src/plugins/crypto/test_internals.h:152: error in test_incomplete_config: failed to open the plugin

crypto_openssl RESULTS: 7 test(s) done. 2 error(s).

crypto_gcrypt and crypto_botan are now already part of our Debian packages and work like a charm!

petermax2 commented 7 years ago

@reox Can you please confirm that 4c68b3ac2a47bb023f236fdc642a36e5782006c3 fixes the compile error on Debian Stretch?

petermax2 commented 7 years ago

@markus2330 I think it would be a good idea if the build server built for Stretch too.

markus2330 commented 7 years ago

The build server does so on request! See doc/GIT.md, you simply have to say jenkins build gcc-configure-debian-stretch please in the PR.

markus2330 commented 7 years ago

In the second environment less built of https://build.libelektra.org/job/elektra-mergerequests-unstable/1024/consoleFull OpenSSL seems to fail again?

-- OpenSSL compile/linker test failed
-- Exclude Plugin crypto_openssl because OpenSSL development files not found
petermax2 commented 7 years ago

@markus2330 is the libssl-dev package installed on unstable?

petermax2 commented 7 years ago

It's strange because in the same log crypto_openssl was built and the test cases passed:

[ 49%] Built target testmod_crypto_openssl
[ 59%] Built target elektra-crypto_openssl

        Start  39: testmod_crypto_openssl
 39/153 Test  #39: testmod_crypto_openssl .............   Passed    0.97 sec
markus2330 commented 7 years ago

Yes, seems like multiple cmake passes pollute the cache? Is a not-so-important separate problem, though.

petermax2 commented 7 years ago

Yes, seems like multiple cmake passes pollute the cache? Is a not-so-important separate problem, though.

OK so let's close this issue then.