pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/ham/gnuradio-core



Module Name:    pkgsrc
Committed By:   gdt
Date:           Sun May 18 19:29:32 UTC 2025

Modified Files:
        pkgsrc/ham/gnuradio-core: Makefile Makefile.common buildlink3.mk

Log Message:
ham/gnuradio-core: Fix C++ language standard issues

gnuradio-core was inexplicably marked as needing C++20, apparently
because it used to have GCC_REQD=10.  There is no evidence that it
needs C++20 in upstream docs or CMakeLists, and it builds fine with
C++17.

Further, GNU Radio's build system does not test for and set --std, so
it will fail if the compiler defaults to C++11, as can be shown by
setting FORCE_CXX_STD to C++11.  Therefore, set FORCE_CXX_STD to
C++17.

Because the installed headers require C++17, also set these variables
in buildlink3.mk.  FORCE is needed because code that uses GNU Radio
headers but is otherwise ok with c++11 might set c++11 as the std.
(Builds have only been working because the default C++ std is high
enough with gcc10.)

Fixes PR pkg/59348, by causing gcc10 to be used, instead of dragging
in gcc12.  The osmosdr python is sensitive to gcc mismatch -- but we
already know such mismatches are UB.


To generate a diff of this commit:
cvs rdiff -u -r1.139 -r1.140 pkgsrc/ham/gnuradio-core/Makefile
cvs rdiff -u -r1.60 -r1.61 pkgsrc/ham/gnuradio-core/Makefile.common
cvs rdiff -u -r1.41 -r1.42 pkgsrc/ham/gnuradio-core/buildlink3.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/ham/gnuradio-core/Makefile
diff -u pkgsrc/ham/gnuradio-core/Makefile:1.139 pkgsrc/ham/gnuradio-core/Makefile:1.140
--- pkgsrc/ham/gnuradio-core/Makefile:1.139     Thu Apr 24 14:14:44 2025
+++ pkgsrc/ham/gnuradio-core/Makefile   Sun May 18 19:29:32 2025
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.139 2025/04/24 14:14:44 wiz Exp $
+# $NetBSD: Makefile,v 1.140 2025/05/18 19:29:32 gdt Exp $
 
 PKGNAME=       gnuradio-core-${VERSION}
-PKGREVISION=   3
+PKGREVISION=   4
 COMMENT=       Core part of GNU Radio, all others need this
 
 .include       "Makefile.common"

Index: pkgsrc/ham/gnuradio-core/Makefile.common
diff -u pkgsrc/ham/gnuradio-core/Makefile.common:1.60 pkgsrc/ham/gnuradio-core/Makefile.common:1.61
--- pkgsrc/ham/gnuradio-core/Makefile.common:1.60       Sun May 18 17:24:52 2025
+++ pkgsrc/ham/gnuradio-core/Makefile.common    Sun May 18 19:29:32 2025
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.60 2025/05/18 17:24:52 gdt Exp $
+# $NetBSD: Makefile.common,v 1.61 2025/05/18 19:29:32 gdt Exp $
 # used by ham/gnuradio-channels/Makefile
 # used by ham/gnuradio-companion/Makefile
 # used by ham/gnuradio-core/Makefile
@@ -45,7 +45,13 @@ LICENSE=     gnu-gpl-v3
 # These are safely = rather than += because they are only included
 # by split package Makefiles, none of which set the variables.
 USE_LANGUAGES=         c c++
-USE_CXX_FEATURES=      c++20
+# Upstream does not document the needed C++ version.  Reported by
+# email on 20250518 because upstream's bugtracker is not accepting
+# account registrations.
+# Experimentally, FORCE_CXX_STD=c++11 fails and =c++17 succeeds, for
+# building gnuradio-core and gr-osmosdr (with gcc10).
+USE_CXX_FEATURES=      c++17
+FORCE_CXX_STD=         c++17
 
 USE_TOOLS=     gmake perl pkg-config
 

Index: pkgsrc/ham/gnuradio-core/buildlink3.mk
diff -u pkgsrc/ham/gnuradio-core/buildlink3.mk:1.41 pkgsrc/ham/gnuradio-core/buildlink3.mk:1.42
--- pkgsrc/ham/gnuradio-core/buildlink3.mk:1.41 Thu Feb 27 13:49:50 2025
+++ pkgsrc/ham/gnuradio-core/buildlink3.mk      Sun May 18 19:29:32 2025
@@ -1,12 +1,18 @@
-# $NetBSD: buildlink3.mk,v 1.41 2025/02/27 13:49:50 adam Exp $
+# $NetBSD: buildlink3.mk,v 1.42 2025/05/18 19:29:32 gdt Exp $
 
 BUILDLINK_TREE+=       gnuradio-core
 
 .if !defined(GNURADIO_CORE_BUILDLINK3_MK)
 GNURADIO_CORE_BUILDLINK3_MK:=
 
+# GNU Radio's header files do not compile in c++11 mode, but do in
+# c++17 mode.  See Makefile.common for status of reporting upstream.
+USE_LANGUAGES+=                c c++
+USE_CXX_FEATURES+=     c++17
+FORCE_CXX_STD=         c++17
+
 BUILDLINK_API_DEPENDS.gnuradio-core+=  gnuradio-core>=3.10.2
-BUILDLINK_ABI_DEPENDS.gnuradio-core+=  gnuradio-core>=3.10.12.0
+BUILDLINK_ABI_DEPENDS.gnuradio-core+=  gnuradio-core>=3.10.12.0nb4
 BUILDLINK_PKGSRCDIR.gnuradio-core?=    ../../ham/gnuradio-core
 
 .include "../../devel/boost-libs/buildlink3.mk"



Home | Main Index | Thread Index | Old Index