build: support CentOS Stream 9
Change-Id: I8864a856b4f777110cea37528d963e9eb77ed973
This commit is contained in:
1 parent
16d493eceb
commit
f278438bc7
6 files changed
+19
-12
No files matched your search
@@ -42,4 +42,8 @@ elif has Ubuntu $NODE_LABELS; then
|
|||||||
pip3 install --user --upgrade --upgrade-strategy=eager sphinx sphinxcontrib-doxylink
|
pip3 install --user --upgrade --upgrade-strategy=eager sphinx sphinxcontrib-doxylink
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
elif has CentOS $NODE_LABELS; then
|
||||||
|
sudo dnf -y install gcc-c++ libasan pkgconf-pkg-config python3 \
|
||||||
|
boost-devel openssl-devel sqlite-devel
|
||||||
fi
|
fi
|
||||||
@@ -35,19 +35,14 @@ sudo rm -f /usr/local/lib{,64}/pkgconfig/libndn-cxx.pc
|
|||||||
|
|
||||||
pushd ndn-cxx >/dev/null
|
pushd ndn-cxx >/dev/null
|
||||||
|
|
||||||
if has CentOS-8 $NODE_LABELS; then
|
./waf --color=yes configure --disable-static --enable-shared --without-osx-keychain
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1721553
|
|
||||||
PCH="--without-pch"
|
|
||||||
fi
|
|
||||||
|
|
||||||
./waf --color=yes configure --disable-static --enable-shared --without-osx-keychain $PCH
|
|
||||||
./waf --color=yes build -j$WAF_JOBS
|
./waf --color=yes build -j$WAF_JOBS
|
||||||
sudo_preserve_env PATH -- ./waf --color=yes install
|
sudo_preserve_env PATH -- ./waf --color=yes install
|
||||||
|
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
|
||||||
if has CentOS-8 $NODE_LABELS; then
|
if has CentOS $NODE_LABELS; then
|
||||||
sudo tee /etc/ld.so.conf.d/ndn.conf >/dev/null <<< /usr/local/lib64
|
sudo tee /etc/ld.so.conf.d/ndn.conf >/dev/null <<< /usr/local/lib64
|
||||||
fi
|
fi
|
||||||
if has Linux $NODE_LABELS; then
|
if has Linux $NODE_LABELS; then
|
||||||
|
|||||||
@@ -36,6 +36,9 @@ fi
|
|||||||
# Install
|
# Install
|
||||||
sudo_preserve_env PATH -- ./waf --color=yes install
|
sudo_preserve_env PATH -- ./waf --color=yes install
|
||||||
|
|
||||||
|
if has CentOS $NODE_LABELS; then
|
||||||
|
sudo tee /etc/ld.so.conf.d/ndn.conf >/dev/null <<< /usr/local/lib64
|
||||||
|
fi
|
||||||
if has Linux $NODE_LABELS; then
|
if has Linux $NODE_LABELS; then
|
||||||
sudo ldconfig
|
sudo ldconfig
|
||||||
fi
|
fi
|
||||||
@@ -3,7 +3,6 @@ set -ex
|
|||||||
|
|
||||||
# Prepare environment
|
# Prepare environment
|
||||||
rm -rf ~/.ndn
|
rm -rf ~/.ndn
|
||||||
ndnsec key-gen "/tmp/jenkins/$NODE_NAME" | ndnsec cert-install -
|
|
||||||
|
|
||||||
# https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
|
# https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
|
||||||
ASAN_OPTIONS="color=always"
|
ASAN_OPTIONS="color=always"
|
||||||
|
|||||||
@@ -6,20 +6,21 @@
|
|||||||
# (similar to running all test cases), instead of failing at the first error.
|
# (similar to running all test cases), instead of failing at the first error.
|
||||||
|
|
||||||
PROJ=PSync
|
PROJ=PSync
|
||||||
|
PCFILE=PSync
|
||||||
|
|
||||||
if [[ -n $DISABLE_HEADERS_CHECK ]]; then
|
if [[ -n $DISABLE_HEADERS_CHECK ]]; then
|
||||||
echo 'Skipping headers check.'
|
echo 'Skipping headers check.'
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if has CentOS-8 $NODE_LABELS; then
|
if has CentOS $NODE_LABELS; then
|
||||||
export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
|
export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CXX=${CXX:-g++}
|
CXX=${CXX:-g++}
|
||||||
STD=-std=c++14
|
STD=-std=c++14
|
||||||
CXXFLAGS="-O2 -Wall -Wno-unneeded-internal-declaration -Wno-unused-const-variable $(pkg-config --cflags libndn-cxx $PROJ)"
|
CXXFLAGS="-O2 -Wall -Wno-unneeded-internal-declaration -Wno-unused-const-variable $(pkg-config --cflags libndn-cxx $PCFILE)"
|
||||||
INCLUDEDIR="$(pkg-config --variable=includedir $PROJ)"/$PROJ
|
INCLUDEDIR="$(pkg-config --variable=includedir $PCFILE)"/$PROJ
|
||||||
|
|
||||||
echo "Using: $CXX $STD $CXXFLAGS"
|
echo "Using: $CXX $STD $CXXFLAGS"
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,12 @@ def configure(conf):
|
|||||||
conf.env.WITH_EXAMPLES = conf.options.with_examples
|
conf.env.WITH_EXAMPLES = conf.options.with_examples
|
||||||
conf.env.WITH_TESTS = conf.options.with_tests
|
conf.env.WITH_TESTS = conf.options.with_tests
|
||||||
|
|
||||||
conf.find_program('dot', var='DOT', mandatory=False)
|
conf.find_program('dot', mandatory=False)
|
||||||
|
|
||||||
|
# Prefer pkgconf if it's installed, because it gives more correct results
|
||||||
|
# on Fedora/CentOS/RHEL/etc. See https://bugzilla.redhat.com/show_bug.cgi?id=1953348
|
||||||
|
# Store the result in env.PKGCONFIG, which is the variable used inside check_cfg()
|
||||||
|
conf.find_program(['pkgconf', 'pkg-config'], var='PKGCONFIG')
|
||||||
|
|
||||||
pkg_config_path = os.environ.get('PKG_CONFIG_PATH', f'{conf.env.LIBDIR}/pkgconfig')
|
pkg_config_path = os.environ.get('PKG_CONFIG_PATH', f'{conf.env.LIBDIR}/pkgconfig')
|
||||||
conf.check_cfg(package='libndn-cxx', args=['libndn-cxx >= 0.8.0', '--cflags', '--libs'],
|
conf.check_cfg(package='libndn-cxx', args=['libndn-cxx >= 0.8.0', '--cflags', '--libs'],
|
||||||
|
|||||||
Reference in new issue
Block a user