From 603c1d55ef6f66c060455be73cb57ef9f99af9ac Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 30 Nov 2019 19:56:38 +0100 Subject: [PATCH 1/5] List Python3 packages in Fedora and OpenSUSE --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index eb9e79ed4..306e92536 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ $ 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 \ + glog-devel openssl-devel libpcap-devel python3-mako python3-six \ pugixml-devel protobuf-devel protobuf-compiler ~~~~~~ @@ -137,7 +137,7 @@ 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 python-Mako python-six protobuf-devel + automake hdf5-devel openssl-devel python3-Mako python3-six protobuf-devel ~~~~~~ If you are using openSUSE Tumbleweed: From 78f1c54900e5c19d7ed24ca1ec0f0bbcd8592cbf Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 30 Nov 2019 20:06:53 +0100 Subject: [PATCH 2/5] Use python-mako and python-six in Debian 8 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 306e92536..98beb677a 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ Please note that the required files from `libgtest-dev` were moved to `googletes **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 Ubuntu versions older than 16.04, `python3-mako` and `python3-six` must be replaced by `python-mako` and `python-six`. +In distributions older than Ubuntu 16.04 or Debian 9, `python3-mako` and `python3-six` must be replaced by `python-mako` and `python-six`. **Note for Debian 8 "jessie" users:** please see the note about `libmatio-dev` above. Install `libtool`, `automake` and `libhdf5-dev` instead. From 0038853c521ed12f8a041462e4392b401a570369 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 30 Nov 2019 20:30:22 +0100 Subject: [PATCH 3/5] Clean CMake files --- cmake/Modules/SetupPython.cmake | 2 +- cmake/cmake_uninstall.cmake.in | 4 ++-- .../volk_gnsssdr/cmake/cmake_uninstall.cmake.in | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmake/Modules/SetupPython.cmake b/cmake/Modules/SetupPython.cmake index c6647a803..8455bed99 100644 --- a/cmake/Modules/SetupPython.cmake +++ b/cmake/Modules/SetupPython.cmake @@ -1,4 +1,4 @@ -# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors) +# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # diff --git a/cmake/cmake_uninstall.cmake.in b/cmake/cmake_uninstall.cmake.in index 825afdde5..a2ee1db81 100644 --- a/cmake/cmake_uninstall.cmake.in +++ b/cmake/cmake_uninstall.cmake.in @@ -1,4 +1,4 @@ -# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors) +# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # @@ -44,4 +44,4 @@ foreach(file ${files}) else() message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") endif() -endforeach(file) +endforeach() diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cmake/cmake_uninstall.cmake.in b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cmake/cmake_uninstall.cmake.in index 825afdde5..a2ee1db81 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cmake/cmake_uninstall.cmake.in +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cmake/cmake_uninstall.cmake.in @@ -1,4 +1,4 @@ -# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors) +# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # @@ -44,4 +44,4 @@ foreach(file ${files}) else() message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") endif() -endforeach(file) +endforeach() From f6311abc8765fee1ed9b5fdf16af62452a3e083e Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 30 Nov 2019 20:48:13 +0100 Subject: [PATCH 4/5] cmake: Use standard way of getting python prefix --- .../volk_gnsssdr/cmake/Modules/VolkPython.cmake | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cmake/Modules/VolkPython.cmake b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cmake/Modules/VolkPython.cmake index e3df8cd8d..a597d42df 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cmake/Modules/VolkPython.cmake +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cmake/Modules/VolkPython.cmake @@ -115,15 +115,11 @@ endif() # Sets the python installation directory VOLK_PYTHON_DIR ######################################################################## if(NOT DEFINED VOLK_PYTHON_DIR) -execute_process(COMMAND ${PYTHON_EXECUTABLE} -c " -import os -import sys -if os.name == 'posix': - print(os.path.join('lib', 'python' + sys.version[:3], 'dist-packages')) -if os.name == 'nt': - print(os.path.join('Lib', 'site-packages')) + execute_process(COMMAND ${PYTHON_EXECUTABLE} -c " +from distutils import sysconfig +print(sysconfig.get_python_lib(plat_specific=True, prefix='')) " OUTPUT_VARIABLE VOLK_PYTHON_DIR OUTPUT_STRIP_TRAILING_WHITESPACE -) + ) endif() file(TO_CMAKE_PATH ${VOLK_PYTHON_DIR} VOLK_PYTHON_DIR) From ea79155ebd7c8918544a6c192fb87b182a0ea719 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 30 Nov 2019 20:59:55 +0100 Subject: [PATCH 5/5] Update changelog --- docs/changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/changelog b/docs/changelog index e6a522d52..33c7c223a 100644 --- a/docs/changelog +++ b/docs/changelog @@ -40,6 +40,7 @@ - Fixed cpplint.py build/include_what_you_use, whitespace/tab, whitespace/blank_line errors. - clang-format can now be applied to the whole code tree without breaking compilation. - Added more check options to .clang-tidy file. +- Default Python version is now >= 3.4. Python 2.7 still can be used in systems where Python 3 is not available (e.g., CentOS 7, Debian 8, Ubuntu 10.04). ### Improvements in Portability: @@ -57,6 +58,7 @@ - Decoding of navigation messages no longer rely on implementation defined behavior for shifting left a signed integer. - Removed usage of functions with insecure API (e.g., strcpy, sprintf). - New type alias volk_gnsssdr::vector allows both aligned memory allocation and automatic deallocation. +- Fixed a memory leak in the generation of Galileo PRN codes. - Added clang-tidy checks clang-analyzer-security.*, clang-analyzer-optin.portability.UnixAPI clang-tidy checks. Fixed raised warnings. - Fixed cpplint.py runtime/printf and runtime/explicit errors. - All constructors callable with one argument are marked with the keyword explicit. See MISRA C++:2008, 12-1-3 - All constructors that are callable with a single argument of fundamental type shall be declared explicit.