Permalink
Browse files

build: require gcc >= 5.3, boost >= 1.58, openssl >= 1.0.2

This effectively drops support for all versions of Ubuntu older than 16.04

Change-Id: Ie3ab7df9147e97f6467658a6399a4f9379f089c1
Refs: #4462
  • Loading branch information...
Pesa committed May 7, 2018
1 parent d9b083e commit 844b09331bfca9cd06a96775e39bee8225cb2220
@@ -13,13 +13,13 @@ Environment Variables Used in Build Scripts
* `[OS_TYPE]`: `Linux`
* `[DISTRO_TYPE]`: `Ubuntu`
* `[DISTRO_VERSION]`: `Ubuntu-14.04`, `Ubuntu-16.04`
* `[DISTRO_VERSION]`: `Ubuntu-16.04`, `Ubuntu-18.04`
Possible values for OS X / macOS:
* `[OS_TYPE]`: `OSX`
* `[DISTRO_TYPE]`: `OSX` (can be absent)
* `[DISTRO_VERSION]`: `OSX-10.10`, `OSX-10.11`, `OSX-10.12`
* `[DISTRO_VERSION]`: `OSX-10.11`, `OSX-10.12`, `OSX-10.13`
- `JOB_NAME`: optional variable to define type of the job. Depending on the defined job type,
the build scripts can perform different tasks.
@@ -1,5 +1,5 @@
language: cpp
dist: trusty
dist: xenial
sudo: required
env:
global:
@@ -10,93 +10,35 @@ matrix:
include:
# Linux/gcc
# https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test/+packages
- os: linux
env: COMPILER=g++-4.8
- os: linux
env: COMPILER=g++-4.9
addons:
apt:
sources: ubuntu-toolchain-r-test
packages: g++-4.9
- os: linux
env: COMPILER=g++-5
addons:
apt:
sources: ubuntu-toolchain-r-test
packages: g++-5
- os: linux
env: COMPILER=g++-6
addons:
apt:
sources: ubuntu-toolchain-r-test
packages: g++-6
- os: linux
env: COMPILER=g++-7
addons:
apt:
sources: ubuntu-toolchain-r-test
packages: g++-7
- os: linux
env: COMPILER=g++-8
addons:
apt:
sources: ubuntu-toolchain-r-test
packages: g++-8
# Linux/clang
# https://apt.llvm.org/
- os: linux
env: COMPILER=clang++-3.5
addons:
apt:
packages: clang-3.5
- os: linux
env: COMPILER=clang++-3.6
addons:
apt:
packages: clang-3.6
- os: linux
env: COMPILER=clang++-3.7 DISABLE_ASAN=yes
addons:
apt:
sources: ["llvm-toolchain-precise-3.7", "ubuntu-toolchain-r-test"]
packages: clang-3.7
- os: linux
env: COMPILER=clang++-3.8
addons:
apt:
sources: ["llvm-toolchain-precise-3.8", "ubuntu-toolchain-r-test"]
packages: clang-3.8
- os: linux
env: COMPILER=clang++-3.9 DISABLE_ASAN=yes
addons:
apt:
sources: ["llvm-toolchain-trusty-3.9", "ubuntu-toolchain-r-test"]
packages: clang-3.9
env: COMPILER=clang++-3.9
- os: linux
env: COMPILER=clang++-4.0
addons:
apt:
sources: ["llvm-toolchain-trusty-4.0", "ubuntu-toolchain-r-test"]
packages: clang-4.0
- os: linux
env: COMPILER=clang++-5.0
addons:
apt:
sources: ["llvm-toolchain-trusty-5.0", "ubuntu-toolchain-r-test"]
packages: clang-5.0
- os: linux
env: COMPILER=clang++-6.0
addons:
apt:
sources: ["llvm-toolchain-trusty-6.0", "ubuntu-toolchain-r-test"]
packages: clang-6.0
- os: linux
env: COMPILER=clang++-7
addons:
apt:
sources: ["llvm-toolchain-trusty", "ubuntu-toolchain-r-test"]
packages: clang-7
# macOS/clang
# https://docs.travis-ci.com/user/reference/osx/#OS-X-Version
@@ -114,13 +56,40 @@ matrix:
env: OSX_VERSION=10.13 USE_OPENSSL_1_1=yes
allow_failures:
- env: COMPILER=g++-6
- env: COMPILER=g++-7
- env: COMPILER=g++-8
- env: COMPILER=clang++-3.5
- env: COMPILER=clang++-3.6
- env: COMPILER=clang++-3.7 DISABLE_ASAN=yes
- env: COMPILER=clang++-4.0
- env: COMPILER=clang++-5.0
- env: COMPILER=clang++-6.0
- env: COMPILER=clang++-7
- env: OSX_VERSION=10.13 USE_OPENSSL_1_1=yes
fast_finish: true
install: |
case ${COMPILER} in
g++-[6789])
travis_retry sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
travis_retry sudo apt-get -qq update
travis_retry sudo apt-get -qy install "${COMPILER}"
;;
clang++-*)
CLANG_VERSION=${COMPILER/clang++}
if [[ ${CLANG_VERSION} != "-3."* ]]; then
wget -O - "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add -
travis_retry sudo add-apt-repository -y "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial${CLANG_VERSION/-7} main"
fi
travis_retry sudo apt-get -qq update
travis_retry sudo apt-get -qy install "clang${CLANG_VERSION}"
;;
esac
before_script:
- if [[ ${TRAVIS_OS_NAME} == linux ]]; then export NODE_LABELS="Linux Ubuntu Ubuntu-14.04"; fi
- if [[ ${TRAVIS_OS_NAME} == linux ]]; then export NODE_LABELS="Linux Ubuntu Ubuntu-16.04"; fi
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then export NODE_LABELS="OSX OSX-${OSX_VERSION}"; fi
- if [[ -n ${COMPILER} ]]; then export CXX=${COMPILER}; fi
- ${CXX:-c++} --version
@@ -23,31 +23,8 @@
@conf
def check_std_to_string(self):
if self.check_cxx(msg='Checking for std::to_string',
fragment=STD_TO_STRING,
features='cxx', mandatory=False):
fragment=STD_TO_STRING, mandatory=False):
self.define('HAVE_STD_TO_STRING', 1)
VECTOR_INSERT_ERASE_CONST_ITERATOR = '''
#include <vector>
int
main()
{
std::vector<int> v;
std::vector<int>::const_iterator it = v.cbegin();
v.insert(it, 2);
it = v.cend() - 1;
v.erase(it);
}
'''
@conf
def check_vector_const_iterators(self):
if self.check_cxx(msg='Checking for std::vector::insert with const_iterator',
fragment=VECTOR_INSERT_ERASE_CONST_ITERATOR,
features='cxx', mandatory=False):
self.define('HAVE_VECTOR_INSERT_ERASE_CONST_ITERATOR', 1)
def configure(conf):
conf.check_std_to_string()
conf.check_vector_const_iterators()
@@ -15,14 +15,14 @@ def configure(conf):
errmsg = ''
warnmsg = ''
if cxx == 'gcc':
if ccver < (4, 8, 2):
if ccver < (5, 3, 0):
errmsg = ('The version of gcc you are using is too old.\n'
'The minimum supported gcc version is 4.8.2.')
'The minimum supported gcc version is 5.3.0.')
conf.flags = GccFlags()
elif cxx == 'clang':
if ccver < (3, 4, 0):
if ccver < (3, 5, 0):
errmsg = ('The version of clang you are using is too old.\n'
'The minimum supported clang version is 3.4.0.')
'The minimum supported clang version is 3.5.0.')
conf.flags = ClangFlags()
else:
warnmsg = 'Note: %s compiler is unsupported' % cxx
@@ -164,16 +164,12 @@ def getOptimizedFlags(self, conf):
class GccFlags(GccBasicFlags):
def getDebugFlags(self, conf):
flags = super(GccFlags, self).getDebugFlags(conf)
if self.getCompilerVersion(conf) < (5, 1, 0):
flags['CXXFLAGS'] += ['-Wno-missing-field-initializers']
flags['CXXFLAGS'] += ['-fdiagnostics-color'] # gcc >= 4.9
flags['CXXFLAGS'] += ['-fdiagnostics-color']
return flags
def getOptimizedFlags(self, conf):
flags = super(GccFlags, self).getOptimizedFlags(conf)
if self.getCompilerVersion(conf) < (5, 1, 0):
flags['CXXFLAGS'] += ['-Wno-missing-field-initializers']
flags['CXXFLAGS'] += ['-fdiagnostics-color'] # gcc >= 4.9
flags['CXXFLAGS'] += ['-fdiagnostics-color']
return flags
class ClangFlags(GccBasicFlags):

This file was deleted.

Oops, something went wrong.
@@ -63,7 +63,7 @@ The simplest way to run tests, is just to run the compiled binary without any pa
./build/unit-tests
[Boost.Test framework](http://www.boost.org/doc/libs/1_54_0/libs/test/doc/html/index.html)
[Boost.Test framework](https://www.boost.org/doc/libs/1_58_0/libs/test/doc/html/index.html)
is very flexible and allows a number of run-time customization of what tests should be run.
For example, it is possible to choose to run only a specific test suite, only a specific
test case within a suite, or specific test cases within specific test suites:
@@ -96,7 +96,7 @@ or `-p` to show progress bar:
There are many more command line options available, information about which can be obtained
either from the command line using `--help` switch, or online on
[Boost.Test library](http://www.boost.org/doc/libs/1_54_0/libs/test/doc/html/index.html)
[Boost.Test library](https://www.boost.org/doc/libs/1_58_0/libs/test/doc/html/index.html)
website.
**Warning:** If you have customized parameters for NDN platform using `client.conf` in
@@ -9,7 +9,6 @@ Supported platforms
ndn-cxx uses continuous integration and has been tested on the following
platforms:
- Ubuntu 14.04 (amd64)
- Ubuntu 16.04 (amd64, armhf, i386)
- Ubuntu 18.04 (amd64)
- OS X 10.11
@@ -30,11 +29,12 @@ Prerequisites
Required:
~~~~~~~~~
- GCC >= 5.3, or clang >= 3.5
- ``python2`` >= 2.7, or ``python3`` >= 3.4
- ``libsqlite3``
- OpenSSL >= 1.0.1
- OpenSSL >= 1.0.2
- ``pkg-config``
- Boost libraries >= 1.54
- Boost libraries >= 1.58
- OSX Security framework (on OSX/macOS platform only)
Following are the detailed steps for each platform to install the compiler, all necessary
@@ -1087,6 +1087,6 @@ member function or a virtual destructor.
3.31. The recommended way to throw an exception derived from ``std::exception`` is to use
the ``BOOST_THROW_EXCEPTION``
`macro <http://www.boost.org/doc/libs/1_54_0/libs/exception/doc/BOOST_THROW_EXCEPTION.html>`__.
`macro <https://www.boost.org/doc/libs/1_58_0/libs/exception/doc/BOOST_THROW_EXCEPTION.html>`__.
Exceptions thrown using this macro will be augmented with additional diagnostic information,
including file name, line number, and function name from where the exception was thrown.
@@ -52,7 +52,7 @@ The following example demonstrates how to use :ndn-cxx:`Scheduler` to schedule a
events for execution at specific points of time.
The library internally uses `boost::asio::io_service
<http://www.boost.org/doc/libs/1_54_0/doc/html/boost_asio/reference/io_service.html>`_ to
<https://www.boost.org/doc/libs/1_58_0/doc/html/boost_asio/reference/io_service.html>`_ to
implement fully asynchronous NDN operations (i.e., sending and receiving Interests and
Data). In addition to network-related operations, ``boost::asio::io_service`` can be used
to execute any arbitrary callback within the processing thread (run either explicitly via
@@ -6,7 +6,7 @@ performed at two levels: the name level and the name component level.
A name component matcher, enclosed in ``<`` and ``>``, specifies the pattern of a name component. The
component pattern is expressed with the `Perl Regular Expression Syntax
<http://www.boost.org/doc/libs/1_55_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html>`__.
<https://www.boost.org/doc/libs/1_58_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html>`__.
For example, ``<ab*c>`` matches the 1st, 3rd, and 4th components of ``/ac/dc/abc/abbc``, but does
not match the 2nd component. A special case is that ``<>`` denotes a wildcard matcher that can match
**ANY** name component.
@@ -34,15 +34,10 @@
namespace ndn {
BOOST_CONCEPT_ASSERT((boost::EqualityComparable<Block>));
#if NDN_CXX_HAVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE
static_assert(std::is_nothrow_move_constructible<Block>::value,
"Block must be MoveConstructible with noexcept");
#endif // NDN_CXX_HAVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE
#if NDN_CXX_HAVE_IS_NOTHROW_MOVE_ASSIGNABLE
static_assert(std::is_nothrow_move_assignable<Block>::value,
"Block must be MoveAssignable with noexcept");
#endif // NDN_CXX_HAVE_IS_NOTHROW_MOVE_ASSIGNABLE
const size_t MAX_SIZE_OF_BLOCK_FROM_STREAM = MAX_NDN_PACKET_SIZE;
@@ -454,30 +449,14 @@ Block::element_iterator
Block::erase(Block::element_const_iterator position)
{
resetWire();
#ifdef NDN_CXX_HAVE_VECTOR_INSERT_ERASE_CONST_ITERATOR
return m_elements.erase(position);
#else
element_iterator it = m_elements.begin();
std::advance(it, std::distance(m_elements.cbegin(), position));
return m_elements.erase(it);
#endif
}
Block::element_iterator
Block::erase(Block::element_const_iterator first, Block::element_const_iterator last)
{
resetWire();
#ifdef NDN_CXX_HAVE_VECTOR_INSERT_ERASE_CONST_ITERATOR
return m_elements.erase(first, last);
#else
element_iterator itStart = m_elements.begin();
element_iterator itEnd = m_elements.begin();
std::advance(itStart, std::distance(m_elements.cbegin(), first));
std::advance(itEnd, std::distance(m_elements.cbegin(), last));
return m_elements.erase(itStart, itEnd);
#endif
}
void
@@ -491,14 +470,7 @@ Block::element_iterator
Block::insert(Block::element_const_iterator pos, const Block& element)
{
resetWire();
#ifdef NDN_CXX_HAVE_VECTOR_INSERT_ERASE_CONST_ITERATOR
return m_elements.insert(pos, element);
#else
element_iterator it = m_elements.begin();
std::advance(it, std::distance(m_elements.cbegin(), pos));
return m_elements.insert(it, element);
#endif
}
// ---- misc ----
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2013-2017 Regents of the University of California.
* Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -25,15 +25,10 @@
namespace ndn {
#if NDN_CXX_HAVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE
static_assert(std::is_nothrow_move_constructible<Buffer>::value,
"Buffer must be MoveConstructible with noexcept");
#endif // NDN_CXX_HAVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE
#if NDN_CXX_HAVE_IS_NOTHROW_MOVE_ASSIGNABLE
static_assert(std::is_nothrow_move_assignable<Buffer>::value,
"Buffer must be MoveAssignable with noexcept");
#endif // NDN_CXX_HAVE_IS_NOTHROW_MOVE_ASSIGNABLE
Buffer::Buffer() = default;
Oops, something went wrong.

0 comments on commit 844b093

Please sign in to comment.