From nobody Mon Dec 05 17:26:10 2022 X-Original-To: dev-commits-ports-all@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 4NQr770rMkz4kDMm; Mon, 5 Dec 2022 17:26:11 +0000 (UTC) (envelope-from git@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 4NQr770LSrz4Drp; Mon, 5 Dec 2022 17:26:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670261171; 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; bh=cERKTZEk41eBQ4FWQaqZbDAVEt1aC/LHwXjAo8+qRj0=; b=GEzYHCppBYzLINgSVQtHoL4ENP6FHcad+BiaORvLl3HzoWvEfHG88wIlxsCA3sIjSlZrXO 0LD8MWb/Oo/yKxedwlMeY4cAyhjEgAsLPA4rztOORz/EPGNmLBaxK06JrrK3l9KfV8QW+f viyAuEY2i+L4rhpadjQeXsGt5hIe4vXu5fU3K+LL2vLXHtAHSnojUfmIwJknFtjcLw7so1 vIAsHeDy7shlJGzFEmBUGCLvpa/AdRirlVPFUIgp80EjyB3AOPgAr/sH+RCm0bNi3j7F4A 4F5rb6tML9VvNXarvBpgYOwgdp12ypko1a++5RiS45hIfTpNoC36v8dgjOPqpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670261171; 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; bh=cERKTZEk41eBQ4FWQaqZbDAVEt1aC/LHwXjAo8+qRj0=; b=sjUr8VZdeV6reveFtcmNv4wRHAaRwnZy0OySKDXQopEIByyjeBTgCnwUyBCmqr5L0e4Zld Y1ZYf0nVZLlQ6AtDCbmvZhc2rz+Xwy7Az7jaZaZDg6LaY4MYknJ59Q/Kxs3M0eOK8LRr8C AGVw4hRD0CnjZ+avlZiAePh2o1loSeXTKx4XCxf7/uOiMGSD7nXXFAJnpfBOO/e17Qz1/T z+QasS629Cbe5u4squghSntp4S6OEe7rEADXEmlvKhmEmFLPLL4Ou+LPY/jfsyAlxZHdHN P7ChLvuMToEwBoivx1OPQZzBRHeXl3todK6pSp+25Fg+0QXJdcW3ewayqf+a2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1670261171; a=rsa-sha256; cv=none; b=BX2xL9/vsUm9uuyhKOzzcweT4F8elImzCe1pmuiiCzXN3YBI6maCc5wxoo7jWnddLzOMXv Lesvi+GMnAEvgSxfwufH3NL4RieAlKosGA0kL+KQ1KhmP0vrANNNfNGzGL9zp8HVvMKh/v 6wDzKRRCRwV1gFBCRmuT3S19r/YlNPUn9qo2lQA99vmJeywDRmUhyPIJdCZc8rhW+Ik4DB xjjcPV80JxcLiQMgODFaiZQ8v8qfWvxpGoRD6lmnl/jmjnb+MORknklVDDJV/DgnfWaIWd 7c6r0wsBkqoe1PGI2dzvH35RJbhQCnePmR6K578G2x9DbteoNVcNmxk2LnmNQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4NQr766Vdcz15f2; Mon, 5 Dec 2022 17:26:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2B5HQAb8012425; Mon, 5 Dec 2022 17:26:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2B5HQAKL012424; Mon, 5 Dec 2022 17:26:10 GMT (envelope-from git) Date: Mon, 5 Dec 2022 17:26:10 GMT Message-Id: <202212051726.2B5HQAKL012424@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dimitry Andric Subject: git: 42cfe5c18c23 - main - databases/db5: Add to conftest.cpp for TLS check List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 42cfe5c18c235a5e8d95bb89060db0f09f43c7b2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim (src committer): URL: https://cgit.FreeBSD.org/ports/commit/?id=42cfe5c18c235a5e8d95bb89060db0f09f43c7b2 commit 42cfe5c18c235a5e8d95bb89060db0f09f43c7b2 Author: Dimitry Andric AuthorDate: 2022-12-05 17:20:32 +0000 Commit: Dimitry Andric CommitDate: 2022-12-05 17:26:02 +0000 databases/db5: Add to conftest.cpp for TLS check During an exp-run for llvm 15 (see bug 265425), it turned out that databases/db5 failed to build with clang 15. This is caused by db5's configure script attempting to detect TLS but encountering internal compiler errors while compiling its test cases, and then concluding TLS does not work at all: ... checking whether C++ supports the wstring class... checking for thread local storage (TLS) class... none ... in config.log it shows what is happening: configure:19128: checking for thread local storage (TLS) class configure:19164: c++ -c -O2 -pipe -Wall -Wextra -fstack-protector-strong -fno-strict-aliasing -D_THREAD_SAFE conftest.cpp >&5 conftest.cpp:30:72: error: use of undeclared identifier 'NULL' template __thread T* TLSClass::tlsvar = NULL; ^ Assertion failed: (!isValueDependent() && "Expression evaluator can't be called on a dependent expression."), function isConstantInitializer, file /usr/src/contrib/llvm-project/clang/lib/AST/Expr.cpp, line 3184. PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script. Stack dump: 0. Program arguments: c++ -c -O2 -pipe -Wall -Wextra -fstack-protector-strong -fno-strict-aliasing -D_THREAD_SAFE conftest.cpp 1. conftest.cpp:30:76: current parser token ';' #0 0x00000000053fec51 PrintStackTrace #/usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:569:13 #1 0x00000000053fcf35 RunSignalHandlers #/usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:104:18 #2 0x00000000053a591e HandleCrash #/usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:76:5 #3 0x00000000053a5ae3 CrashRecoverySignalHandler #/usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:0:51 #4 0x0000000006a1b05e handle_signal #/usr/src/lib/libthr/thread/thr_sig.c:0:3 c++: error: clang frontend command failed with exit code 134 (use -v to see invocation) Interestingly enough this compilation error with a fatal crash exists for a very long time, even back to clang 10 and earlier! But for various reasons the configure script has always ignored these errors and found some workaround way to enable TLS anyway. For now the problem can be fixed by including at the top of conftest.cpp, which will allow the TLS test to succeed normally, without crashing, and the correct result will then be: configure:19128: checking for thread local storage (TLS) class configure:19165: c++ -c -O2 -pipe -Wall -Wextra -fstack-protector-strong -fno-strict-aliasing -D_THREAD_SAFE conftest.cpp >&5 conftest.cpp:33:35: warning: unused variable 'x' [-Wunused-variable] static __thread int x = 0; ^ 1 warning generated. configure:19165: $? = 0 configure:19220: result: modifier PR: 267156 Approved by: maintainer timeout (>1 month) MFH: 2022Q4 --- databases/db5/Makefile | 2 +- databases/db5/files/patch-dist_configure | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/databases/db5/Makefile b/databases/db5/Makefile index 6480caea579c..29597687220b 100644 --- a/databases/db5/Makefile +++ b/databases/db5/Makefile @@ -1,6 +1,6 @@ PORTNAME= db5 PORTVERSION= 5.3.28 -PORTREVISION= 8 +PORTREVISION= 9 CATEGORIES= databases java MASTER_SITES= https://download.oracle.com/berkeley-db/ PKGNAMEPREFIX?= diff --git a/databases/db5/files/patch-dist_configure b/databases/db5/files/patch-dist_configure index 830bc1f487ef..1243a1117aaf 100644 --- a/databases/db5/files/patch-dist_configure +++ b/databases/db5/files/patch-dist_configure @@ -13,3 +13,11 @@ MAKEFILE_CXXLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CXXLINK}" +@@ -19144,6 +19144,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + test -z "$ax_tls_defn_keyword" && continue + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ ++#include + template class TLSClass { + public: static $ax_tls_decl_keyword T *tlsvar; + };