From nobody Fri Nov 15 12:59:40 2024 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 4XqcYS3zB9z5d6tG; Fri, 15 Nov 2024 12:59:40 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqcYS3HX7z4pHc; Fri, 15 Nov 2024 12:59:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675580; 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=fm5lcRez+vG9/vP5EBdiA4ox4rRGcquqDq4vLHX/tLQ=; b=yKK4INHheF751cPp2tRzh9Q0MWFcC+2++KU1BzIqGJyyvVAZolCPQaeYixfssFKsNyTeD6 1xkxZKtklPtRazNYZrD+i879GpW6lEJboLoTqeUsN/k6D4+dRHdv8+gfW9BiQZsK2fZFTU jCQtRoh8BJ+JRBfhrc91o4aV4pzpg5kJumyh7nm6ekA6C2dwLROD4n53c8JGc0OTEPJmrw nAZ3i0iLa7CpRCJ9AoISpifFLDnsi/eGDLwjA1NXnjjmjvuYdEgjR2Bgsu5rOEOxDbt+bK 2IcFolGD4vnUPga+GcNH4G8loJVhguwke9PyLa6HyJx3e+/kZvGDhsjr8ywwHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675580; 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=fm5lcRez+vG9/vP5EBdiA4ox4rRGcquqDq4vLHX/tLQ=; b=tE25YNmkA66pyY1E0nW/gFuEfwMvGG3CtHj6G8TPn+eBaLSt5jfIkaigGrQOlmAyCnB2MH PTJdvDHiMcpPliHAD+qWdeJ5/A+ciyXqjSFwbNSeLTq+8IiCYbh2K0IcIWzeKSHcvWwUi6 A6cTSAPlDTpyNyzyoi0RaktPgFKuF9avuU5OOBR1d6z4ytP00SJ89R1t102MaOvNGDbvy6 54FkYnHwp6eQ6dqy4cYy5bk89V+droltelsxI6xiObYgpIYuX9cBSz2TSEBaPSGB1/lsHG a+Cbi/3WybtHk1eyHnKNvBs07tln9koHf9oZ4KpBgdVVPfYsZTu3zQZRbwGKLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731675580; a=rsa-sha256; cv=none; b=JbtQFNrwGteUTGRU7Po5067zTLa/vwCVKLuoTaQRiaYI3MC7D06NXE/zbJEcv42slr2KM+ BpLaGDZUhqAMqDKI5tHQI3y7ojjBiflwGqIbvilltUEbwlBbMV5AEHIPE6wKOV9dwYVbyC blboYxnD/eSD38wP1ZPMn77JEEFipyWpajf5iwNMKQ+q2VaCXV1dJhgZ1mPlcHT9LwbD3C QosVVoUc5POZGqGSHDHR1H1eit282EUWYqaY+sHtJ8C85mRD0c90OAk0AOw4FmXJsPh3yJ wrJvdlYoq3Y4qipp+kDCGHdl1SRexg4CcMiWbZiQwg+fw/Ifmjkphw7iUyX2Gw== 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 4XqcYS2mvhzNr6; Fri, 15 Nov 2024 12:59:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFCxelZ059540; Fri, 15 Nov 2024 12:59:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFCxeQH059537; Fri, 15 Nov 2024 12:59:40 GMT (envelope-from git) Date: Fri, 15 Nov 2024 12:59:40 GMT Message-Id: <202411151259.4AFCxeQH059537@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: 29cdc0e4fa59 - main - misc/mxnet: fix build with clang 19 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: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@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: 29cdc0e4fa5913e651735fcbcb2bfaa663d2515b Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/ports/commit/?id=29cdc0e4fa5913e651735fcbcb2bfaa663d2515b commit 29cdc0e4fa5913e651735fcbcb2bfaa663d2515b Author: Dimitry Andric AuthorDate: 2024-11-09 19:56:14 +0000 Commit: Dimitry Andric CommitDate: 2024-11-15 12:58:59 +0000 misc/mxnet: fix build with clang 19 Clang 19 now implements CWG 96 [1], which requires a template argument list after a 'template' keyword, resulting in errors similar to: /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] 358 | template LaunchEx(s, new_oshape.Size(), req[0], lstride, rstride, oshape, | ^ /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:389:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] 389 | template LaunchEx(s, new_oshape.Size(), req[0], lstride, rstride, oshape, | ^ /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:389:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:389:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:389:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] In all these cases, appending "<>" is enough to satisfy the constraint. This can be done with a REINPLACE_CMD in the post-patch phase. [1] https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#96 PR: 282654 Approved by: yuri (maintainer) MFH: 2024Q4 --- misc/mxnet/Makefile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/misc/mxnet/Makefile b/misc/mxnet/Makefile index 22f8a44aba21..649f78ccb0f2 100644 --- a/misc/mxnet/Makefile +++ b/misc/mxnet/Makefile @@ -10,7 +10,6 @@ WWW= https://mxnet.apache.org/ \ LICENSE= APACHE20 -BROKEN_FreeBSD_15= compilation fails with clang-19, but the MXNet project has been retired by Apache and the port should probably be removed soon BROKEN_i386= https://github.com/apache/incubator-mxnet/issues/20832 .if !exists(/usr/include/omp.h) BROKEN= requires OpenMP support that is missing on this architecture @@ -57,11 +56,10 @@ OPENCV_LIB_DEPENDS= libopencv_core.so:graphics/opencv \ CMAKE_OFF+= USE_SSE .endif -xpost-patch: - @${RM} ${WRKSRC}/include/mkldnn/* -.for h in dnnl.h dnnl.hpp mkldnn.h mkldnn.hpp mkldnn_dnnl_mangling.h mkldnn_types.h mkldnn_version.h - @${LN} -s ${LOCALBASE}/include/${h} ${WRKSRC}/include/mkldnn/${h} -.endfor +post-patch: + @${FIND} ${WRKSRC} -type f -name '*.h' | \ + ${XARGS} ${GREP} -l 'template LaunchEx' | \ + ${XARGS} ${REINPLACE_CMD} -E -e 's/(template LaunchEx)/\1<>/' post-install-CPP-on: # https://github.com/apache/incubator-mxnet/issues/17080 @cd ${STAGEDIR}${PREFIX} && ${RM} include/mxnet-cpp/.gitignore include/mxnet-cpp/CPPLINT.cfg