Marcus Müller <mmuel...@gnuradio.org> writes:

> Dear Greg,
>
> yes, GNU Radio should only need C++17. That's defined in our
> CMakeFiles.txt, cmake/Modules/GrCompilerSettings.cmake Line 81.

Thanks - and now I know C11 is required too.

> On 5/18/25 8:50 PM, Greg Troxel wrote:
>>    Is this documented and I'm just not looking in the right place?
>
> "Documented" might be a strong word for "it's hard coded in our CMake" :)

It would be nice to have something easily found by a human, from the
top-level README, that sets out the requirements, in an OS-independent
way.  I had searched for this and not found it. When packaging, I like
to align the package config files to the upstream documented
requirements, rather than fiddling until it builds, to make it more
likely it will be ok on some other system.

>>    Does the build system check if the compiler can support the required
>>    version and add --std somehow?   If not, do people think that's a bug?
>
> It does, that's a general feature of CMake.

In theory I know that, but I couldn't find it in the cmake output.
(It's also a general bug of cmake to hide build lines by default :-(
which makes this harder.)

>>    Are things ok only because everybody but me is using a system where
>>    the compiler is always really recent, and defaults to high language
>>    standards?
>
> No, this works because unless you try to force things, the build
> system is already configured to make sure the compiler is in the right
> standards mode.

How does building gr-osmosdr work?   I don't see that it requires C++17
(because it's in C++11 itself), but if the compiler isn't in C++17 mode
it will object to gnuradio's headers.

So I think I need to in our "buildlink" file (that you include when you
want to link against stomething) for GNU Radio add a setting to force
c++17 mode.

My cmake output follows, and I don't see about testing if the compiler
supports C++17.

===> Configuring for gnuradio-core-3.10.12.0nb4
/bin/ln -sf /usr/pkg/bin/pybind11-config-3.12 
/tmp/work/ham/gnuradio-core/work/.buildlink/bin/pybind11-config
=> Arrange the patched line depepending on alsa is in PKG_OPTIONS or not
=> Substitute PREFIX
=> Generating pkg-config file for builtin expat package.
=> Generating pkg-config files for builtin xz package.
=> Checking for portability problems in extracted files
-- The CXX compiler identification is GNU 10.5.0
-- The C compiler identification is GNU 10.5.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: 
/tmp/work/ham/gnuradio-core/work/.cwrapper/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: 
/tmp/work/ham/gnuradio-core/work/.cwrapper/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Build type set to Release.
-- Build date set to Mon, 19 May 2025 15:01:04Z.
-- Found Git: /usr/pkg/bin/git
-- Found Boost: 
/tmp/work/ham/gnuradio-core/work/.buildlink/lib/cmake/Boost-1.87.0/BoostConfig.cmake
 (found suitable version "1.87.0", minimum required is "1.69") found 
components: date_time program_options system regex thread unit_test_framework
-- 
-- Configuring testing-support support...
--   Dependency Boost_UNIT_TEST_FRAMEWORK_FOUND = 1
--   Disabling testing-support support.
--   Override with -DENABLE_TESTING=ON/OFF
-- Performing Test HAVE_VISIBILITY_HIDDEN
-- Performing Test HAVE_VISIBILITY_HIDDEN - Success
-- Performing Test HAVE_WARN_SIGN_COMPARE
-- Performing Test HAVE_WARN_SIGN_COMPARE - Success
-- Performing Test HAVE_WARN_ALL
-- Performing Test HAVE_WARN_ALL - Success
-- Performing Test HAVE_WARN_NO_UNINITIALIZED
-- Performing Test HAVE_WARN_NO_UNINITIALIZED - Success
-- Performing Test HAVE_WARN_IGNORED_QUALIFIERS
-- Performing Test HAVE_WARN_IGNORED_QUALIFIERS - Success
-- Performing Test HAVE_WARN_CAST_QUAL
-- Performing Test HAVE_WARN_CAST_QUAL - Success
-- Compiler Version: gcc (nb2 20230710) 10.5.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-- Compiler Flags: 
/tmp/work/ham/gnuradio-core/work/.cwrapper/bin/gcc:::-DNDEBUG -O2 -pthread 
-I/usr/pkg/include -I/usr/include -I/usr/pkg/include/portaudio2 
-I/usr/pkg/include/cppunit -DSPDLOG_FMT_EXTERNAL -I/usr/pkg/include/python3.12 
-I/usr/X11R7/include -I/usr/pkg/include/glib-2.0 
-I/usr/pkg/include/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include 
-I/usr/pkg/include/freetype2 -I/usr/pkg/include/harfbuzz 
-I/usr/X11R7/include/libdrm -fvisibility=hidden -Wsign-compare -Wall 
-Wno-uninitialized -Wignored-qualifiers -Wcast-qual
/tmp/work/ham/gnuradio-core/work/.cwrapper/bin/c++:::-DNDEBUG -O2 -pthread 
-I/usr/pkg/include -I/usr/include -I/usr/pkg/include/portaudio2 
-I/usr/pkg/include/cppunit -DSPDLOG_FMT_EXTERNAL -I/usr/pkg/include/python3.12 
-I/usr/X11R7/include -I/usr/pkg/include/glib-2.0 
-I/usr/pkg/include/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include 
-I/usr/pkg/include/freetype2 -I/usr/pkg/include/harfbuzz 
-I/usr/X11R7/include/libdrm -pthread -fvisibility=hidden -Wsign-compare -Wall 
-Wno-uninitialized -Wignored-qualifiers -Wcast-qual
-- ADDING PERF COUNTERS
CMake Warning at CMakeLists.txt:204 (message):
  GR_BASH_COMPLETIONS_DIR is not defined


CMake Warning at CMakeLists.txt:218 (message):
  GR_ZSH_COMPLETIONS_DIR is not defined


CMake Warning at CMakeLists.txt:232 (message):
  GR_FISH_COMPLETIONS_DIR is not defined


-- User set python executable /usr/pkg/bin/python3.12
-- Found PythonInterp: /usr/pkg/bin/python3.12 (found suitable version 
"3.12.10", minimum required is "3.7.2")
-- Found PythonLibs: 
/tmp/work/ham/gnuradio-core/work/.buildlink/lib/libpython3.12.so (found 
suitable exact version "3.12.10")
-- Python checking for packaging - found
-- Python checking for numpy - found
-- Python checking for pygccxml - found
-- Found PythonInterp: /usr/pkg/bin/python3.12 (found suitable version 
"3.12.10", minimum required is "3.7")
-- Found PythonLibs: 
/tmp/work/ham/gnuradio-core/work/.buildlink/lib/libpython3.12.so
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Found pybind11: /usr/pkg/lib/python3.12/site-packages/pybind11/include 
(found version "2.13.6")
-- 
-- Configuring python-support support...
--   Dependency PYTHONLIBS_FOUND = TRUE
--   Dependency PACKAGING_FOUND = TRUE
--   Dependency pybind11_FOUND = 1
--   Dependency NUMPY_FOUND = TRUE
--   Enabling python-support support.
--   Override with -DENABLE_PYTHON=ON/OFF
-- 
-- Configuring VOLK support...
-- Found Volk: Volk::volk
--   Found VOLK:
--   * Version: 3.2.0
--   * Libraries: Volk::volk
--   * Includes: /tmp/work/ham/gnuradio-core/work/.buildlink/include
-- Not using additional GNU Radio native architecture optimizations.
-- Performing Test HAVE_CX_LIMITED_RANGE
-- Performing Test HAVE_CX_LIMITED_RANGE - Success
-- Performing Test HAVE_WNO_UNUSED_CMD_LINE_ARG
-- Performing Test HAVE_WNO_UNUSED_CMD_LINE_ARG - Success
-- Found PkgConfig: /tmp/work/ham/gnuradio-core/work/.tools/bin/pkg-config 
(found version "2.4.3")
-- Checking for module 'gmp'
--   Found gmp, version 6.3.0
-- Found GMP: /tmp/work/ham/gnuradio-core/work/.buildlink/lib/libgmpxx.so
-- Using GMP.
-- Found MPLIB: /tmp/work/ham/gnuradio-core/work/.buildlink/lib/libgmpxx.so
-- 
-- Configuring post-install support...
--   Disabling post-install support.
--   Override with -DENABLE_POSTINSTALL=ON/OFF
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Could NOT find MathJax2 (missing: MATHJAX2_JS_PATH) 
-- 
-- Configuring doxygen support...
--   Dependency DOXYGEN_FOUND = NO
--   Disabling doxygen support.
--   Override with -DENABLE_DOXYGEN=ON/OFF
-- 
-- Configuring man-pages support...
--   Disabling man-pages support.
--   Override with -DENABLE_MANPAGES=ON/OFF
-- Using GMP.
-- Looking for C++ include sys/types.h
-- Looking for C++ include sys/types.h - found
-- Looking for C++ include sys/mman.h
-- Looking for C++ include sys/mman.h - found
-- Looking for C++ include sys/ipc.h
-- Looking for C++ include sys/ipc.h - found
-- Looking for C++ include sys/shm.h
-- Looking for C++ include sys/shm.h - found
-- Looking for C++ include signal.h
-- Looking for C++ include signal.h - found
-- Performing Test HAVE_SIGACTION
-- Performing Test HAVE_SIGACTION - Success
-- Performing Test HAVE_SYSCONF
-- Performing Test HAVE_SYSCONF - Success
-- Performing Test HAVE_GETPAGESIZE
-- Performing Test HAVE_GETPAGESIZE - Success
-- Performing Test HAVE_PTHREAD_SIGMASK
-- Performing Test HAVE_PTHREAD_SIGMASK - Success
-- Performing Test HAVE_CREATEFILEMAPPING
-- Performing Test HAVE_CREATEFILEMAPPING - Failed
-- Performing Test HAVE_SHM_OPEN
-- Performing Test HAVE_SHM_OPEN - Success
-- Performing Test HAVE_SINCOS
-- Performing Test HAVE_SINCOS - Success
-- Performing Test HAVE_SINCOSF
-- Performing Test HAVE_SINCOSF - Success
-- Performing Test HAVE_SINF
-- Performing Test HAVE_SINF - Success
-- Performing Test HAVE_COSF
-- Performing Test HAVE_COSF - Success
-- Performing Test HAVE_MMAP
-- Performing Test HAVE_MMAP - Success
-- Performing Test HAVE_PTHREAD_SETSCHEDPARAM
-- Performing Test HAVE_PTHREAD_SETSCHEDPARAM - Success
-- Performing Test HAVE_SCHED_SETSCHEDULER
-- Performing Test HAVE_SCHED_SETSCHEDULER - Success
-- Found Threads: TRUE
-- 
-- Configuring gnuradio-runtime support...
--   Dependency Boost_FOUND = TRUE
--   Dependency PYTHONINTERP_FOUND = TRUE
--   Dependency MPLIB_FOUND = TRUE
--   Dependency spdlog_FOUND = 1
--   Dependency Volk_FOUND = 1
--   Enabling gnuradio-runtime support.
--   Override with -DENABLE_GNURADIO_RUNTIME=ON/OFF
-- 
-- Configuring common-precompiled-headers support...
--   Dependency ENABLE_GNURADIO_RUNTIME = ON
--   Dependency GR_CMAKE_HAS_PCH = 
--   Disabling common-precompiled-headers support.
--   Override with -DENABLE_COMMON_PCH=ON/OFF
-- 
-- Configuring gr-ctrlport support...
--   Dependency Boost_FOUND = TRUE
--   Dependency ENABLE_GNURADIO_RUNTIME = ON
--   Enabling gr-ctrlport support.
--   Override with -DENABLE_GR_CTRLPORT=ON/OFF
-- Checking for module 'thrift'
--   Package 'thrift' not found
-- thrift looking for version 0.13
-- Binary 'thrift' not found.
-- Looking for C++ include sys/resource.h
-- Looking for C++ include sys/resource.h - found
-- Checking for module 'libunwind'
--   Package 'libunwind' not found
-- Found libunwind 
-- Loading build date Mon, 19 May 2025 15:01:04Z into constants...
-- Loading version 3.10.12.0 into constants...
-- TRY_SHM_VMCIRCBUF set to ON.
-- 
-- Python checking for PyYAML >= 3.11 - found
-- Python checking for mako >= 1.1.0 - found
-- Python checking for pygobject >= 2.28.6 - found
-- Python checking for Gtk (GI) >= 3.10.8 - found
-- Python checking for Cairo (GI) >= 1.0 - found
-- Python checking for PangoCairo (GI) >= 1.0 - found
-- Python checking for numpy - found
-- Python checking for jsonschema - found
-- 
-- Configuring gnuradio-companion support...
--   Dependency ENABLE_PYTHON = ON
--   Dependency PYYAML_FOUND = TRUE
--   Dependency MAKO_FOUND = TRUE
--   Dependency PYGI_FOUND = TRUE
--   Dependency GTK_GI_FOUND = TRUE
--   Dependency CAIRO_GI_FOUND = TRUE
--   Dependency PANGOCAIRO_GI_FOUND = TRUE
--   Dependency NUMPY_FOUND = TRUE
--   Disabling gnuradio-companion support.
--   Override with -DENABLE_GRC=ON/OFF
-- Checking for module 'sndfile'
--   Found sndfile, version 1.2.2
-- Found SNDFILE: /tmp/work/ham/gnuradio-core/work/.buildlink/lib/libsndfile.so
-- 
-- Configuring gr-blocks support...
--   Dependency Boost_FOUND = TRUE
--   Enabling gr-blocks support.
--   Override with -DENABLE_GR_BLOCKS=ON/OFF
-- Looking for C++ include io.h
-- Looking for C++ include io.h - not found
-- Found GSL: /tmp/work/ham/gnuradio-core/work/.buildlink/include (found 
version "2.8")
-- 
-- Configuring gr-fec support...
--   Disabling gr-fec support.
--   Override with -DENABLE_GR_FEC=ON/OFF
-- Checking for module 'fftw3f >= 3.0'
--   Found fftw3f, version 3.3.10
-- Found FFTW3f: /tmp/work/ham/gnuradio-core/work/.buildlink/lib/libfftw3f.so
-- 
-- Configuring gr-fft support...
--   Dependency Boost_FOUND = TRUE
--   Dependency ENABLE_GNURADIO_RUNTIME = ON
--   Dependency ENABLE_GR_BLOCKS = ON
--   Dependency FFTW3f_FOUND = TRUE
--   Enabling gr-fft support.
--   Override with -DENABLE_GR_FFT=ON/OFF
-- 
-- Configuring gr-filter support...
--   Dependency Boost_FOUND = TRUE
--   Enabling gr-filter support.
--   Override with -DENABLE_GR_FILTER=ON/OFF
-- Python checking for pyqtgraph - found
-- Python checking for scipy - found
-- 
-- Configuring gr-analog support...
--   Dependency ENABLE_GNURADIO_RUNTIME = ON
--   Dependency ENABLE_GR_BLOCKS = ON
--   Dependency ENABLE_GR_FFT = ON
--   Dependency ENABLE_GR_FILTER = ON
--   Enabling gr-analog support.
--   Override with -DENABLE_GR_ANALOG=ON/OFF
-- 
-- Configuring gr-digital support...
--   Dependency Boost_FOUND = TRUE
--   Disabling gr-digital support.
--   Override with -DENABLE_GR_DIGITAL=ON/OFF
-- 
-- Configuring gr-dtv support...
--   Disabling gr-dtv support.
--   Override with -DENABLE_GR_DTV=ON/OFF
-- 
-- Configuring gr-audio support...
--   Enabling gr-audio support.
--   Override with -DENABLE_GR_AUDIO=ON/OFF
-- Checking for module 'jack'
--   Found jack, version 1.9.21
-- Found jack: /tmp/work/ham/gnuradio-core/work/.buildlink/lib/libjack.so
-- Looking for C++ include AudioUnit/AudioUnit.h
-- Looking for C++ include AudioUnit/AudioUnit.h - not found
-- Looking for C++ include AudioToolbox/AudioToolbox.h
-- Looking for C++ include AudioToolbox/AudioToolbox.h - not found
-- Checking for module 'portaudio-2.0'
--   Found portaudio-2.0, version 19
-- Performing Test PORTAUDIO2_FOUND
-- Performing Test PORTAUDIO2_FOUND - Success
-- Found PORTAUDIO: /usr/pkg/include/portaudio2
-- 
-- Configuring gr-channels support...
--   Disabling gr-channels support.
--   Override with -DENABLE_GR_CHANNELS=ON/OFF
-- 
-- Configuring gr-pdu support...
--   Disabling gr-pdu support.
--   Override with -DENABLE_GR_PDU=ON/OFF
-- Could NOT find libiio (missing: libiio_LIBRARY libiio_INCLUDE_DIR) 
-- Could NOT find libad9361 (missing: libad9361_LIBRARY libad9361_INCLUDE_DIR) 
-- 
-- Configuring gr-iio support...
--   Dependency ENABLE_GNURADIO_RUNTIME = ON
--   Dependency ENABLE_GR_BLOCKS = ON
--   Dependency libiio_FOUND = FALSE
--   Disabling gr-iio support.
--   Override with -DENABLE_GR_IIO=ON/OFF
-- Python checking for PyQt5 - found
-- Checking for module 'Qt5Qwt6'
--   Package 'Qt5Qwt6' not found
-- 
-- Configuring gr-qtgui support...
--   Dependency QT_FOUND = 1
--   Dependency QWT_FOUND = FALSE
--   Dependency PYTHONLIBS_FOUND = TRUE
--   Dependency PYQT5_FOUND = TRUE
--   Disabling gr-qtgui support.
--   Override with -DENABLE_GR_QTGUI=ON/OFF
-- 
-- Configuring gr-trellis support...
--   Disabling gr-trellis support.
--   Override with -DENABLE_GR_TRELLIS=ON/OFF
-- Found UHD: /usr/pkg/lib/libuhd.so (Required is at least version "3.9.7")
-- Python checking for PyQt5 - found
-- 
-- Configuring gr-uhd support...
--   Dependency Boost_FOUND = TRUE
--   Dependency UHD_FOUND = TRUE
--   Disabling gr-uhd support.
--   Override with -DENABLE_GR_UHD=ON/OFF
-- 
-- Configuring gr-uhd UHD 4.0 RFNoC support...
--   Dependency ENABLE_GR_UHD = OFF
--   Dependency UHD_FOUR_POINT_OH_RFNOC = TRUE
--   Disabling gr-uhd UHD 4.0 RFNoC support.
--   Override with -DENABLE_UHD_RFNOC=ON/OFF
-- Python checking for Mako >= 1.1.0 - found
-- Python checking for click - found
-- 
-- Configuring gr-utils support...
--   Dependency ENABLE_PYTHON = ON
--   Dependency MAKO_FOUND = TRUE
--   Disabling gr-utils support.
--   Override with -DENABLE_GR_UTILS=ON/OFF
-- 
-- Configuring gr_modtool support...
--   Dependency ENABLE_PYTHON = ON
--   Dependency CLICK_FOUND = TRUE
--   Disabling gr_modtool support.
--   Override with -DENABLE_GR_MODTOOL=ON/OFF
-- 
-- Configuring gr_blocktool support...
--   Dependency ENABLE_PYTHON = ON
--   Disabling gr_blocktool support.
--   Override with -DENABLE_GR_BLOCKTOOL=ON/OFF
-- Could NOT find SDL (missing: SDL_LIBRARY SDL_INCLUDE_DIR) 
-- 
-- Configuring gr-video-sdl support...
--   Dependency SDL_FOUND = FALSE
--   Disabling gr-video-sdl support.
--   Override with -DENABLE_GR_VIDEO_SDL=ON/OFF
-- 
-- Configuring gr-vocoder support...
--   Disabling gr-vocoder support.
--   Override with -DENABLE_GR_VOCODER=ON/OFF
-- 
-- Configuring gr-wavelet support...
--   Dependency GSL_FOUND = TRUE
--   Disabling gr-wavelet support.
--   Override with -DENABLE_GR_WAVELET=ON/OFF
-- Checking for module 'libzmq'
--   Package 'libzmq' not found
-- Could NOT find ZeroMQ (missing: ZEROMQ_LIBRARIES) 
-- 
-- Configuring gr-zeromq support...
--   Dependency ZEROMQ_FOUND = FALSE
--   Dependency CPPZMQ_HAS_SHUTDOWN = 
--   Disabling gr-zeromq support.
--   Override with -DENABLE_GR_ZEROMQ=ON/OFF
-- 
-- Configuring gr-network support...
--   Dependency Boost_FOUND = TRUE
--   Disabling gr-network support.
--   Override with -DENABLE_GR_NETWORK=ON/OFF
-- 
-- Configuring gr-soapy support...
--   Dependency SoapySDR_FOUND = 1
--   Disabling gr-soapy support.
--   Override with -DENABLE_GR_SOAPY=ON/OFF
-- 
-- ######################################################
-- # Gnuradio enabled components                         
-- ######################################################
--   * python-support
--   * gnuradio-runtime
--   * gr-ctrlport
--   * gr-blocks
--   * gr-fft
--   * gr-filter
--   * gr-analog
--   * gr-audio
--   * * oss
--   * * jack
--   * * portaudio
-- 
-- ######################################################
-- # Gnuradio disabled components                        
-- ######################################################
--   * testing-support
--   * post-install
--   * doxygen
--   * man-pages
--   * common-precompiled-headers
--   * gnuradio-companion
--   * gr-fec
--   * gr-digital
--   * gr-dtv
--   * gr-channels
--   * gr-pdu
--   * gr-iio
--   * gr-qtgui
--   * gr-trellis
--   * gr-uhd
--   * gr-uhd UHD 4.0 RFNoC
--   * gr-utils
--   * gr_modtool
--   * gr_blocktool
--   * gr-video-sdl
--   * gr-vocoder
--   * gr-wavelet
--   * gr-zeromq
--   * gr-network
--   * gr-soapy
-- 
-- Using install prefix: /usr/pkg
-- Building for version: 3.10.12.0 / 3.10.12
-- Configuring done (15.7s)
-- Generating done (0.2s)
CMake Warning:
  Manually-specified variables were not used by the project:

    FETCHCONTENT_FULLY_DISCONNECTED
    Python3_EXECUTABLE
    Python3_INCLUDE_DIR
    Python_EXECUTABLE
    Python_INCLUDE_DIR


-- Build files have been written to: 
/tmp/work/ham/gnuradio-core/work/gnuradio-3.10.12.0/cmake-pkgsrc-build


Reply via email to