Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jun 2023 18:27:49 GMT
From:      Dimitry Andric <dim@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 22c4f7a75ed3 - main - math/cbc: fix build with clang 16
Message-ID:  <202306211827.35LIRnTR020805@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dim:

URL: https://cgit.FreeBSD.org/ports/commit/?id=22c4f7a75ed3de4b97368be49f1ab70ab0aabb27

commit 22c4f7a75ed3de4b97368be49f1ab70ab0aabb27
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-06-20 18:52:55 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-06-21 18:25:37 +0000

    math/cbc: fix build with clang 16
    
    Since clang 16 (and gcc 11) the default C++ standard is now gnu++17.
    Because math/cbc's build infrastructure does not explicitly set its C++
    standard, this leads to errors:
    
      ./CbcSymmetry.hpp:83:30: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
          inline void color_vertex(register int k) { color = k; }
                                   ^~~~~~~~~
      ./CbcSymmetry.hpp:91:24: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
          inline void bounds(register double a, register double b)
                             ^~~~~~~~~
    
    To work around the error, add USE_CXXSTD=gnu++11 to compile for C++11
    with GNU extensions instead.
    
    PR:             272101
    Approved by:    yuri (maintainer)
    MFH:            2023Q2
---
 math/cbc/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/math/cbc/Makefile b/math/cbc/Makefile
index 491bc4f00bd2..484909ff9cf6 100644
--- a/math/cbc/Makefile
+++ b/math/cbc/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	cbc
 DISTVERSIONPREFIX=	releases/
 DISTVERSION=	2.10.10
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	math
 PKGNAMEPREFIX=	coin-or-
 
@@ -25,6 +25,7 @@ LIB_DEPENDS=	libblas.so:math/blas \
 		libOsi.so:math/osi
 
 USES=		compiler:c++11-lang fortran gmake libtool localbase pkgconfig
+USE_CXXSTD=	gnu++11
 USE_LDCONFIG=	yes
 
 USE_GITHUB=	yes



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202306211827.35LIRnTR020805>