From nobody Fri Nov 15 13:01:22 2024 X-Original-To: dev-commits-ports-branches@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 4XqcbQ4w5vz5d6w5; Fri, 15 Nov 2024 13:01:22 +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 4XqcbQ3LkXz4qnS; Fri, 15 Nov 2024 13:01:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675682; 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=Z8UfGlYH4MWC6v01+mylu14YgtqpqiZaB17mnQkHUXk=; b=wtwtHuGmjMIvC68M3ixv2VUrwoKyPuFshqnvSRHRz1AMfbQ7im94FahBM4+Qg89owVxzec BZzT/E/AGeD7/dpY2ylNuZu5ZChW0zkPl8LNTVwHIMGVaAE8jN8YI82+0qeyZVJ+8CfAFu C3Iatfq88aD1NsIINGyaF36SWJzKwllAUuY5HsigjLq9vSG2JxytooiWmK81qiagVaaOeq cZEqx7h6IVviqmsN81Et5GUq330o9rzOsHXm81FnBqLkTisNkmzMXmRXx5shFPmEt/ozFg VI/rlRsWEaF4JMHQvGNOvb2vgu2/p4v0qkiUuUBtWfaF5GTKmlDo3V6PeI8gAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675682; 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=Z8UfGlYH4MWC6v01+mylu14YgtqpqiZaB17mnQkHUXk=; b=MwafYu3I9pEcmZbTTFnFt2jcIuxnZnYnwq05/DZ46tr6eRCBXUJ1htSI2kgVumgo+m6gsW AdLsInF6ptwZiQpODE0PLylIThZlA/SJHlte9JIzWyo0lG9T5SCjJ/pXko7b304WI4X/wM d4F54Y9fAb+W6NflyXARBYReTsOzr61U67YDdvyx/+rpOa0Gsfup6i2hX3wRvQVwIMIXUm d7rZeY3X28w32uqEqMW2XRY0Aihyfq9Mp2vaQ9PXm2wCRS3rTuXv2bzgQ+ZCCX46LIj00F 6rKjjrm+W4GQj2BeEytLnEUMhuAnZNIPHDAJ7ScioRSiqUF+izbRxJ8ZFYVd+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731675682; a=rsa-sha256; cv=none; b=P3Ddsc99hROeP1GR30hFj2lX6UoKX3Gy8n3aLcrS+A5abQExbYjX8yxRX6mEevIvkZ9BlI +hHNcQi+vwXnirlvEsy0W3Vh93tNPtzghwcZsPJQnpTCQj+/AHSkgjtpzrwk1Alk1tCIF2 y1ESYGTf5LP8dMv18rJDp9ywVMXo39QXVN1LjpM3PIjlvonc6+UC5KqNscbcXaXZldD3Sa BHu7dhk2xbxdDMnPzgLi0y912YLxiMkoZZ3pGBKlQ+GhSy0rFSjPGeEZcFmW6DNksc6jbS n7KxjcO7BavdcfuHbVPCePbbp55RS+lAoxUgI+GTBZUzmUlwPB58zzmcY2xPGg== 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 4XqcbQ24mJzNgG; Fri, 15 Nov 2024 13:01:22 +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 4AFD1MNb071841; Fri, 15 Nov 2024 13:01:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFD1MCx071838; Fri, 15 Nov 2024 13:01:22 GMT (envelope-from git) Date: Fri, 15 Nov 2024 13:01:22 GMT Message-Id: <202411151301.4AFD1MCx071838@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Dimitry Andric Subject: git: ee627f94d287 - 2024Q4 - misc/mxnet: fix build with clang 19 List-Id: Commits to the quarterly branches of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-branches@freebsd.org Sender: owner-dev-commits-ports-branches@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/2024Q4 X-Git-Reftype: branch X-Git-Commit: ee627f94d287e900666c1ef31a81a01242c2b507 Auto-Submitted: auto-generated The branch 2024Q4 has been updated by dim: URL: https://cgit.FreeBSD.org/ports/commit/?id=ee627f94d287e900666c1ef31a81a01242c2b507 commit ee627f94d287e900666c1ef31a81a01242c2b507 Author: Dimitry Andric AuthorDate: 2024-11-09 19:56:14 +0000 Commit: Dimitry Andric CommitDate: 2024-11-15 13:00:47 +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 (cherry picked from commit 29cdc0e4fa5913e651735fcbcb2bfaa663d2515b) --- misc/mxnet/Makefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/misc/mxnet/Makefile b/misc/mxnet/Makefile index ee952c7fc9b0..4a2071d5b1a4 100644 --- a/misc/mxnet/Makefile +++ b/misc/mxnet/Makefile @@ -52,11 +52,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