From e2d3ad53a18f12fdb7e581524c8b7db1a667c1d9 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 23 Mar 2019 11:28:50 +0100 Subject: [PATCH 1/4] Add openSUSE to the list of distributions, reorder alphabetically --- README.md | 47 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 3cc77bcdc..f3b0ffdfc 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ This section describes how to set up the compilation environment in GNU/Linux or GNU/Linux ---------- - * Tested distributions: Ubuntu 14.04 LTS and above; Debian 8.0 "jessie" and above; Fedora 26 and above; CentOS 7; Arch Linux. + * Tested distributions: Ubuntu 14.04 LTS and above; Debian 8.0 "jessie" and above; Arch Linux; CentOS 7; Fedora 26 and above; OpenSUSE 42.3 and above. * Supported microprocessor architectures: * i386: Intel x86 instruction set (32-bit microprocessors). * 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. @@ -79,21 +79,19 @@ Please note that the required files from `libgtest-dev` were moved to `googletes Once you have installed these packages, you can jump directly to [download the source code and build GNSS-SDR](#download-and-build-linux). +#### Arch Linux -#### Fedora - -If you are using Fedora 26 or above, the required software dependencies can be installed by doing: +If you are using Arch Linux: ~~~~~~ -$ 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 python-mako python-six pugixml-devel +$ pacman -S gcc make cmake git boost boost-libs log4cpp libvolk gnuradio \ + gnuradio-osmosdr blas lapack gflags google-glog openssl pugixml \ + python-mako python-six libmatio libpcap gtest ~~~~~~ Once you have installed these packages, you can jump directly to [download the source code and build GNSS-SDR](#download-and-build-linux). + #### CentOS If you are using CentOS 7, you can install the dependencies via Extra Packages for Enterprise Linux ([EPEL](https://fedoraproject.org/wiki/EPEL)): @@ -111,18 +109,39 @@ $ sudo yum install make automake gcc gcc-c++ kernel-devel libtool \ Once you have installed these packages, you can jump directly to [download the source code and build GNSS-SDR](#download-and-build-linux). -#### Arch Linux -If you are using Arch Linux: +#### Fedora + +If you are using Fedora 26 or above, the required software dependencies can be installed by doing: ~~~~~~ -$ pacman -S gcc make cmake git boost boost-libs log4cpp libvolk gnuradio \ - gnuradio-osmosdr blas lapack gflags google-glog openssl pugixml \ - python-mako python-six libmatio libpcap gtest +$ 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 python-mako python-six pugixml-devel ~~~~~~ Once you have installed these packages, you can jump directly to [download the source code and build GNSS-SDR](#download-and-build-linux). + +#### 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_date_time-devel \ + libboost_thread-devel libboost_chrono-devel libboost_serialization-devel \ + log4cpp-devel gtest gnuradio-devel pugixml-devel libpcap-devel \ + armadillo-devel libtool automake hdf5-devel libopenssl-devel python-Mako \ + python-six +~~~~~~ + +Once you have installed these packages, you can jump directly to [download the source code and build GNSS-SDR](#download-and-build-linux). + + + ### 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 to use [PyBOMBS](https://github.com/gnuradio/pybombs "Python Build Overlay Managed Bundle System") (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. From b0f971fc56b83d367907fde9f6507e82d4a386c4 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 23 Mar 2019 11:31:53 +0100 Subject: [PATCH 2/4] Remove wrong lines from old script --- src/algorithms/signal_source/adapters/CMakeLists.txt | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/algorithms/signal_source/adapters/CMakeLists.txt b/src/algorithms/signal_source/adapters/CMakeLists.txt index 5374a6fbf..dc19570e1 100644 --- a/src/algorithms/signal_source/adapters/CMakeLists.txt +++ b/src/algorithms/signal_source/adapters/CMakeLists.txt @@ -120,11 +120,7 @@ if(ENABLE_OSMOSDR) ################################################################################ # OsmoSDR - http://sdr.osmocom.org/trac/ ################################################################################ - if(NOT GROSMOSDR_FOUND) - if(ENABLE_PACKAGING) - list(REMOVE_ITEM SIGNAL_SOURCE_ADAPTER_HEADERS ${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/adapters/osmosdr_signal_source.h) - endif() - else() + if(GROSMOSDR_FOUND) set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} osmosdr_signal_source.cc) set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} osmosdr_signal_source.h) endif() @@ -162,10 +158,12 @@ set(SIGNAL_SOURCE_ADAPTER_HEADERS if(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.3) set(SIGNAL_SOURCE_ADAPTER_SOURCES ${SIGNAL_SOURCE_ADAPTER_SOURCES} two_bit_cpx_file_signal_source.cc - two_bit_packed_file_signal_source.cc) + two_bit_packed_file_signal_source.cc + ) set(SIGNAL_SOURCE_ADAPTER_HEADERS ${SIGNAL_SOURCE_ADAPTER_HEADERS} two_bit_cpx_file_signal_source.h - two_bit_packed_file_signal_source.h) + two_bit_packed_file_signal_source.h + ) endif() list(SORT SIGNAL_SOURCE_ADAPTER_HEADERS) From 28ade251574a0198a71d5c30eadab10a6fa90987 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 23 Mar 2019 12:57:45 +0100 Subject: [PATCH 3/4] Improve OpenSSL detection in Homebrew and messages if it fails --- CMakeLists.txt | 13 ++++++++++--- README.md | 19 +++++++------------ 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f4418eb8c..76c940237 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1545,7 +1545,13 @@ find_library(GNUTLS_OPENSSL_LIBRARY NAMES gnutls-openssl libgnutls-openssl.so.27 /usr/lib/sh4-linux-gnu ) if(NOT GNUTLS_OPENSSL_LIBRARY) - message(STATUS "Looking for OpenSSL instead...") + if(GnuTLS_FOUND) + message(STATUS " But it was not built with openssl compatibility.") + endif() + message(STATUS " Looking for OpenSSL instead...") + if(OS_IS_MACOSX) + set(OPENSSL_ROOT_DIR /usr/local/opt/openssl) # Trick for Homebrew + endif() find_package(OpenSSL) set_package_properties(OpenSSL PROPERTIES URL "https://www.openssl.org" @@ -1567,11 +1573,12 @@ if(NOT GNUTLS_OPENSSL_LIBRARY) if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") message(" sudo yum install openssl-devel") else() - message(" sudo apt-get install libgnutls-openssl-dev") + message(" sudo apt-get install libgnutls28-dev") endif() endif() if(OS_IS_MACOSX) - message(" sudo port install gnutls") + message(" 'sudo port install gnutls', if you are using Macports, or") + message(" 'brew install openssl', if you are using Homebrew.") endif() message(FATAL_ERROR "GnuTLS libraries with openssl compatibility are required to build gnss-sdr") endif() diff --git a/README.md b/README.md index f3b0ffdfc..65f84503f 100644 --- a/README.md +++ b/README.md @@ -563,16 +563,16 @@ In a terminal, type: ~~~~~~ $ sudo port selfupdate $ sudo port upgrade outdated -$ sudo port install doxygen +docs $ sudo port install gnuradio $ sudo port install lapack $ sudo port install armadillo $ sudo port install gnutls $ sudo port install google-glog +gflags -$ sudo port install py27-mako -$ sudo port install py27-six $ sudo port install matio $ sudo port install pugixml +$ sudo port install py27-mako +$ sudo port install py27-six +$ sudo port install doxygen +docs ~~~~~~ You also might need to activate a Python installation. The list of installed versions can be retrieved with: @@ -609,23 +609,18 @@ Install the required dependencies: $ brew install cmake $ brew install hdf5 $ brew install lapack -$ brew install arpack superlu armadillo -$ brew install glog gflags +$ brew install armadillo +$ brew install gflags +$ brew install glog $ brew install gnuradio $ brew install libmatio $ brew install log4cpp +$ brew install openssl $ brew install pugixml $ pip install mako $ pip install six -$ brew install openssl ~~~~~~ -In the last step, Homebrew installs OpenSSL but it does not link it to `/usr/local`. Thus, you must manually link it instead: - -~~~~~~ -$ ln -s /usr/local/opt/openssl/include/openssl /usr/local/include -$ ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/ -~~~~~~ #### Build GNSS-SDR From 1b0697fdf92b240e41b790e2da3372d6ee8ee554 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 23 Mar 2019 12:59:49 +0100 Subject: [PATCH 4/4] Simplify script --- .../signal_source/adapters/CMakeLists.txt | 26 +++++++------------ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/src/algorithms/signal_source/adapters/CMakeLists.txt b/src/algorithms/signal_source/adapters/CMakeLists.txt index dc19570e1..a8f515aec 100644 --- a/src/algorithms/signal_source/adapters/CMakeLists.txt +++ b/src/algorithms/signal_source/adapters/CMakeLists.txt @@ -32,7 +32,7 @@ if(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2) message(STATUS " * libiio from https://github.com/analogdevicesinc/libiio") message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio") message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-iio") - message(FATAL_ERROR "gnuradio-iio is required for building gnss-sdr with this option enabled.") + message(FATAL_ERROR "gnuradio-iio is required for building gnss-sdr with -DENABLE_PLUTOSDR=ON or -DENABLE_FMCOMMS2=ON.") endif() endif() @@ -44,7 +44,7 @@ if(ENABLE_AD9361) message(STATUS " * libiio from https://github.com/analogdevicesinc/libiio") message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio") message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-iio") - message(FATAL_ERROR "libiio is required for building gnss-sdr with this option enabled.") + message(FATAL_ERROR "libiio is required for building gnss-sdr with -DENABLE_AD9361=ON.") endif() endif() @@ -53,10 +53,8 @@ if(ENABLE_PLUTOSDR) ############################################## # ADALM-PLUTO (Analog Devices Inc.) ############################################## - if(GRIIO_FOUND) - set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} plutosdr_signal_source.cc) - set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} plutosdr_signal_source.h) - endif() + set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} plutosdr_signal_source.cc) + set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} plutosdr_signal_source.h) endif() @@ -64,10 +62,8 @@ if(ENABLE_FMCOMMS2) ############################################### # FMCOMMS2 based SDR Hardware ############################################### - if(GRIIO_FOUND) - set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} fmcomms2_signal_source.cc) - set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} fmcomms2_signal_source.h) - endif() + set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} fmcomms2_signal_source.cc) + set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} fmcomms2_signal_source.h) endif() @@ -75,10 +71,8 @@ if(ENABLE_AD9361) ############################################### # AD9361 DIRECT TO FPGA Hardware ############################################### - if(LIBIIO_FOUND) - set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} ad9361_fpga_signal_source.cc) - set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} ad9361_fpga_signal_source.h) - endif() + set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} ad9361_fpga_signal_source.cc) + set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} ad9361_fpga_signal_source.h) endif() @@ -127,7 +121,7 @@ if(ENABLE_OSMOSDR) endif() -if(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd) +if(ENABLE_UHD) set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} uhd_signal_source.cc) set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} uhd_signal_source.h) endif() @@ -203,7 +197,7 @@ if(ENABLE_RAW_UDP AND PCAP_FOUND) ) endif() -if(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd) +if(ENABLE_UHD) target_link_libraries(signal_source_adapters PUBLIC Gnuradio::uhd