Created attachment 194203 [details] Build Failure Output Broken with LibreSSL 2.7 build output is attached.
Could you try https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229181?
(In reply to timp87 from comment #1) Still Doesn't Succeed on LibreSSL 2.7.4, I wouldn't hold up the update to 4.0.25, if it builds cleanly with OpenSSL.
/usr/ports/www/squid-devel/work/squid-4.0.24/src/ssl/bio.cc 66 BIO * 67 Ssl::Bio::Create(const int fd, Security::Io::Type type) 68 { 69 #if HAVE_LIBCRYPTO_BIO_METH_NEW 70 if (!SquidMethods) { 71 SquidMethods = BIO_meth_new(BIO_TYPE_SOCKET, "squid"); 72 BIO_meth_set_write(SquidMethods, squid_bio_write); 73 BIO_meth_set_read(SquidMethods, squid_bio_read); 74 BIO_meth_set_puts(SquidMethods, squid_bio_puts); 75 BIO_meth_set_gets(SquidMethods, NULL); 76 BIO_meth_set_ctrl(SquidMethods, squid_bio_ctrl); 77 BIO_meth_set_create(SquidMethods, squid_bio_create); 78 BIO_meth_set_destroy(SquidMethods, squid_bio_destroy); 79 } => 80 const BIO_METHOD *useMethod = SquidMethods; 81 #else 82 BIO_METHOD *useMethod = &SquidMethods; 83 #endif If I remove const, it compiles fine. I don't know the correct solution, but I guess it is to set HAVE_LIBCRYPTO_BIO_METH_NEW to the right value.
No, the last line I wrote is not logical (HAVE_LIBCRYPTO_BIO_METH_NEW....)
Maybe: #if USE_OPENSSL const BIO_METHOD *useMethod = SquidMethods; #endif #if USE_LIBRESSL BIO_METHOD *useMethod = SquidMethods; #endif
No, does not work. But this is working: #if defined(LIBRESSL_VERSION_NUMBER) BIO_METHOD *useMethod = SquidMethods; #else const BIO_METHOD *useMethod = SquidMethods; #endif
(In reply to w.schwarzenfeld from comment #6) That worked for me as well with libressl, built in test environment. in process of rebuilding actual running jail with libressl to try it in use. It did fail when I tried to rebuild under opnessl though. libtool: link: ( cd ".libs" && rm -f "libsslutil.la" && ln -s "../libsslutil.la" "libsslutil.la" ) --- bio.lo --- bio.cc:86:28: error: use of undeclared identifier 'useMethod' if (BIO *bio = BIO_new(useMethod)) { ^ 1 error generated. *** [bio.lo] Error code 1 Added this to original patch: squid-devel/files/patch-src_ssl_bio.cc --- src/ssl/bio.cc.orig 2018-06-21 07:21:44.684311000 -0500 +++ src/ssl/bio.cc 2018-06-21 07:25:50.930483000 -0500 @@ -76,9 +76,11 @@ BIO_meth_set_create(SquidMethods, squid_bio_create); BIO_meth_set_destroy(SquidMethods, squid_bio_destroy); } - const BIO_METHOD *useMethod = SquidMethods; -#else - BIO_METHOD *useMethod = &SquidMethods; + #if defined(LIBRESSL_VERSION_NUMBER) + BIO_METHOD *useMethod = SquidMethods; + #else + const BIO_METHOD *useMethod = SquidMethods; + #endif #endif if (BIO *bio = BIO_new(useMethod)) {
(In reply to Dean E. Weimer from comment #7) Completed build in a live environment, running fine, however the issue with OpenSSL needs to be solved, its possible I didn't include the lines correctly, or took out something I wasn't supposed to. from the ssl/bio.ccc file.
It's thing of the condition, quick idea. Test this one (I don't know if I have time today to test). #if defined(LIBRESSL_VERSION_NUMBER) BIO_METHOD *useMethod = SquidMethods; #endif #if !defined(LIBRESSL_VERSION_NUMBER) const BIO_METHOD *useMethod = SquidMethods; #endif
Created attachment 194460 [details] patch-bio.cc
Tested it with 10.4 (with a little "cosmetic" change). Should work.
Created attachment 194461 [details] patch-bio.cc_v2 Forget: tested with libressl and openssl. Was a typo in it.
(In reply to w.schwarzenfeld from comment #12) Tested with 194461, and no other edits after the 4.0.25 update to the port. built and installed fine on my system running 11.2-RC3 with LibreSSL 2.7.4
Comment on attachment 194461 [details] patch-bio.cc_v2 no objections
www/squid was update to 4.1. I asked to delete www/squid-devel So the patch is this PR should be applied to www/squid now.
(In reply to timp87 from comment #15) I was able to build and install the new www/squid with 4.1 successfully with the the patch in attachment 194461 [details].
(In reply to Dean E. Weimer from comment #16) r474197 the patch, and build it correctly, the operation seems to be no problem.
looks like fixed in r474197
(In reply to Dean E. Weimer from comment #16) Thanks for the patch. I did require it on FreeBSD 11.2Stable amd64 with LibreSSL 2.7.4 to build squid-4.1_1
I agree. My port tree is at r477214, and I needed to apply the patch to compile.
Please, follow https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=231442
*** Bug 231115 has been marked as a duplicate of this bug. ***