build: align minimum build dependencies with ndn-cxx
* boost 1.65.1
* gcc 7.4
* clang 6.0
* Xcode 10.0 (11.3 or later recommended)
Change-Id: I5e41f2a70d6c510dcb889a083a51504121b4627d
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d9f98d8..47d9a6a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -22,8 +22,6 @@
include:
- compiler: g++-7
os: ubuntu-18.04
- - compiler: clang++-5.0
- os: ubuntu-18.04
- compiler: clang++-6.0
os: ubuntu-18.04
runs-on: ${{ matrix.os }}
@@ -37,7 +35,7 @@
sudo apt-get -qy install ${CXX/clang++/clang}
${CXX} --version
- name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Build and test
run: ./.jenkins
@@ -63,6 +61,6 @@
with:
xcode-version: ${{ matrix.xcode }}
- name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Build and test
run: ./.jenkins
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index eeda33a..caededc 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -21,7 +21,7 @@
WAF_JOBS: 3
steps:
- name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
submodules: true
- name: Install dependencies
diff --git a/.waf-tools/default-compiler-flags.py b/.waf-tools/default-compiler-flags.py
index f3be6e7..f086c17 100644
--- a/.waf-tools/default-compiler-flags.py
+++ b/.waf-tools/default-compiler-flags.py
@@ -16,20 +16,21 @@
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 < (6, 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 6.0.')
conf.flags = ClangFlags()
else:
warnmsg = '%s compiler is unsupported' % cxx
@@ -181,7 +182,7 @@
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 @@
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
@@ -212,8 +213,6 @@
'-Wundefined-func-template',
'-Wno-unused-local-typedef', # Bugs #2657 and #3209
]
- if self.getCompilerVersion(conf) < (6, 0, 0):
- flags['CXXFLAGS'] += ['-Wno-missing-braces'] # Bug #4721
return flags
def getOptimizedFlags(self, conf):
@@ -222,6 +221,4 @@
'-Wundefined-func-template',
'-Wno-unused-local-typedef', # Bugs #2657 and #3209
]
- if self.getCompilerVersion(conf) < (6, 0, 0):
- flags['CXXFLAGS'] += ['-Wno-missing-braces'] # Bug #4721
return flags
diff --git a/daemon/face/multicast-ethernet-transport.cpp b/daemon/face/multicast-ethernet-transport.cpp
index 1295764..5d34846 100644
--- a/daemon/face/multicast-ethernet-transport.cpp
+++ b/daemon/face/multicast-ethernet-transport.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2019, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -27,9 +27,9 @@
#include "common/global.hpp"
#include <cerrno> // for errno
+#include <cstdio> // for snprintf()
#include <cstring> // for memcpy(), strerror(), strncpy()
#include <net/if.h> // for struct ifreq
-#include <stdio.h> // for snprintf()
#include <sys/ioctl.h> // for ioctl()
#if defined(__linux__)
@@ -66,20 +66,19 @@
NFD_LOG_FACE_DEBUG("Creating transport");
char filter[110];
- // note #1: we cannot use std::snprintf because it's not available
- // on some platforms (see #2299)
- // note #2: "not vlan" must appear last in the filter expression, or the
- // rest of the filter won't work as intended (see pcap-filter(7))
- snprintf(filter, sizeof(filter),
- "(ether proto 0x%x) && (ether dst %s) && (not ether src %s) && (not vlan)",
- ethernet::ETHERTYPE_NDN,
- m_destAddress.toString().data(),
- m_srcAddress.toString().data());
+ // Note: "not vlan" must appear last in the filter expression, or the
+ // rest of the filter won't work as intended (see pcap-filter(7))
+ std::snprintf(filter, sizeof(filter),
+ "(ether proto 0x%x) && (ether dst %s) && (not ether src %s) && (not vlan)",
+ ethernet::ETHERTYPE_NDN,
+ m_destAddress.toString().data(),
+ m_srcAddress.toString().data());
m_pcap.setPacketFilter(filter);
BOOST_ASSERT(m_destAddress.isMulticast());
- if (!m_destAddress.isBroadcast())
+ if (!m_destAddress.isBroadcast()) {
joinMulticastGroup();
+ }
}
void
diff --git a/daemon/face/unicast-ethernet-transport.cpp b/daemon/face/unicast-ethernet-transport.cpp
index 33e80bd..853ca55 100644
--- a/daemon/face/unicast-ethernet-transport.cpp
+++ b/daemon/face/unicast-ethernet-transport.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2020, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -26,7 +26,7 @@
#include "unicast-ethernet-transport.hpp"
#include "common/global.hpp"
-#include <stdio.h> // for snprintf()
+#include <cstdio> // for snprintf()
namespace nfd {
namespace face {
@@ -50,15 +50,13 @@
NFD_LOG_FACE_DEBUG("Creating transport");
char filter[110];
- // note #1: we cannot use std::snprintf because it's not available
- // on some platforms (see #2299)
- // note #2: "not vlan" must appear last in the filter expression, or the
- // rest of the filter won't work as intended (see pcap-filter(7))
- snprintf(filter, sizeof(filter),
- "(ether proto 0x%x) && (ether src %s) && (ether dst %s) && (not vlan)",
- ethernet::ETHERTYPE_NDN,
- m_destAddress.toString().data(),
- m_srcAddress.toString().data());
+ // Note: "not vlan" must appear last in the filter expression, or the
+ // rest of the filter won't work as intended (see pcap-filter(7))
+ std::snprintf(filter, sizeof(filter),
+ "(ether proto 0x%x) && (ether src %s) && (ether dst %s) && (not vlan)",
+ ethernet::ETHERTYPE_NDN,
+ m_destAddress.toString().data(),
+ m_srcAddress.toString().data());
m_pcap.setPacketFilter(filter);
if (getPersistency() == ndn::nfd::FACE_PERSISTENCY_ON_DEMAND &&
diff --git a/docs/INSTALL.rst b/docs/INSTALL.rst
index 231d8ae..a73b211 100644
--- a/docs/INSTALL.rst
+++ b/docs/INSTALL.rst
@@ -22,6 +22,7 @@
- Fedora >= 29
- Gentoo Linux
- Raspberry Pi OS (formerly Raspbian) >= 2019-06-20
+- FreeBSD >= 12.0
- macOS 10.14
.. _Install NFD on Ubuntu Linux using the NDN PPA repository:
diff --git a/docs/conf.py b/docs/conf.py
index 92bf794..e661298 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -18,7 +18,7 @@
# -- Project information -----------------------------------------------------
project = u'Named Data Networking Forwarding Daemon (NFD)'
-copyright = u'Copyright © 2014-2021 Named Data Networking Project.'
+copyright = u'Copyright © 2014-2022 Named Data Networking Project.'
author = u'Named Data Networking Project'
# The short X.Y version.
diff --git a/tests/core/version.t.cpp b/tests/core/version.t.cpp
index 1361c89..6024f8c 100644
--- a/tests/core/version.t.cpp
+++ b/tests/core/version.t.cpp
@@ -37,11 +37,11 @@
BOOST_AUTO_TEST_CASE(VersionNumber)
{
- BOOST_TEST_MESSAGE("NFD_VERSION = " + to_string(NFD_VERSION));
+ BOOST_TEST_MESSAGE("NFD_VERSION = " << NFD_VERSION);
- BOOST_TEST(NFD_VERSION, NFD_VERSION_MAJOR * 1000000 +
- NFD_VERSION_MINOR * 1000 +
- NFD_VERSION_PATCH);
+ BOOST_TEST(NFD_VERSION == NFD_VERSION_MAJOR * 1000000 +
+ NFD_VERSION_MINOR * 1000 +
+ NFD_VERSION_PATCH);
static_assert(NFD_VERSION_MAJOR >= 22 && NFD_VERSION_MAJOR <= 100, "");
static_assert(NFD_VERSION_MINOR >= 1 && NFD_VERSION_MINOR <= 12, "");
diff --git a/tests/global-configuration.cpp b/tests/global-configuration.cpp
index a82937c..d3ab83a 100644
--- a/tests/global-configuration.cpp
+++ b/tests/global-configuration.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2020, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -66,13 +66,7 @@
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 tests
} // namespace nfd
diff --git a/tests/tools/nfdc/execute-command-fixture.hpp b/tests/tools/nfdc/execute-command-fixture.hpp
index 4abec61..1acadd0 100644
--- a/tests/tools/nfdc/execute-command-fixture.hpp
+++ b/tests/tools/nfdc/execute-command-fixture.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2019, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -31,11 +31,7 @@
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp>
-#if BOOST_VERSION >= 105900
#include <boost/test/tools/output_test_stream.hpp>
-#else
-#include <boost/test/output_test_stream.hpp>
-#endif
namespace nfd {
namespace tools {
diff --git a/tests/tools/nfdc/format-helpers.t.cpp b/tests/tools/nfdc/format-helpers.t.cpp
index f368950..a9e4c87 100644
--- a/tests/tools/nfdc/format-helpers.t.cpp
+++ b/tests/tools/nfdc/format-helpers.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2019, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -27,11 +27,7 @@
#include "tests/test-common.hpp"
-#if BOOST_VERSION >= 105900
#include <boost/test/tools/output_test_stream.hpp>
-#else
-#include <boost/test/output_test_stream.hpp>
-#endif
namespace nfd {
namespace tools {
diff --git a/tests/tools/nfdc/help.t.cpp b/tests/tools/nfdc/help.t.cpp
index c5d5012..6f5392c 100644
--- a/tests/tools/nfdc/help.t.cpp
+++ b/tests/tools/nfdc/help.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2021, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -27,11 +27,7 @@
#include "tests/test-common.hpp"
-#if BOOST_VERSION >= 105900
#include <boost/test/tools/output_test_stream.hpp>
-#else
-#include <boost/test/output_test_stream.hpp>
-#endif
namespace nfd {
namespace tools {
diff --git a/tests/tools/nfdc/status-fixture.hpp b/tests/tools/nfdc/status-fixture.hpp
index f5fc2ec..96edbba 100644
--- a/tests/tools/nfdc/status-fixture.hpp
+++ b/tests/tools/nfdc/status-fixture.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2020, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -31,11 +31,7 @@
#include <ndn-cxx/security/validator-null.hpp>
-#if BOOST_VERSION >= 105900
#include <boost/test/tools/output_test_stream.hpp>
-#else
-#include <boost/test/output_test_stream.hpp>
-#endif
namespace nfd {
namespace tools {
diff --git a/tools/ndn-autoconfig/main.cpp b/tools/ndn-autoconfig/main.cpp
index 859ed34..ecfad81 100644
--- a/tools/ndn-autoconfig/main.cpp
+++ b/tools/ndn-autoconfig/main.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2019, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -38,11 +38,6 @@
#include <ndn-cxx/util/scheduler.hpp>
#include <ndn-cxx/util/time.hpp>
-// suppress warning caused by boost::program_options::parse_config_file
-#ifdef __clang__
-#pragma clang diagnostic ignored "-Wundefined-func-template"
-#endif
-
// ndn-autoconfig is an NDN tool not an NFD tool, so it uses ndn::tools::autoconfig namespace.
// It lives in NFD repository because nfd-start can automatically start ndn-autoconfig in daemon mode.
namespace ndn {
diff --git a/wscript b/wscript
index 311abd0..afec2fc 100644
--- a/wscript
+++ b/wscript
@@ -114,14 +114,10 @@
boost_libs.append('unit_test_framework')
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.load('unix-socket')