Re: Building with tools/dev/unix-build/Makefile.svn - problems linking with OpenSSL
Den lör 11 nov. 2023 kl 17:14 skrev Stefan Sperling : > On Sat, Nov 11, 2023 at 05:08:28PM +0100, Daniel Sahlberg wrote: > > ne_openssl.o isn't built, the build fails already when running configure > on > > neon. > > Can you show the cofigure log? E.g. via paste.apache.org? > I am also in #svn-dev on Libera IRC if you want to chat there. > The discussion between Stefan and myself continued over on Libera IRC but to tie up the loose end. It was an error on my system, I was missing pkg-config. After installing this, the neon configure worked well and I'm back on track again (or at least, stuck on other thinkgs that i need to look at). Thanks Stefan! Kind regards, Daniel
Re: Building with tools/dev/unix-build/Makefile.svn - problems linking with OpenSSL
On Sat, Nov 11, 2023 at 05:08:28PM +0100, Daniel Sahlberg wrote: > ne_openssl.o isn't built, the build fails already when running configure on > neon. Can you show the cofigure log? E.g. via paste.apache.org? I am also in #svn-dev on Libera IRC if you want to chat there.
Re: Building with tools/dev/unix-build/Makefile.svn - problems linking with OpenSSL
Den lör 11 nov. 2023 kl 16:43 skrev Stefan Sperling : > On Sat, Nov 11, 2023 at 04:34:07PM +0100, Stefan Sperling wrote: > > On Sat, Nov 11, 2023 at 04:23:52PM +0100, Daniel Sahlberg wrote: > > > As for the original problem, updating to the latest version of the Neon > > > library doesn't help, I still get the same linking error. I''m sure > there > > > is something fishy with my Debian install... > > > > Which libssl is your build trying to use? > The libssl-dev package, which is OpenSSL version 1.1.1w-0+deb11u1. > > > > There is nothing in Makefile.svn that would try to pick a particular > > version of OpenSSL. It just expects that a compatible version is > > already installed. > > > > Maybe you have multiple versions installed and that confuses things? > Don't think so. There is only one libssl.a (and libssl.so) on my system. Doing nm -g | grep OPENSSL_init_ssl (which is not the function in the error message but as I've written before SSL_library_init is just a #define for OPENSSL_init_ssl, with the appropriate define for OPENSSL_API_COMPAT) finds: 00270 T OPENSSL_init_ssl > What is the output of this command on your system (in the ~/svn > build dir): > > nm objdir/neon-0.32.5/src/ne_openssl.o | grep -i SSL_library_init > > This doesn't print anything for me. If this shows the symbol > on your system that would indicate a wrong OPENSSL_VERSION macro > being used during the build. > ne_openssl.o isn't built, the build fails already when running configure on neon. Kind regards, Daniel
Re: Building with tools/dev/unix-build/Makefile.svn - problems linking with OpenSSL
On Sat, Nov 11, 2023 at 04:34:07PM +0100, Stefan Sperling wrote: > On Sat, Nov 11, 2023 at 04:23:52PM +0100, Daniel Sahlberg wrote: > > As for the original problem, updating to the latest version of the Neon > > library doesn't help, I still get the same linking error. I''m sure there > > is something fishy with my Debian install... > > Which libssl is your build trying to use? > > There is nothing in Makefile.svn that would try to pick a particular > version of OpenSSL. It just expects that a compatible version is > already installed. > > Maybe you have multiple versions installed and that confuses things? What is the output of this command on your system (in the ~/svn build dir): nm objdir/neon-0.32.5/src/ne_openssl.o | grep -i SSL_library_init This doesn't print anything for me. If this shows the symbol on your system that would indicate a wrong OPENSSL_VERSION macro being used during the build.
Re: Building with tools/dev/unix-build/Makefile.svn - problems linking with OpenSSL
On Sat, Nov 11, 2023 at 04:23:52PM +0100, Daniel Sahlberg wrote: > As for the original problem, updating to the latest version of the Neon > library doesn't help, I still get the same linking error. I''m sure there > is something fishy with my Debian install... Which libssl is your build trying to use? There is nothing in Makefile.svn that would try to pick a particular version of OpenSSL. It just expects that a compatible version is already installed. Maybe you have multiple versions installed and that confuses things?
Re: Building with tools/dev/unix-build/Makefile.svn - problems linking with OpenSSL
On Sat, Nov 11, 2023 at 04:07:52PM +0100, Stefan Sperling wrote: > On Sat, Nov 11, 2023 at 04:00:58PM +0100, Stefan Sperling wrote: > > On Sat, Nov 11, 2023 at 03:53:09PM +0100, Stefan Sperling wrote: > > > If neon requests OPENSSL_API_COMPAT 0x1000L and also calls > > > OPENSSL_init_ssl() then that is a bug in neon. > > > > The neon version used by Makefile.svn is quite old. > > Newer releases are available here: https://notroj.github.io/neon/ > > You could try using the latest 0.32.5 release instead of 0.30.2. > > That should deal just fine with newer versions of OpenSSL. > > This should be enough to get started: Building with this I got an error during 'make install' in neon. I could fix that by installing xmlto and calling the 'make docs' target explicitly. I have committed these changes. The update was long overdue in any case.
Re: Building with tools/dev/unix-build/Makefile.svn - problems linking with OpenSSL
Den lör 11 nov. 2023 kl 15:54 skrev Stefan Sperling : > On Sat, Nov 11, 2023 at 02:22:55PM +0100, Daniel Sahlberg wrote: > > Hi, > > > > I'm separating this out to a new thread since it doesn't relate to the > > upcoming release, but I'm doing the work trying to reproduce Nathan's > > problem. > > > > I've installed Debian Bullseye (on Hyper-V, but that shouldn't matter I > > think). When I try to do the build, I end up having trouble building > neon. > > The error message is "could not find library containing > SSL_library_init". > > I have checked that the package libssl-dev is installed (with version > > 1.1.1w-0+deb11u1). > > > > I've tried a very simple file: > > #include > > int main(void) > > { > > SSL_library_init(); > > return 0; > > } > > > > $ gcc -lssl -lcrypto -DOPENSSL_API_COMPAT=0x1000L ssl.c > > [..] undefined reference to OPENSSL_init_ssl [...] > > > > This makes sense, since ssl.h defines SSL_library_init() as > > OPENSSL_init_ssl(0, NULL) (protected by an #if checking > OPENSSL_API_COMPAT > > < 0x1010L). > > > > This function first appeared in OpenSSL 1.1.0. > Which means trying to call it on earlier version of OpenSSL is an > expected failure. > I've got OpenSSL 1.1.1w. The code is calling SSL_library_init which is a define pointing to OPENSSL_init_ssl(). The code compiles just fine, but I don't understand why the code isn't linking. As for the original problem, updating to the latest version of the Neon library doesn't help, I still get the same linking error. I''m sure there is something fishy with my Debian install... Cheers, Daniel
Re: Building with tools/dev/unix-build/Makefile.svn - problems linking with OpenSSL
On Sat, Nov 11, 2023 at 04:00:58PM +0100, Stefan Sperling wrote: > On Sat, Nov 11, 2023 at 03:53:09PM +0100, Stefan Sperling wrote: > > If neon requests OPENSSL_API_COMPAT 0x1000L and also calls > > OPENSSL_init_ssl() then that is a bug in neon. > > The neon version used by Makefile.svn is quite old. > Newer releases are available here: https://notroj.github.io/neon/ > You could try using the latest 0.32.5 release instead of 0.30.2. > That should deal just fine with newer versions of OpenSSL. This should be enough to get started: Index: Makefile.svn === --- Makefile.svn(revision 1913716) +++ Makefile.svn(working copy) @@ -118,7 +118,7 @@ APR_UTIL_VER = 1.6.1 PCRE_VER = 8.41 HTTPD_VER = 2.4.37 -NEON_VER = 0.30.2 +NEON_VER = 0.32.5 SERF_VER = 1.3.10 CYRUS_SASL_VER = 2.1.28 SQLITE_VER = 3390400 @@ -157,7 +157,7 @@ SHA256_${GNU_ICONV_DIST} = ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178 SHA256_${PCRE_DIST} = 244838e1f1d14f7e2fa7681b857b3a8566b74215f28133f14a8f5e59241b682c SHA256_${HTTPD_DIST} = aa97a834a32d51974be8d8a013b561e28d327387cb1da2c3c2762acd0146aabd -SHA256_${NEON_DIST} = db0bd8cdec329b48f53a6f00199c92d5ba40b0f015b153718d1b15d3d967fbca +SHA256_${NEON_DIST} = 4872e12f802572dedd4b02f870065814b2d5141f7dbdaf708eedab826b51a58a SHA256_${CYRUS_SASL_DIST} = 7ccfc6abd01ed67c1a0924b353e526f1b766b21f42d4562ee635a8ebfc5bb38c SHA256_${SQLITE_DIST} = f31d445b48e67e284cf206717cc170ab63cbe4fd7f79a82793b772285e78fdbb SHA256_${LIBMAGIC_DIST} = 694c2432e5240187524c9e7cf1ec6acc77b47a0e19554d34c14773e43dbbf214 @@ -212,8 +212,7 @@ APR_UTIL_URL = https://svn.apache.org/repos/asf/apr/apr-util PCRE_URL = https://downloads.sourceforge.net/project/pcre/pcre/$(PCRE_VER)/$(PCRE_DIST) HTTPD_URL = https://archive.apache.org/dist/httpd/$(HTTPD_DIST) -#NEON_URL = http://webdav.org/neon/$(NEON_DIST) -NEON_URL = http://ftp.openbsd.org/pub/OpenBSD/distfiles/$(NEON_DIST) +NEON_URL = https://notroj.github.io/neon/$(NEON_DIST) SERF_URL = https://svn.apache.org/repos/asf/serf/tags/$(SERF_VER) SQLITE_URL = https://www.sqlite.org/2022/$(SQLITE_DIST) CYRUS_SASL_URL = https://github.com/cyrusimap/cyrus-sasl/releases/download/cyrus-sasl-${CYRUS_SASL_VER}/$(CYRUS_SASL_DIST)
Re: Building with tools/dev/unix-build/Makefile.svn - problems linking with OpenSSL
On Sat, Nov 11, 2023 at 03:53:09PM +0100, Stefan Sperling wrote: > If neon requests OPENSSL_API_COMPAT 0x1000L and also calls > OPENSSL_init_ssl() then that is a bug in neon. The neon version used by Makefile.svn is quite old. Newer releases are available here: https://notroj.github.io/neon/ You could try using the latest 0.32.5 release instead of 0.30.2. That should deal just fine with newer versions of OpenSSL.
Re: Building with tools/dev/unix-build/Makefile.svn - problems linking with OpenSSL
On Sat, Nov 11, 2023 at 02:22:55PM +0100, Daniel Sahlberg wrote: > Hi, > > I'm separating this out to a new thread since it doesn't relate to the > upcoming release, but I'm doing the work trying to reproduce Nathan's > problem. > > I've installed Debian Bullseye (on Hyper-V, but that shouldn't matter I > think). When I try to do the build, I end up having trouble building neon. > The error message is "could not find library containing SSL_library_init". > I have checked that the package libssl-dev is installed (with version > 1.1.1w-0+deb11u1). > > I've tried a very simple file: > #include > int main(void) > { > SSL_library_init(); > return 0; > } > > $ gcc -lssl -lcrypto -DOPENSSL_API_COMPAT=0x1000L ssl.c > [..] undefined reference to OPENSSL_init_ssl [...] > > This makes sense, since ssl.h defines SSL_library_init() as > OPENSSL_init_ssl(0, NULL) (protected by an #if checking OPENSSL_API_COMPAT > < 0x1010L). > This function first appeared in OpenSSL 1.1.0. Which means trying to call it on earlier version of OpenSSL is an expected failure. > I've tried changing the order of the libraries (-lcrypto -lssl) with the > same result. > > I'm sure I'm missing something simple but I've spent the better half of a > day figuring out what. If neon requests OPENSSL_API_COMPAT 0x1000L and also calls OPENSSL_init_ssl() then that is a bug in neon.
Re: Building with tools/dev/unix-build/Makefile.svn - problems linking with OpenSSL
Hello, On 2023/11/11 22:22, Daniel Sahlberg wrote: Hi, I'm separating this out to a new thread since it doesn't relate to the upcoming release, but I'm doing the work trying to reproduce Nathan's problem. I've installed Debian Bullseye (on Hyper-V, but that shouldn't matter I think). When I try to do the build, I end up having trouble building neon. The error message is "could not find library containing SSL_library_init". I have checked that the package libssl-dev is installed (with version 1.1.1w-0+deb11u1). https://www.openssl.org/docs/manmaster/man3/SSL_library_init.html says: "The SSL_library_init() and OpenSSL_add_ssl_algorithms() functions were deprecated in OpenSSL 1.1.0 by OPENSSL_init_ssl(). " Cheers, -- Yasuhito FUTATSUKI