From nobody Sun Oct 01 20:40:29 2023 X-Original-To: dev-commits-ports-main@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 4RzGDt20xpz4vnGn; Sun, 1 Oct 2023 20:40:30 +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 4RzGDt0bL1z4QYn; Sun, 1 Oct 2023 20:40:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696192830; 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=8WyCikHscxzj5lOhDYoMWDCPC2uv8NzcjhGrhflCEcs=; b=qZxkqXCt0SetSMvf/ng8uA9F5GgyrrPn8Zp4NzmVvJrbKH4BuEzCSQNPeHeoCon2wEC7LL 5+EzQBlMI5Hv4g8eO9mqfZTBK430PP6ctwMxLZM8oNJ7urx4s4JVReA4acZls72Zt0Jq2w mCQwBOXFb8d30xPbzUxrJ1t6dADy5ZLOKOVJPRzcNJZVNMrdw4KT5xxoUSHcDeYuaDYbiB +q0YqIR3hm8Xvj/75D6tVDZ+7VDXxGkkFbrSV0qewCpMwmy5Y8Ibvym1tU+F2XXKPocRAS RNPzXUJYkLjt4P7OWnw55IHWiwbUSb9nrV7KxBBQ3mvKsS/jQ+YXKRbz1U3w0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696192830; a=rsa-sha256; cv=none; b=P3/ankps5D+mzH7bNyH6dFSa0pxs0HGHRz6wqdOWXH7Sc76CaDEGnTGkaFPghjIY0JIQU1 VJhpk/ITNP5JlccEibCD0qBlEUP4KsYy9ZsPjFcU0IUnmAuKB9/0BilijpkrSKIWJylNNc UzLuPHaQS1jq+746Nr3icT76FLDeT5rN25awPvM44QhZtWpPcc7Hfup3YjLdoF4a5obh30 u16XmFzZTN2+6tJ4mlT9NFKDkSaKStt13es4DmcNiw9d5FaZXRIhP7CZOIRxITQZuHWrKV 3Q1yViskq/mXtxznHbSiIPkhVQwOk9A9Vrfbmio9Kh782tTuCqoJIK9o+iNHHQ== 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=1696192830; 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=8WyCikHscxzj5lOhDYoMWDCPC2uv8NzcjhGrhflCEcs=; b=JsSMLLNCl716igJKhHY9TkhAlulk5DDGci8hbGpHZdVolsb/58fjntDmKE6dWqncFNXfgH /4AnrJN2SlCUYyUmSiyJzO8pkLg9LI2aQ3sUo0DTqDXYKjnTjGdOIfTqPPRuwSKnNF4jlB aTZdFCohDQ2q9KuYGgVck7MbhnF86WR3h94rhcAfRf6luspqRKxrkEjiMTMS5h/TWvrxrD +HiEMrdAP3k7tt7HEQka137PXpfGVjvte9oaU5QAAXa4a2cp0nyhrm36vKvCTutm0QPswq 3afh3VVXjcF51jT4iEiHdcPCe6XBH+TLQA3BeqdFcYrOPj02KGujla29a4szLQ== 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 4RzGDs6mTjzkVX; Sun, 1 Oct 2023 20:40:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 391KeTKU013881; Sun, 1 Oct 2023 20:40:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 391KeTSg013878; Sun, 1 Oct 2023 20:40:29 GMT (envelope-from git) Date: Sun, 1 Oct 2023 20:40:29 GMT Message-Id: <202310012040.391KeTSg013878@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien?= =?utf-8?Q?P=C3=A9dron?= Subject: git: 01cc6a27117a - main - graphics/darktable: Build explicitly with GCC 12.x on FreeBSD 12.x List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 01cc6a27117a38079dd3b57e69455d7a191ca54a Auto-Submitted: auto-generated The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/ports/commit/?id=01cc6a27117a38079dd3b57e69455d7a191ca54a commit 01cc6a27117a38079dd3b57e69455d7a191ca54a Author: Jean-Sébastien Pédron AuthorDate: 2023-10-01 20:30:13 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-10-01 20:37:57 +0000 graphics/darktable: Build explicitly with GCC 12.x on FreeBSD 12.x On FreeBSD 12.x, it looks like GCC 13+ is incompatible with the version of libcxx. In the case of darktable, this leads to the following compile time error: In file included from /usr/include/c++/v1/__functional/weak_result_type.h:16, from /usr/include/c++/v1/__functional/invoke.h:14, from /usr/include/c++/v1/__functional_base:15, from /usr/include/c++/v1/string:520, from .../work/darktable-4.4.2/src/external/rawspeed/src/librawspeed/common/ChecksumFile.h:23, from .../work/darktable-4.4.2/src/external/rawspeed/src/librawspeed/common/ChecksumFile.cpp:21: /usr/include/c++/v1/type_traits:1770:8: error: expected identifier before '__is_convertible' 1770 | struct __is_convertible | ^~~~~~~~~~~~~~~~ I have no idea if it is possible to fix or work around this problem in darktable itself. Thus, on FreeBSD 12.x, we pin the version of GCC to 12. This way, once GCC 13+ bescomes the default version, darktable can still be built on FreeBSD 12.x, even though the user may have to install two versions of GCC. For FreeBSD 13.x and onward, the version of GCC remains unpinned in the port and the default one will be used. This solution was discussed with salvadore@ in the following exp-run request: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273397 PR: 273681 --- graphics/darktable/Makefile | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/graphics/darktable/Makefile b/graphics/darktable/Makefile index 02d5953cad65..1ee7fa64627a 100644 --- a/graphics/darktable/Makefile +++ b/graphics/darktable/Makefile @@ -53,8 +53,6 @@ USE_XORG= ice sm x11 xext xrandr SHEBANG_FILES= tools/*.sh -USE_GCC= yes - CMAKE_ARGS+= -DBINARY_PACKAGE_BUILD=1 -DUSE_PORTMIDI:BOOL=OFF CMAKE_BOOL+= BUILD_CMSTEST USE_AVIF USE_CAMERA_SUPPORT USE_HEIF \ @@ -98,6 +96,32 @@ TOOLS_RUN_DEPENDS= exiftool:graphics/p5-Image-ExifTool .include +.if ${OPSYS}_${OSREL:R} == FreeBSD_12 +# Darktable fails to compile with GCC 13+ on FreeBSD 12.x with the following +# error: +# +# In file included from /usr/include/c++/v1/__functional/weak_result_type.h:16, +# from /usr/include/c++/v1/__functional/invoke.h:14, +# from /usr/include/c++/v1/__functional_base:15, +# from /usr/include/c++/v1/string:520, +# from .../work/darktable-4.4.2/src/external/rawspeed/src/librawspeed/common/ChecksumFile.h:23, +# from .../work/darktable-4.4.2/src/external/rawspeed/src/librawspeed/common/ChecksumFile.cpp:21: +# /usr/include/c++/v1/type_traits:1770:8: error: expected identifier before '__is_convertible' +# 1770 | struct __is_convertible +# | ^~~~~~~~~~~~~~~~ +# +# This seems to be an incompatibility between GCC 13+ and libcxx provided with +# FreeBSD 12.x. The workarounbd is to force the use of GCC 12 on this version +# of FreeBSD. +# +# See: +# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273397 +# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273681 +USE_GCC= 12 +.else +USE_GCC= yes +.endif + .if ${ARCH} == aarch64 || ${ARCH} == powerpc64le CMAKE_ARGS+= -DUSE_OPENCL:BOOL=OFF CXXFLAGS+= -DGDK_DISABLE_DEPRECATED