build: raise minimum build requirements
* Hard-depend on gcc >= 7.4 and clang >= 5.0, which have almost complete C++17 support * Require Xcode 10 on macOS but recommend 11.3 or later * Boost >= 1.65.1 is now a hard requirement Change-Id: I76eb915b226e8f5dd5c5fdbde9b23befc2a37c90
This commit is contained in:
1 parent
b3570c614a
commit
b04c52b044
7 files changed
+28
-49
No files matched your search
@@ -16,20 +16,21 @@ def configure(conf):
|
||||
errmsg = ''
|
||||
warnmsg = ''
|
||||
if cxx == 'gcc':
|
||||
if ccver < (5, 3, 0):
|
||||
if ccver < (7, 4, 0):
|
||||
errmsg = ('The version of gcc you are using is too old.\n'
|
||||
'The minimum supported gcc version is 7.4.0.')
|
||||
elif ccver < (7, 4, 0):
|
||||
warnmsg = ('Using a version of gcc older than 7.4.0 is not '
|
||||
'officially supported and may result in build failures.')
|
||||
'The minimum supported gcc version is 7.4.')
|
||||
conf.flags = GccFlags()
|
||||
elif cxx == 'clang':
|
||||
if Utils.unversioned_sys_platform() == 'darwin' and ccver < (9, 0, 0):
|
||||
errmsg = ('The version of Xcode you are using is too old.\n'
|
||||
'The minimum supported Xcode version is 9.0.')
|
||||
elif ccver < (4, 0, 0):
|
||||
if Utils.unversioned_sys_platform() == 'darwin':
|
||||
if ccver < (10, 0, 0):
|
||||
errmsg = ('The version of Xcode you are using is too old.\n'
|
||||
'The minimum supported Xcode version is 11.3.')
|
||||
elif ccver < (11, 0, 0):
|
||||
warnmsg = ('Using a version of Xcode older than 11.3 is not '
|
||||
'officially supported and may result in build failures.')
|
||||
elif ccver < (5, 0, 0):
|
||||
errmsg = ('The version of clang you are using is too old.\n'
|
||||
'The minimum supported clang version is 4.0.')
|
||||
'The minimum supported clang version is 5.0.')
|
||||
conf.flags = ClangFlags()
|
||||
else:
|
||||
warnmsg = '%s compiler is unsupported' % cxx
|
||||
@@ -181,7 +182,7 @@ class GccFlags(GccBasicFlags):
|
||||
flags['CXXFLAGS'] += ['-fdiagnostics-color',
|
||||
'-Wredundant-tags',
|
||||
]
|
||||
if platform.machine() == 'armv7l' and self.getCompilerVersion(conf) >= (7, 1, 0):
|
||||
if platform.machine() == 'armv7l':
|
||||
flags['CXXFLAGS'] += ['-Wno-psabi'] # Bug #5106
|
||||
return flags
|
||||
|
||||
@@ -190,7 +191,7 @@ class GccFlags(GccBasicFlags):
|
||||
flags['CXXFLAGS'] += ['-fdiagnostics-color',
|
||||
'-Wredundant-tags',
|
||||
]
|
||||
if platform.machine() == 'armv7l' and self.getCompilerVersion(conf) >= (7, 1, 0):
|
||||
if platform.machine() == 'armv7l':
|
||||
flags['CXXFLAGS'] += ['-Wno-psabi'] # Bug #5106
|
||||
return flags
|
||||
|
||||
|
||||
+14
-14
@@ -4,26 +4,26 @@ This document describes how to build and install ndn-tools.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Install the [ndn-cxx](https://named-data.net/doc/ndn-cxx/current/) library and its prerequisites.
|
||||
Please see [Getting Started with ndn-cxx](https://named-data.net/doc/ndn-cxx/current/INSTALL.html)
|
||||
for how to install ndn-cxx.
|
||||
Note: If you have installed ndn-cxx from a binary package, please make sure development headers
|
||||
are installed (e.g., if using Ubuntu PPA, the `libndn-cxx-dev` package is needed).
|
||||
- Install the [ndn-cxx](https://named-data.net/doc/ndn-cxx/current/) library and its prerequisites.
|
||||
Please see [Getting Started with ndn-cxx](https://named-data.net/doc/ndn-cxx/current/INSTALL.html)
|
||||
for instructions.
|
||||
All operating systems and compilers supported by ndn-cxx are also supported by ndn-tools.
|
||||
|
||||
Any operating system and compiler supported by ndn-cxx is supported by ndn-tools.
|
||||
*Note*: If you have installed ndn-cxx from a binary package, please make sure the development
|
||||
headers are installed (e.g., if using Ubuntu PPA, the `libndn-cxx-dev` package is needed).
|
||||
|
||||
- `libpcap`
|
||||
- `libpcap`
|
||||
|
||||
Comes with the base system on macOS.
|
||||
Comes with the base system on macOS.
|
||||
|
||||
On Ubuntu:
|
||||
On Ubuntu:
|
||||
|
||||
sudo apt install libpcap-dev
|
||||
sudo apt install libpcap-dev
|
||||
|
||||
On CentOS and Fedora:
|
||||
On CentOS and Fedora:
|
||||
|
||||
sudo dnf config-manager --enable powertools # CentOS only
|
||||
sudo dnf install libpcap-devel
|
||||
sudo dnf config-manager --enable powertools # CentOS only
|
||||
sudo dnf install libpcap-devel
|
||||
|
||||
## Build Steps
|
||||
|
||||
@@ -34,6 +34,6 @@ in ndn-tools source directory:
|
||||
./waf
|
||||
sudo ./waf install
|
||||
|
||||
To uninstall ndn-tools:
|
||||
To uninstall:
|
||||
|
||||
sudo ./waf uninstall
|
||||
@@ -33,11 +33,7 @@
|
||||
#include <ndn-cxx/security/validator-null.hpp>
|
||||
#include <ndn-cxx/util/dummy-client-face.hpp>
|
||||
|
||||
#if BOOST_VERSION >= 105900
|
||||
#include <boost/test/tools/output_test_stream.hpp>
|
||||
#else
|
||||
#include <boost/test/output_test_stream.hpp>
|
||||
#endif
|
||||
|
||||
namespace ndn::chunks::tests {
|
||||
|
||||
|
||||
@@ -29,11 +29,7 @@
|
||||
#include <netinet/udp.h>
|
||||
|
||||
#include <boost/endian/conversion.hpp>
|
||||
#if BOOST_VERSION >= 105900
|
||||
#include <boost/test/tools/output_test_stream.hpp>
|
||||
#else
|
||||
#include <boost/test/output_test_stream.hpp>
|
||||
#endif
|
||||
|
||||
#include <ndn-cxx/encoding/encoding-buffer.hpp>
|
||||
#include <ndn-cxx/lp/packet.hpp>
|
||||
|
||||
@@ -59,12 +59,6 @@ private:
|
||||
std::string m_home;
|
||||
};
|
||||
|
||||
#if BOOST_VERSION >= 106500
|
||||
BOOST_TEST_GLOBAL_CONFIGURATION(GlobalConfiguration);
|
||||
#elif BOOST_VERSION >= 105900
|
||||
BOOST_GLOBAL_FIXTURE(GlobalConfiguration);
|
||||
#else
|
||||
BOOST_GLOBAL_FIXTURE(GlobalConfiguration)
|
||||
#endif
|
||||
|
||||
} // namespace ndn::tests
|
||||
@@ -25,11 +25,7 @@
|
||||
#include <ndn-cxx/util/dummy-client-face.hpp>
|
||||
|
||||
#include <boost/mpl/vector.hpp>
|
||||
#if BOOST_VERSION >= 105900
|
||||
#include <boost/test/tools/output_test_stream.hpp>
|
||||
#else
|
||||
#include <boost/test/output_test_stream.hpp>
|
||||
#endif
|
||||
|
||||
namespace ndn::peek::tests {
|
||||
|
||||
|
||||
@@ -36,14 +36,10 @@ def configure(conf):
|
||||
conf.define('WITH_TESTS', 1)
|
||||
|
||||
conf.check_boost(lib=boost_libs, mt=True)
|
||||
if conf.env.BOOST_VERSION_NUMBER < 105800:
|
||||
if conf.env.BOOST_VERSION_NUMBER < 106501:
|
||||
conf.fatal('The minimum supported version of Boost is 1.65.1.\n'
|
||||
'Please upgrade your distribution or manually install a newer version of Boost.\n'
|
||||
'For more information, see https://redmine.named-data.net/projects/nfd/wiki/Boost')
|
||||
elif conf.env.BOOST_VERSION_NUMBER < 106501:
|
||||
Logs.warn('WARNING: Using a version of Boost older than 1.65.1 is not officially supported and may not work.\n'
|
||||
'If you encounter any problems, please upgrade your distribution or manually install a newer version of Boost.\n'
|
||||
'For more information, see https://redmine.named-data.net/projects/nfd/wiki/Boost')
|
||||
|
||||
conf.recurse('tools')
|
||||
|
||||
|
||||
Reference in new issue
Block a user