8000 GitHub - gnss-sdr/gnss-sdr: GNSS-SDR, an open-source software-defined GNSS receiver
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

gnss-sdr/gnss-sdr

Repository files navigation

License: GPL v3 REUSE status Contributor Covenant

Welcome to GNSS-SDR!

This program is a software-defined receiver which is able to process (that is, to perform detection, synchronization, demodulation and decoding of the navigation message, computation of observables, and, finally, computation of position fixes) the following Global Navigation Satellite System's signals:

In the L1 band:

  • 🛰 GLONASS L1 C/A (centered at 1602.000 MHz) ✅
  • 🛰 GPS L1 C/A (centered at 1575.420 MHz) ✅
  • 🛰 Galileo E1b/c (centered at 1575.420 MHz) ✅
  • 🛰 BeiDou B1I (centered at 1561.098 MHz) ✅

In the E6 band:

  • 🛰 Galileo E6B (centered at 1278.750 MHz) ✅

In the L2 band:

  • 🛰 BeiDou B3I (centered at 1268.520 MHz) ✅
  • 🛰 GLONASS L2 C/A (centered at 1246.000 MHz) ✅
  • 🛰 GPS L2C (centered at 1227.600 MHz) ✅

In the L5 band:

  • 🛰 Galileo E5b (centered at 1207.140 MHz) ✅
  • 🛰 Galileo E5a (centered at 1176.450 MHz) ✅
  • 🛰 GPS L5 (centered at 1176.450 MHz) ✅

GNSS-SDR provides interfaces for a wide range of radio frequency front-ends and raw sample file formats, generates processing outputs in standard formats, allows for the full inspection of the whole signal processing chain, and offers a framework for the development of new features. Please visit https://gnss-sdr.org for more information about this open-source, software-defined GNSS receiver.

✨ See what's new in the changelog.

Table of Contents

(click to expand)

How to build GNSS-SDR

This section describes how to set up the compilation environment in GNU/Linux or macOS / Mac OS X, and to build GNSS-SDR. See also our build and install page.

GNU/Linux

  • Tested distributions: Ubuntu 14.04 LTS and above; Debian 9.0 "stretch" and above; Arch Linux; Fedora 26 and above; OpenSUSE 42.3 and above.
  • Supported microprocessor architectures:
    • amd64: also known as x86-64, the 64-bit version of the x86 instruction set, originally created by AMD and implemented by AMD, Intel, VIA, and others.
    • armel: ARM embedded ABI, supported on ARM v4t and higher.
    • armhf: ARM hard float, ARMv7 + VFP3-D16 floating-point hardware extension + Thumb-2 instruction set and above.
    • arm64: ARM 64 bits or ARMv8. Also known as AArch64.
    • i386: Intel x86 instruction set (32-bit microprocessors).
    • loong64: 64-bit version of LoongArch, a RISC-style instruction set architecture developed by Loongson Technology.
    • mips: MIPS architecture (big-endian, such as those manufactured by SGI).
    • mipsel: MIPS architecture (little-endian, such as Loongson 3).
    • mips64el: 64-bit version of MIPS architecture.
    • powerpc: the RISC 32-bit microprocessor architecture developed by IBM, Motorola (now Freescale), and Apple.
    • ppc64: 64-bit big-endian PowerPC architecture.
    • ppc64el: 64-bit little-endian PowerPC architecture.
    • riscv64: 64-bit RISC-V open standard instruction set architecture.
    • s390x: IBM System z architecture for mainframe computers.

Older distribution releases might work as well, but you will need GCC 4.7 or newer.

Before building GNSS-SDR, you need to install all the required dependencies. There are two alternatives here: through software packages or building them from the source code. It is in general not a good idea to mix both approaches.

Alternative 1: Install dependencies using software packages

If you want to start building and running GNSS-SDR as quickly and easily as possible, the best option is to install all the required dependencies as binary packages.

Debian / Ubuntu

If you are using Debian 9, Ubuntu 14.10 or above, this can be done by copying and pasting the following line in a terminal:

$ sudo apt install build-essential cmake git pkg-config libboost-dev libboost-date-time-dev \
       libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev \
       libboost-serialization-dev liblog4cpp5-dev libuhd-dev gnuradio-dev gr-osmosdr \
       libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev \
       libssl-dev libpcap-dev libmatio-dev libpugixml-dev libgtest-dev \
       libprotobuf-dev libcpu-features-dev protobuf-compiler python3-mako

Please note that the required files from libgtest-dev were named googletest in Debian 9 "stretch" and Ubuntu 18.04 "bionic", and renamed to libgtest-dev in Debian 10 "buster" and above.

In distributions older than Ubuntu 21.04 Hirsute / Debian 11, the package libcpu-features-dev is not required.

In distributions older than Ubuntu 22.04 Jammy / Debian 12, the package libssl-dev must be replaced by libgnutls-openssl-dev.

Note for Ubuntu 14.04 LTS "trusty" users: you will need to build from source and install GNU Radio manually, as explained below, since GNSS-SDR requires gnuradio-dev >= 3.7.3, and Ubuntu 14.04 came with 3.7.2. Install all the packages above BUT EXCEPT libuhd-dev, gnuradio-dev, and gr-osmosdr (and remove them if they are already installed in your machine), and install those dependencies using PyBOMBS. The same applies to libmatio-dev: Ubuntu 14.04 came with 1.5.2 and the minimum required version is 1.5.3. Please do not install the libmatio-dev package and install libtool, automake and libhdf5-dev instead. A recent version of the library will be downloaded and built automatically if CMake does not find it installed.

In distributions older than Ubuntu 16.04 or Debian 9, python3-mako must be replaced by python-mako. For Ubuntu 14.04, you will need to add the package python-six to the list of dependencies.

Once you have installed these packages, you can jump directly to download the source code and build GNSS-SDR.

AlmaLinux

If you are using AlmaLinux:

# dnf update -y
# dnf install -y 'dnf-command(config-manager)'
# dnf config-manager --set-enabled powertools
# dnf install -y epel-release
# dnf install -y make gcc gcc-c++ kernel-devel cmake git boost-devel \
      boost-date-time boost-system boost-thread boost-chrono \
      boost-serialization log4cpp-devel gmp-devel uhd-devel gnuradio-devel \
      pugixml-devel matio-devel protobuf-devel glog-devel libpcap-devel \
      blas-devel lapack-devel armadillo-devel openssl-devel python3-mako \
      libarchive

Once you have installed these packages, yo F438 u can jump directly to download the source code and build GNSS-SDR.

Arch Linux

If you are using Arch Linux:

$ pacman -S gcc make cmake pkgconf git boost boost-libs libvolk gnuradio \
       blas lapack hdf5 openssl pugixml libmatio protobuf libpcap gtest \
       python-mako

Once you have installed these packages, you can jump directly to download the source code and build GNSS-SDR.

Fedora

If you are using Fedora 26 or above, the required software dependencies can be installed by doing:

$ sudo yum install make automake gcc gcc-c++ kernel-devel cmake git boost-devel \
       boost-date-time boost-system boost-filesystem boost-thread boost-chrono \
       boost-serialization log4cpp-devel gnuradio-devel gr-osmosdr-devel \
       blas-devel lapack-devel matio-devel armadillo-devel gflags-devel \
       glog-devel openssl-devel libpcap-devel pugixml-devel python3-mako \
       protobuf-devel protobuf-compiler

In Fedora 33 and above, you will need to add gmp-devel to the package list. Optionally, you can add uhd-devel starting from Fedora 32.

In Fedora 36 and above, packages spdlog-devel and fmt-devel are also required.

openSUSE

If you are using openSUSE Leap:

$ zypper install cmake git gcc-c++ boost-devel libboost_atomic-devel \
       libboost_system-devel libboost_filesystem-devel libboost_chrono-devel \
       libboost_thread-devel libboost_serialization-devel log4cpp-devel \
       gnuradio-devel pugixml-devel libpcap-devel armadillo-devel libtool \
       automake hdf5-devel openssl-devel python3-Mako libmatio-devel

If you are using openSUSE Tumbleweed:

$ zypper install cmake git gcc-c++ boost-devel libboost_atomic-devel \
       libboost_system-devel libboost_filesystem-devel libboost_date_time-devel \
       libboost_thread-devel libboost_chrono-devel libboost_serialization-devel \
       spdlog-devel fmt-devel gtest gnuradio-devel pugixml-devel libpcap-devel \
       armadillo-devel libtool automake hdf5-devel libopenssl-devel \
       python3-Mako protobuf-devel

Once you have installed these packages, you can jump directly to download the source code and build GNSS-SDR.

Rocky Linux

If you are using Rocky Linux:

$ dnf install -y 'dnf-command(config-manager)'
$ dnf config-manager --set-enabled powertools
$ yum install -y epel-release
$ yum install -y make gcc gcc-c++ kernel-devel cmake git boost-devel \
       boost-date-time boost-system boost-thread boost-chrono boost-serialization \
       log4cpp-devel gmp-devel uhd-devel gnuradio-devel pugixml-devel matio-devel \
       protobuf-devel glog-devel libpcap-devel blas-devel lapack-devel \
       armadillo-devel openssl-devel python3-mako libarchive

Once you have installed these packages, you can jump directly to download the source code and build GNSS-SDR.

Alternative 2: Install dependencies using PyBOMBS

This option is adequate if you are interested in development, in working with the most recent versions of software dependencies, want more fine-tuning on the installed versions, or simply in building everything from the scratch just for the fun of it. In such cases, we recommend using PyBOMBS (Python Build Overlay Managed Bundle System), GNU Radio's meta-package manager tool that installs software from source, or whatever the local package manager is, that automatically does all the work for you. Please take a look at the configuration options and general PyBOMBS usage at https://github.com/gnuradio/pybombs. Here we provide a quick step-by-step tutorial.

First of all, install some basic packages:

$ sudo apt install git python3-pip

Download, build and install PyBOMBS:

$ sudo pip3 install --upgrade git+https://github.com/gnuradio/pybombs.git

Apply a configuration:

$ pybombs auto-config

Add list of default recipes:

$ pybombs recipes add-defaults

Download, build and install GNU Radio, related drivers, and some other extra modules into the directory /path/to/prefix (replace this path by your preferred one, for instance $HOME/sdr):

$ pybombs prefix init /path/to/prefix -a myprefix -R gnuradio-default

This will perform a local installation of the dependencies under /path/to/prefix, so they will not be visible when opening a new terminal. In order to make them available, you will need to set up the adequate environment variables:

$ cd /path/to/prefix
$ . ./setup_env.sh

Now you are ready to use GNU Radio and to jump into building GNSS-SDR after installing a few other dependencies. Actually, those are steps that PyBOMBS can do for you as well:

$ pybombs install gnss-sdr

By default, PyBOMBS installs the ‘next’ branch of GNSS-SDR development, which is the most recent version of the source code. This behavior can be modified by altering the corresponding recipe at $HOME/.pybombs/recipes/gr-recipes/gnss-sdr.lwr

In case you do not want to use PyBOMBS and prefer to build and install GNSS-SDR step by step (i.e., cloning the repository and doing the usual cmake .. && make && make install dance), Armadillo, GFlags, Glog, GnuTLS, and Matio can be installed either by using PyBOMBS:

$ pybombs install armadillo gflags glog gnutls matio

or manually as explained below, and then please follow instructions on how to download the source code and build GNSS-SDR.

Manual installation of other required dependencies

Install Armadillo, a C++ linear algebra library

$ sudo apt install libblas-dev liblapack-dev       # For Debian/Ubuntu/LinuxMint
$ sudo yum install lapack-devel blas-devel             # For Fedora/RHEL
$ sudo zypper install lapack-devel blas-devel          # For OpenSUSE
$ sudo pacman -S blas lapack                           # For Arch Linux
$ wget https://sourceforge.net/projects/arma/files/armadillo-14.4.1.tar.xz
$ tar xvfz armadillo-14.4.1.tar.xz
$ cd armadillo-14.4.1
$ cmake .
$ make
$ sudo make install

The full stop separated from cmake by a space is important. CMake will figure out what other libraries are currently installed and will modify Armadillo's configuration correspondingly. CMake will also generate a run-time armadillo library, which is a combined alias for all the relevant libraries present on your system (e.g., BLAS, LAPACK, and ATLAS).

Install Gflags, a commandline flags processing module for C++

$ wget https://github.com/gflags/gflags/archive/v2.2.2.tar.gz
$ tar xvfz v2.2.2.tar.gz
$ cd gflags-2.2.2
$ cmake -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF -DBUILD_gflags_nothreads_LIB=OFF .
$ make
$ sudo make install
$ sudo ldconfig

Please note that GFlags is replaced by the Abseil Flags Library if Abseil >= v20240116 is available in your system.

Install Glog, a library that implements application-level logging

$ wget https://github.com/google/glog/archive/v0.7.1.tar.gz
$ tar xvfz v0.7.1.tar.gz
$ cd glog-0.7.1
$ mkdir build && cd build
$ cmake ..
$ make
$ sudo make install
$ sudo ldconfig

Please note that Glog is replaced by the Abseil Logging Library if Abseil >= v20240116 is available in your system.

Install the OpenSSL libraries

$ sudo apt install libssl-dev             # For Debian/Ubuntu/LinuxMint
$ sudo yum install openssl-devel          # For Fedora/CentOS/RHEL
$ sudo zypper install openssl-devel       # For OpenSUSE
$ sudo pacman -S openssl                  # For Arch Linux

Install Matio, MATLAB MAT file I/O library

$ wget https://github.com/tbeu/matio/releases/download/v1.5.28/matio-1.5.28.tar.gz
$ tar xvfz matio-1.5.28.tar.gz
$ cd matio-1.5.28
$ ./configure
$ make
$ sudo make install
$ sudo ldconfig

Install Protocol Buffers, a portable mechanism for serialization of structured data

GNSS-SDR requires Protocol Buffers v3.0.0 or later. If the packages that come with your distribution are older than that (e.g., Ubuntu 16.04 Xenial came with an older versions), then you will need to install it manually:

$ git clone --recursive https://github.com/protocolbuffers/protobuf.git
$ cd protobuf
$ cmake -DABSL_PROPAGATE_CXX_STD=ON -Dprotobuf_BUILD_TESTS=OFF .
$ cmake --build --config Release --target install .
$ sudo ldconfig

For more options, please check the Protocol Buffers' installation instructions.

Install Pugixml, a light-weight C++ XML processing library

$ wget https://github.com/zeux/pugixml/releases/download/v1.15/pugixml-1.15.tar.gz
$ tar xvfz pugixml-1.15.tar.gz
$ cd pugixml-1.15
$ mkdir build && cd build
$ cmake ..
$ make
$ sudo make install
$ sudo ldconfig

Download GoogleTest

$ wget https://github.com/google/googletest/archive/refs/tags/v1.16.0.zip
$ unzip v1.16.0.zip

Please DO NOT build or install Google Test. Every user needs to compile tests using the same compiler flags used to compile the Google Test libraries; otherwise, he or she may run into undefined behaviors (i.e., the tests can behave strangely and may even crash for no obvious reasons). The explanation is that C++ has the One-Definition Rule: if two C++ source files contain different definitions of the same class/function/variable, and you link them together, you violate the rule. The linker may or may not catch the error (in many cases it is not required by the C++ standard to catch the violation). If it does not, you get strange run-time behaviors that are unexpected and hard to debug. If you compile Google Test and your test code using different compiler flags, they may see different definitions of the same class/function/variable (e.g., due to the use of #if in Google Test). Therefore, for your sanity, GNSS-SDR does not make use of pre-compiled Google Test libraries. Instead, it compiles Google Test's source code itself, such that it can be sure that the same flags are used for both Google Test and the tests. The building system of GNSS-SDR manages the compilation and linking of Google Test's source code to its own tests; it is only required that you tell the system where the Google Test folder that you downloaded resides. Just type in your terminal (or add it to your $HOME/.bashrc file for a permanent solution) the following line:

export GTEST_DIR=/home/username/googletest-1.16.0

changing /home/username/googletest-1.16.0 by the actual path where you unpacked Google Test. If the CMake script does not find that folder, or the environment variable is not defined, or the source code is not installed by a package, then it will download a fresh copy of the Google Test source code and will compile and link it for you.

Clone GNSS-SDR's Git repository

$ git clone https://github.com/gnss-sdr/gnss-sdr

Cloning the GNSS-SDR repository as in the line above will create a folder named gnss-sdr with the following structure:

 |-gnss-sdr
 |---cmake      <- CMake-related files.
 |---conf       <- Configuration files. Each file defines one particular receiver.
 |---docs       <- Contains documentation-related files.
 |---install    <- Executables will be placed here.
 |---src        <- Source code folder.
 |-----algorithms  <- Signal processing blocks.
 |-----core     <- Control plane, interfaces, systems' parameters.
 |-----main     <- Main function of the C++ program.
 |---tests      <- QA code.
 |---utils      <- some utilities (e.g. Matlab scripts).

By default, you will be in the 'main' branch of the Git repository, which corresponds to the latest stable release. If you want to try the latest developments, you can use the 'next' branch by going to the newly created gnss-sdr folder doing:

$ git checkout next

More information about GNSS-SDR-specific Git usage and pointers to further readings can be found at our Git tutorial.

Build and install GNSS-SDR

Go to GNSS-SDR's build directory:

$ cd gnss-sdr

Configure and build the application:

$ cmake -S . -B build
$ cmake --build build

By default, CMake will build the Release version, meaning that the compiler will generate a fast, optimized executable. This is the recommended build type when using an RF front-end and you need to attain real-time. If working with a file (and thus without real-time constraints), you may want to obtain more information about the internals of the receiver, as well as more fine-grained logging. This can be done by building the Debug version, by doing:

$ cmake -S . -B build-debug -DCMAKE_BUILD_TYPE=Debug
$ cmake --build build-debug

This will create four executables at gnss-sdr/install, namely gnss-sdr, run_tests, front-end-cal and volk_gnsssdr_profile. You can run them from that folder, but if you prefer to install gnss-sdr on your system and have it available anywhere else, do:

$ sudo cmake --install build

This will also make a copy of the conf/ folder into /usr/local/share/gnss-sdr/conf for your reference. We suggest creating a working directory at your preferred location and store your own configuration and data files there.

You could be interested in creating the documentation (requires: sudo apt install doxygen-latex in Ubuntu/Debian) by doing:

$ cmake --build build --target doc

This will generate HTML documentation that can be retrieved pointing your browser of preference to build/docs/html/index.html. If a LaTeX installation is detected in your system,

$ cmake --build build --target pdfmanual

will create a PDF manual at build/docs/GNSS-SDR_manual.pdf. Finally,

$ cmake --build build --target doc-clean

will remove the content of previously generated documentation.

GNSS-SDR comes with a library which is a module of the Vector-Optimized Library of Kernels (so-called VOLK_GNSSSDR) and a profiler that will build a config file for the best SIMD architecture for your processor. Run volk_gnsssdr_profile that is installed into $PREFIX/bin. This program tests all known VOLK kernels for each architecture supported by the processor. When finished, it will write to $HOME/.volk_gnsssdr/volk_gnsssdr_config the best architecture for the VOLK function. This file is read when using a function to know the best version of the function to execute. It mimics GNU Radio's VOLK library, so if you still have not run volk_profile, this is a good moment to do so.

Build OSMOSDR support (OPTIONAL)

Install the OsmoSDR library and GNU Radio's source block:

$ git clone git://git.osmocom.org/osmo-sdr.git
$ cd osmo-sdr/software/libosmosdr
$ mkdir build
$ cd build/
$ cmake ..
$ make
$ sudo make install
$ sudo ldconfig
$ cd ../..
$ git clone git://git.osmocom.org/gr-osmosdr
$ cd gr-osmosdr
$ mkdir build
$ cd build
$ cmake .. -Wno-dev
$ make
$ sudo make install
$ sudo ldconfig

Then, configure GNSS-SDR to build the Osmosdr_Signal_Source by:

$ cmake -S . -B build -DENABLE_OSMOSDR=ON
$ cmake --build build
$ sudo cmake --install build

(in order to disable the Osmosdr_Signal_Source compilation, you can pass -DENABLE_OSMOSDR=OFF to cmake and build GNSS-SDR again).

Build FMCOMMS2 based SDR Hardware support (OPTIONAL)

Install the libiio (>=v0.11), libad9361 (>=v0.1-1) libraries and gr-iio (>v0.3) gnuradio block:

$ sudo apt install libxml2-dev bison flex
$ git clone https://github.com/analogdevicesinc/libiio.git
$ cd libiio
$ mkdir build
$ cd build
$ cmake ..
$ make && sudo make install && sudo ldconfig
$ cd ../..
$ git clone https://github.com/analogdevicesinc/libad9361-iio.git
$ cd libad9361-iio
$ mkdir build
$ cd build
$ cmake ..
$ make && sudo make install && sudo ldconfig
$ cd ../..
$ git clone https://github.com/analogdevicesinc/gr-iio.git
$ cd gr-iio
$ mkdir build
$ cd build
$ cmake -DCMAKE_INSTALL_PREFIX=/usr ..
$ make && sudo make install && sudo ldconfig
$ cd ../..

Then configure GNSS-SDR to build the Fmcomms2_Signal_Source implementation:

$ cd gnss-sdr
$ cmake -S . -B build -DENABLE_FMCOMMS2=ON
$ cmake --build build
$ sudo cmake --install build

or configure it to build Plutosdr_Signal_Source:

$ cmake -S . -B build -DENABLE_PLUTOSDR=ON
$ cmake --build build
$ sudo cmake --install build

With Fmcomms2_Signal_Source you can use any SDR hardware based on FMCOMMS2, including the ADALM-PLUTO (PlutoSdr) by configuring correctly the .conf file. The Plutosdr_Signal_Source offers a simpler manner to use the ADALM-PLUTO because implements only a subset of FMCOMMS2's parameters valid for those devices.

Build OpenCL support (OPTIONAL)

In order to enable the building of blocks that use OpenCL, type:

$ cmake -S . -B build -DENABLE_OPENCL=ON
$ cmake --build build
$ sudo cmake --install build

Build CUDA support (OPTIONAL)

In order to enable the building of blocks that use CUDA, NVIDIA's parallel programming model that enables graphics processing unit (GPU) acceleration for data-parallel computations, first you need to install the CUDA Toolkit from NVIDIA Developers Download page. Make sure that the SDK samples build well. Then, build GNSS-SDR by doing:

$ cmake -S . -B build -DENABLE_CUDA=ON
$ cmake --build build
$ sudo cmake --install build

Of course, you will also need a GPU that supports CUDA.

macOS

GNSS-SDR can be built on macOS (or the former Mac OS X), starting from 10.9 (Mavericks) and including 14 (Sonoma). If you still have not installed Xcode, do it now from the App Store (it's free). You will also need the Xcode Command Line Tools, which do not come by default in macOS versions older than Big Sur. If you are using an older version, please launch the Terminal, found in /Applications/Utilities/, and type:

$ xcode-select --install

Agree to Xcode license:

$ sudo xcodebuild -license

Software pre-requisites can be installed using either Macports or Homebrew.

Macports

First, install Macports. If you are upgrading from a previous installation, please follow the migration rules.

In a terminal, type:

$ sudo port selfupdate
$ sudo port upgrade outdated
$ sudo port install armadillo cmake pkgconfig protobuf3-cpp pugixml openssl3
$ sudo port install gnuradio +uhd +grc +zeromq
$ sudo port install boost matio libad9361-iio libiio abseil
$ sudo port install py313-mako
$ sudo port install doxygen +docs

For macOS versions older than Sonoma, you will also need LAPACK:

$ sudo port install lapack

You also might need to activate a Python installation. The list of installed versions can be retrieved with:

$ port select --list python

and you can activate a certain version by typing:

$ sudo port select --set python python313

Homebrew

First, install Homebrew. Paste this in a terminal prompt:

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

The script explains what it will do, and then it pauses before doing it. There are more installation options here.

Install the required dependencies:

$ brew update && brew upgrade
$ brew install armadillo cmake hdf5 gnuradio libmatio openssl pkg-config protobuf pugixml boost
$ brew install --cask mactex  # when completed, restart Terminal
$ brew install graphviz doxygen
¢ pip3 install mako

For macOS versions older than Sonoma, you will also need LAPACK:

$ brew install lapack

Other package managers

GNU Radio and other dependencies can also be installed using other package managers than Macports, such as Fink. Since the version of Python that ships with OS X is great for learning but it is not good for development, you could have another Python executable in a non-standard location. If that is the case, you need to inform GNSS-SDR's configuration system by defining the PYTHON_EXECUTABLE variable as:

$ cmake -S . -B build -DPYTHON_EXECUTABLE=/path/to/bin/python3

In case you have installed Macports in a non-standard location, you can use:

$ cmake  -S . -B build -DCMAKE_PREFIX_PATH=/opt/local -DUSE_MACPORTS_PYTHON=/opt/local/bin/python

changing /opt/local by the base directory in which your software is installed.

The CMake script will create Makefiles that download, build and link Armadillo, Gflags, Glog, Matio, Protocol Buffers, PugiXML and Google Test on the fly at compile time if they are not detected in your machine.

Build GNSS-SDR