xar icon indicating copy to clipboard operation
xar copied to clipboard

Fails to build against OpenSSL version 1.1.0g

Open erikd opened this issue 7 years ago • 11 comments

#Configure fails at:

checking openssl/evp.h usability... yes
checking openssl/evp.h presence... yes
checking for openssl/evp.h... yes
checking for OpenSSL_add_all_ciphers in -lcrypto... no
configure: error: Cannot build without libcrypto (OpenSSL)
Error 0 in ./configure

I have OpenSSL version 1.1.0g instatlled.

I'd fix this, but I'm already to deep down the yak stack.

erikd avatar Dec 31 '17 00:12 erikd

@erikd do we have a work around for this?

eshwarz avatar Mar 19 '18 07:03 eshwarz

We? I don't. No idea if anyone else does.

erikd avatar Mar 19 '18 07:03 erikd

In OpenSSL 1.1.x the function OpenSSL_add_all_ciphers was deprecated and replaced with OPENSSL_init_crypto:

https://www.openssl.org/docs/man1.1.0/crypto/OpenSSL_add_all_ciphers.html

in configure.ac I replaced the OpenSSL_add_all_ciphers line with this:

AC_CHECK_LIB([crypto], [OPENSSL_init_crypto], , [have_libcrypto="0"])

then reran autogen.sh and that fixes the build for me on Fedora 26. At first glance xar seems to run fine.

armijnhemel avatar Apr 09 '18 18:04 armijnhemel

@armijnhemel Would be great if could you raise a PR with those changes.

erikd avatar Apr 09 '18 21:04 erikd

I will first need to run a few more tests to see if it actually works as expected before I create a PR. Also, this change will break building with openssl 1.0.x and I would also need to work around that.

armijnhemel avatar Apr 09 '18 22:04 armijnhemel

Obviously, this is not my project, but I honestly don't think backwards compatibility with an older version of OpenSSL is an important factor. OpenSSL is an important security related library with a somewhat checkered history security wise. Supporting old, possible broken versions doesn't make a lot of sense, especially since 1.1.* has been out for for over a year. See https://www.openssl.org/news/openssl-1.1.0-notes.html

erikd avatar Apr 10 '18 00:04 erikd

The change @ErikGoldman did here https://github.com/loft-box-labs/xar/commit/bab8837fd993385115d58763e15487dc8cc13f97 (probably via https://github.com/mackyle/xar/issues/18#issuecomment-379841536) worked perfectly for me.

janpio avatar Sep 11 '18 16:09 janpio

This is still broken, or possibly broken again. I have followed the suggestions her, but still missing libcrypto. I suspect that it is because the standard version for Ubuntu 18.04 is now openssl v1.1.1.g and the dev library is just 1.1

jds11111 avatar Aug 18 '20 11:08 jds11111

Same here on Debian testing. I have libssl-dev 1.1.1h-1 and libcrypt-dev 1:4.4.17-1 installed. No progress.

baryluk avatar Nov 17 '20 17:11 baryluk

The last commit to the master branch has been made in 2014 - I guess this project is no longer active and the chances that one of the proposed pull requests will ever be merged are pretty thin. @mackyle Do you have an update on the project status? Please? :-D

ckujau avatar Nov 18 '20 21:11 ckujau

I used LibreSSL built locally since it is OpenSSL v1.0.0 compatible. It is pretty simple to build because it uses CMake, then I just install in a local directory and pass the CFLAGS and LDFLAGS to the ./configure command

palmerc avatar Mar 29 '22 17:03 palmerc