1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-09-20 03:09:47 +00:00
This commit is contained in:
Carles Fernandez 2019-03-23 13:03:43 +01:00
commit 0ee5176123
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
3 changed files with 65 additions and 52 deletions

View File

@ -1545,7 +1545,13 @@ find_library(GNUTLS_OPENSSL_LIBRARY NAMES gnutls-openssl libgnutls-openssl.so.27
/usr/lib/sh4-linux-gnu /usr/lib/sh4-linux-gnu
) )
if(NOT GNUTLS_OPENSSL_LIBRARY) if(NOT GNUTLS_OPENSSL_LIBRARY)
if(GnuTLS_FOUND)
message(STATUS " But it was not built with openssl compatibility.")
endif()
message(STATUS " Looking for OpenSSL instead...") 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) find_package(OpenSSL)
set_package_properties(OpenSSL PROPERTIES set_package_properties(OpenSSL PROPERTIES
URL "https://www.openssl.org" 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") if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
message(" sudo yum install openssl-devel") message(" sudo yum install openssl-devel")
else() else()
message(" sudo apt-get install libgnutls-openssl-dev") message(" sudo apt-get install libgnutls28-dev")
endif() endif()
endif() endif()
if(OS_IS_MACOSX) 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() endif()
message(FATAL_ERROR "GnuTLS libraries with openssl compatibility are required to build gnss-sdr") message(FATAL_ERROR "GnuTLS libraries with openssl compatibility are required to build gnss-sdr")
endif() endif()

View File

@ -35,7 +35,7 @@ This section describes how to set up the compilation environment in GNU/Linux or
GNU/Linux 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: * Supported microprocessor architectures:
* i386: Intel x86 instruction set (32-bit microprocessors). * 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. * 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). 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 Arch Linux:
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 \ $ pacman -S gcc make cmake git boost boost-libs log4cpp libvolk gnuradio \
boost-date-time boost-system boost-filesystem boost-thread boost-chrono \ gnuradio-osmosdr blas lapack gflags google-glog openssl pugixml \
boost-serialization log4cpp-devel gnuradio-devel gr-osmosdr-devel \ python-mako python-six libmatio libpcap gtest
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). Once you have installed these packages, you can jump directly to [download the source code and build GNSS-SDR](#download-and-build-linux).
#### CentOS #### CentOS
If you are using CentOS 7, you can install the dependencies via Extra Packages for Enterprise Linux ([EPEL](https://fedoraproject.org/wiki/EPEL)): 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). 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 \ $ sudo yum install make automake gcc gcc-c++ kernel-devel cmake git boost-devel \
gnuradio-osmosdr blas lapack gflags google-glog openssl pugixml \ boost-date-time boost-system boost-filesystem boost-thread boost-chrono \
python-mako python-six libmatio libpcap gtest 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). 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 ### 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. 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.
@ -544,16 +563,16 @@ In a terminal, type:
~~~~~~ ~~~~~~
$ sudo port selfupdate $ sudo port selfupdate
$ sudo port upgrade outdated $ sudo port upgrade outdated
$ sudo port install doxygen +docs
$ sudo port install gnuradio $ sudo port install gnuradio
$ sudo port install lapack $ sudo port install lapack
$ sudo port install armadillo $ sudo port install armadillo
$ sudo port install gnutls $ sudo port install gnutls
$ sudo port install google-glog +gflags $ sudo port install google-glog +gflags
$ sudo port install py27-mako
$ sudo port install py27-six
$ sudo port install matio $ sudo port install matio
$ sudo port install pugixml $ 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: You also might need to activate a Python installation. The list of installed versions can be retrieved with:
@ -590,23 +609,18 @@ Install the required dependencies:
$ brew install cmake $ brew install cmake
$ brew install hdf5 $ brew install hdf5
$ brew install lapack $ brew install lapack
$ brew install arpack superlu armadillo $ brew install armadillo
$ brew install glog gflags $ brew install gflags
$ brew install glog
$ brew install gnuradio $ brew install gnuradio
$ brew install libmatio $ brew install libmatio
$ brew install log4cpp $ brew install log4cpp
$ brew install openssl
$ brew install pugixml $ brew install pugixml
$ pip install mako $ pip install mako
$ pip install six $ 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 #### Build GNSS-SDR

View File

@ -32,7 +32,7 @@ if(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2)
message(STATUS " * libiio from https://github.com/analogdevicesinc/libiio") message(STATUS " * libiio from https://github.com/analogdevicesinc/libiio")
message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio") message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio")
message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-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()
endif() endif()
@ -44,7 +44,7 @@ if(ENABLE_AD9361)
message(STATUS " * libiio from https://github.com/analogdevicesinc/libiio") message(STATUS " * libiio from https://github.com/analogdevicesinc/libiio")
message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio") message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio")
message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-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()
endif() endif()
@ -53,33 +53,27 @@ if(ENABLE_PLUTOSDR)
############################################## ##############################################
# ADALM-PLUTO (Analog Devices Inc.) # ADALM-PLUTO (Analog Devices Inc.)
############################################## ##############################################
if(GRIIO_FOUND)
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} plutosdr_signal_source.cc) set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} plutosdr_signal_source.cc)
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} plutosdr_signal_source.h) set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} plutosdr_signal_source.h)
endif() endif()
endif()
if(ENABLE_FMCOMMS2) if(ENABLE_FMCOMMS2)
############################################### ###############################################
# FMCOMMS2 based SDR Hardware # FMCOMMS2 based SDR Hardware
############################################### ###############################################
if(GRIIO_FOUND)
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} fmcomms2_signal_source.cc) set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} fmcomms2_signal_source.cc)
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} fmcomms2_signal_source.h) set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} fmcomms2_signal_source.h)
endif() endif()
endif()
if(ENABLE_AD9361) if(ENABLE_AD9361)
############################################### ###############################################
# AD9361 DIRECT TO FPGA Hardware # AD9361 DIRECT TO FPGA Hardware
############################################### ###############################################
if(LIBIIO_FOUND)
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} ad9361_fpga_signal_source.cc) set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} ad9361_fpga_signal_source.cc)
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} ad9361_fpga_signal_source.h) set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} ad9361_fpga_signal_source.h)
endif() endif()
endif()
if(ENABLE_GN3S) if(ENABLE_GN3S)
@ -120,18 +114,14 @@ if(ENABLE_OSMOSDR)
################################################################################ ################################################################################
# OsmoSDR - http://sdr.osmocom.org/trac/ # OsmoSDR - http://sdr.osmocom.org/trac/
################################################################################ ################################################################################
if(NOT GROSMOSDR_FOUND) if(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()
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} osmosdr_signal_source.cc) set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} osmosdr_signal_source.cc)
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} osmosdr_signal_source.h) set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} osmosdr_signal_source.h)
endif() endif()
endif() 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_SOURCES ${OPT_DRIVER_SOURCES} uhd_signal_source.cc)
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} uhd_signal_source.h) set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} uhd_signal_source.h)
endif() endif()
@ -162,10 +152,12 @@ set(SIGNAL_SOURCE_ADAPTER_HEADERS
if(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.3) if(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.3)
set(SIGNAL_SOURCE_ADAPTER_SOURCES ${SIGNAL_SOURCE_ADAPTER_SOURCES} set(SIGNAL_SOURCE_ADAPTER_SOURCES ${SIGNAL_SOURCE_ADAPTER_SOURCES}
two_bit_cpx_file_signal_source.cc 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} set(SIGNAL_SOURCE_ADAPTER_HEADERS ${SIGNAL_SOURCE_ADAPTER_HEADERS}
two_bit_cpx_file_signal_source.h two_bit_cpx_file_signal_source.h
two_bit_packed_file_signal_source.h) two_bit_packed_file_signal_source.h
)
endif() endif()
list(SORT SIGNAL_SOURCE_ADAPTER_HEADERS) list(SORT SIGNAL_SOURCE_ADAPTER_HEADERS)
@ -205,7 +197,7 @@ if(ENABLE_RAW_UDP AND PCAP_FOUND)
) )
endif() endif()
if(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd) if(ENABLE_UHD)
target_link_libraries(signal_source_adapters target_link_libraries(signal_source_adapters
PUBLIC PUBLIC
Gnuradio::uhd Gnuradio::uhd