From nobody Sun Oct 15 19:12:58 2023 X-Original-To: ports-bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S7qdQ585Xz4xHnt for ; Sun, 15 Oct 2023 19:12:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S7qdQ1pNrz4jy8 for ; Sun, 15 Oct 2023 19:12:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697397178; a=rsa-sha256; cv=none; b=V4gDvzPtuyOPK5cuuJ6o9aa3yKIRtharu5jbgET7USr2JMOFMoxLeix+N903hyZtZQ39Fe iDisAXQbhfFMbHg5BlOIaTxw8VrE1vQDeNA56AFIks/t2ffyHsAjdrVmPj4rskBHbIOqu9 7g8GR8j7m1SzbhAq9CIepgdqdYOclaFosd6BUfm6dGyPDxNFMA8pEVQm64H7HdIzhjJFbR I3iZk1b63YBJ7ikDhe0tQf/c1Opr37hu0chK1MF9we0kTkscYQTby1Zd3xu349rM6rMsfx r2w4+CYpFmqK26XTe/Y5ns6nTQeFkvLTGoUss2bOivTfGY0RpBuycqIdJ6yaRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697397178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Byml9FY50CdboFcgNZmy4bUcIAIRqZnnJWQzRZ1I/DQ=; b=QCjkRDIsnRVSCaEFFo/CKJQ4wV0rxC2W1WKoLx6JPiYrNRWX8+5p16sm+Qb6q3pgSQcRFU WOH2Kxr8R9EoL3YVmWvq9cRxxI0Z6dUzk3b1ue6vPa1iikiF+9hNDp4PMkncPNDG7uWIjz B0MWn4FjBvuwagQA/y0R8yIhoLpKFkJXGrTXbzxgOymk/Lw2F3lUMmEzrj+llwVgweiF// k862v4zV5UBkr+8/06xD8W+r/OZ1buVj9C0B63OFRW4HIoardVMlaJ+XzX7K3tjANKBq/b NcC/N7srVi32mR+q4MaY3P6vjcROLUDLvle0PZjQ3C2S9+h843XI8wKF9QFLvw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S7qdQ0sD8z1Nch for ; Sun, 15 Oct 2023 19:12:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 39FJCw58064145 for ; Sun, 15 Oct 2023 19:12:58 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 39FJCwQt064144 for ports-bugs@FreeBSD.org; Sun, 15 Oct 2023 19:12:58 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 274494] databases/mariadb106: fix build with LibreSSL Date: Sun, 15 Oct 2023 19:12:58 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: rozhuk.im@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ports-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D274494 --- Comment #2 from Ivan Rozhuk --- (In reply to Bernard Spil from comment #1) Strange, it should not build with libressl. I use my patch + workaround from: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D273961 LibreSSL 3.7.3_1 includes are used, as far it have definition with 1 arg: /usr/local/include/openssl/crypto.h:int CRYPTO_set_mem_functions(void *(*m)(size_t), void *(*r)(void *, size_t), void (*f)(void *)); Base OpenSSL have definition with 3 args: /usr/include/openssl/crypto.h:int CRYPTO_set_mem_functions( void *(*m) (size_t, const char *, int), void *(*r) (void *, size_t, const char *, int), void (*f) (void *, const char *, int)); Maria defines: /* OpenSSL version specific definitions */ #if defined(OPENSSL_VERSION_NUMBER) #if OPENSSL_VERSION_NUMBER >=3D 0x10100000L && \ !(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x30500000L) #define HAVE_OPENSSL11 1 Next if HAVE_OPENSSL11 defined than it build code to call CRYPTO_set_mem_functions(). So it is 100% that LibreSSL includes used. If I do replace to #if OPENSSL_VERSION_NUMBER >=3D 0x10100000L && \ !(defined(LIBRESSL_VERSION_NUMBER)) and HAVE_OPENSSL11 is undefined then another error happen: ... FAILED: vio/CMakeFiles/vio.dir/viosslfactories.c.o=20 /usr/local/libexec/ccache/cc -DHAVE_CONFIG_H -DHAVE_OPENSSL -I/tmp/ports/usr/ports/databases/mariadb106-client/work/mariadb-10.6.15/inc= lude -I/usr/local/include -O2 -pipe -O3 -pipe -funroll-loops -mretpoline -fno-delete-null-pointer-checks -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing=20 -fdebug-prefix-map=3D/tmp/ports/usr/ports/databases/mariadb106-client/work/= mariadb-10.6.15=3D. -fstack-protector --param=3Dssp-buffer-size=3D4 -O2 -pipe -O3 -pipe -funrol= l-loops -mretpoline -fno-delete-null-pointer-checks -fstack-protector-strong -isys= tem /usr/local/include -fno-strict-aliasing=20 -fdebug-prefix-map=3D/tmp/ports/usr/ports/databases/mariadb106-client/work/= mariadb-10.6.15=3D. -DNDEBUG -D_FORTIFY_SOURCE=3D2 -DDBUG_OFF -std=3Dgnu99 -I/usr/local/inclu= de -isystem /usr/local/include -fPIC -MD -MT vio/CMakeFiles/vio.dir/viosslfactories.c.o -MF vio/CMakeFiles/vio.dir/viosslfactories.c.o.d -o vio/CMakeFiles/vio.dir/viosslfactories.c.o -c /tmp/ports/usr/ports/databases/mariadb106-client/work/mariadb-10.6.15/vio/v= iosslfactories.c In file included from vio/viosslfactories.c:17: In file included from vio/vio_priv.h:25: In file included from include/my_sys.h:28: include/m_ctype.h:47:23: warning: redefinition of typedef 'ulong' is a C11 feature [-Wtypedef-redefinition] typedef unsigned long ulong; ^ include/my_global.h:891:23: note: previous definition is here typedef unsigned long ulong; /* Short for unsigned long */ ^ vio/viosslfactories.c:67:17: error: incomplete definition of type 'struct dh_st' || !DH_set0_pqg(dh, dhp_bn, NULL, dhg_bn)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/ssl_compat.h:78:45: note: expanded from macro 'DH_set0_pqg' #define DH_set0_pqg(D,P,Q,G) ((D)->p=3D (P), (D)->g=3D (G)) ~~~^ /usr/local/include/openssl/ossl_typ.h:132:16: note: forward declaration of 'struct dh_st' typedef struct dh_st DH; ^ vio/viosslfactories.c:67:17: error: incomplete definition of type 'struct dh_st' || !DH_set0_pqg(dh, dhp_bn, NULL, dhg_bn)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/ssl_compat.h:78:58: note: expanded from macro 'DH_set0_pqg' #define DH_set0_pqg(D,P,Q,G) ((D)->p=3D (P), (D)->g=3D (G)) ~~~^ /usr/local/include/openssl/ossl_typ.h:132:16: note: forward declaration of 'struct dh_st' typedef struct dh_st DH; ^ 1 warning and 2 errors generated. ... .... /* The check is only done for OpenSSL 1.1.x. It could run for OpenSSL 1.0.x but it doesn't make much sense and it hits this bug: https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/1594748 */ #ifndef HAVE_OPENSSL11 int check_openssl_compatibility() { return 0; } #else ... here code that was fixed by attached patch... check_openssl_compatibility() - always build by CMake, and called by runtim= e: ... #ifdef HAVE_OPENSSL if (check_openssl_compatibility()) { sql_print_error("Incompatible OpenSSL version. Cannot continue..."); exit(1); } #endif ... Is it possible that you some how build without OpenSSL support or with Wolf= SSL as cryptoengine? (sorry for long and mess post, there is no formatting features) --=20 You are receiving this mail because: You are the assignee for the bug.=