From 57e14d30697630f665463edf79dbf270fefa8bfa Mon Sep 17 00:00:00 2001 From: Dario Berzano Date: Wed, 19 Sep 2018 18:01:48 +0200 Subject: [PATCH 1/9] Use C++17 in O2 --- defaults-alo.sh | 4 ++-- defaults-o2-dataflow.sh | 4 ++-- defaults-o2-dev-fairroot.sh | 4 ++-- defaults-o2-ninja.sh | 4 ++-- defaults-o2.sh | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/defaults-alo.sh b/defaults-alo.sh index 24f5b770e8..a688cd1db3 100644 --- a/defaults-alo.sh +++ b/defaults-alo.sh @@ -1,10 +1,10 @@ package: defaults-alo version: v1 env: - CXXFLAGS: "-fPIC -O2 -std=c++14" + CXXFLAGS: "-fPIC -O2 -std=c++17" CFLAGS: "-fPIC -O2" CMAKE_BUILD_TYPE: "RELWITHDEBINFO" - CXXSTD: "14" + CXXSTD: "17" CMAKE_GENERATOR: "Ninja" disable: - AliEn-Runtime diff --git a/defaults-o2-dataflow.sh b/defaults-o2-dataflow.sh index 0d2e51e61d..3af6e9bfc4 100644 --- a/defaults-o2-dataflow.sh +++ b/defaults-o2-dataflow.sh @@ -1,10 +1,10 @@ package: defaults-o2-dataflow version: v1 env: - CXXFLAGS: "-fPIC -O2 -std=c++14" + CXXFLAGS: "-fPIC -O2 -std=c++17" CFLAGS: "-fPIC -O2" CMAKE_BUILD_TYPE: "RELWITHDEBINFO" - CXXSTD: "14" + CXXSTD: "17" disable: - AliEn-Runtime - AliRoot diff --git a/defaults-o2-dev-fairroot.sh b/defaults-o2-dev-fairroot.sh index f01cc4ff3a..3a63a3102b 100644 --- a/defaults-o2-dev-fairroot.sh +++ b/defaults-o2-dev-fairroot.sh @@ -1,10 +1,10 @@ package: defaults-o2-dev-fairroot version: v1 env: - CXXFLAGS: "-fPIC -O2 -std=c++14" + CXXFLAGS: "-fPIC -O2 -std=c++17" CFLAGS: "-fPIC -O2" CMAKE_BUILD_TYPE: "RELWITHDEBINFO" - CXXSTD: "14" + CXXSTD: "17" CMAKE_GENERATOR: "Ninja" disable: - AliEn-Runtime diff --git a/defaults-o2-ninja.sh b/defaults-o2-ninja.sh index c3da12ae7a..ba15a11cad 100644 --- a/defaults-o2-ninja.sh +++ b/defaults-o2-ninja.sh @@ -1,10 +1,10 @@ package: defaults-o2-ninja version: v1 env: - CXXFLAGS: "-fPIC -O2 -std=c++14" + CXXFLAGS: "-fPIC -O2 -std=c++17" CFLAGS: "-fPIC -O2" CMAKE_BUILD_TYPE: "RELWITHDEBINFO" - CXXSTD: "14" + CXXSTD: "17" CMAKE_GENERATOR: "Ninja" disable: - AliEn-Runtime diff --git a/defaults-o2.sh b/defaults-o2.sh index af2eb03349..259b92574b 100644 --- a/defaults-o2.sh +++ b/defaults-o2.sh @@ -1,10 +1,10 @@ package: defaults-o2 version: v1 env: - CXXFLAGS: "-fPIC -O2 -std=c++14" + CXXFLAGS: "-fPIC -O2 -std=c++17" CFLAGS: "-fPIC -O2" CMAKE_BUILD_TYPE: "RELWITHDEBINFO" - CXXSTD: "14" + CXXSTD: "17" disable: - AliEn-Runtime - grpc From dee67a82b119c53d8afeffc34bea4d2e0226742c Mon Sep 17 00:00:00 2001 From: Dario Berzano Date: Wed, 19 Sep 2018 18:57:16 +0200 Subject: [PATCH 2/9] Bump FairRoot to allow C++17 --- fairroot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fairroot.sh b/fairroot.sh index d3d0cff242..6ec5fdfbc4 100644 --- a/fairroot.sh +++ b/fairroot.sh @@ -1,6 +1,6 @@ package: FairRoot version: "%(short_hash)s" -tag: "717dccd866ec07af10db1e021d189e9ff2ce0209" +tag: "acbd45f9d7626b39827953e8c2d6e373700e6c23" source: https://github.com/FairRootGroup/FairRoot requires: - generators From 5e0b6e1f40b0f00b2c86bb524f8d24ea0c1a9813 Mon Sep 17 00:00:00 2001 From: Dario Berzano Date: Sat, 22 Sep 2018 00:40:50 +0200 Subject: [PATCH 3/9] Bump boost (v1.68), disable boost_python (C++17) --- boost.sh | 4 +++- defaults-alo.sh | 4 ++-- defaults-o2-dataflow.sh | 4 ++-- defaults-o2-dev-fairroot.sh | 4 ++-- defaults-o2-ninja.sh | 4 ++-- defaults-o2.sh | 4 ++-- 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/boost.sh b/boost.sh index c8b29124ee..bcc0aabd4c 100644 --- a/boost.sh +++ b/boost.sh @@ -18,7 +18,8 @@ python -c 'import sys; sys.exit(1 if sys.version_info < (2, 7) else 0)' pip --help &> /dev/null && \ printf '#include \"pyconfig.h"' | gcc -c $(python-config --includes) -xc -o /dev/null - || \ unset BOOST_PYTHON -[[ $BOOST_PYTHON ]] || WITHOUT_PYTHON="--without-python" +[[ $CXXSTD < 17 ]] || unset BOOST_PYTHON +[[ $BOOST_PYTHON ]] || { WITHOUT_PYTHON="--without-python"; unset PYTHON_VERSION; } TMPB2=$BUILDDIR/tmp-boost-build case $ARCHITECTURE in @@ -53,6 +54,7 @@ b2 -q \ link=shared \ threading=multi \ variant=release \ + ${CXXSTD:+cxxstd=$CXXSTD} \ $EXTRA_CXXFLAGS \ install [[ $BOOST_PYTHON ]] && ls -1 "$INSTALLROOT"/lib/*boost_python* > /dev/null diff --git a/defaults-alo.sh b/defaults-alo.sh index a688cd1db3..991afb9f86 100644 --- a/defaults-alo.sh +++ b/defaults-alo.sh @@ -24,12 +24,12 @@ overrides: autotools: tag: v1.5.0 boost: - tag: "v1.66.0" + tag: "v1.68.0" requires: - "GCC-Toolchain:(?!osx)" - Python-modules prefer_system_check: | - printf "#include \"boost/version.hpp\"\n# if (BOOST_VERSION < 106600 || BOOST_VERSION > 106699)\n#error \"Cannot use system's boost: boost 1.66 required.\"\n#endif\nint main(){}" | gcc -I$(brew --prefix boost)/include -xc++ - -o /dev/null + printf "#include \"boost/version.hpp\"\n# if (BOOST_VERSION < 106800 || BOOST_VERSION > 106899)\n#error \"Cannot use system's boost: boost 1.68 required.\"\n#endif\nint main(){}" | gcc -I$(brew --prefix boost)/include -xc++ - -o /dev/null GCC-Toolchain: tag: v7.3.0-alice1 prefer_system_check: | diff --git a/defaults-o2-dataflow.sh b/defaults-o2-dataflow.sh index 3af6e9bfc4..13e430b918 100644 --- a/defaults-o2-dataflow.sh +++ b/defaults-o2-dataflow.sh @@ -22,14 +22,14 @@ overrides: autotools: tag: v1.5.0 boost: - tag: "v1.66.0" + tag: "v1.68.0" requires: - "GCC-Toolchain:(?!osx)" - Python-modules - libpng - lzma prefer_system_check: | - printf "#include \"boost/version.hpp\"\n# if (BOOST_VERSION < 106600 || BOOST_VERSION > 106699)\n#error \"Cannot use system's boost: boost 1.66 required.\"\n#endif\nint main(){}" | gcc -I$(brew --prefix boost)/include -xc++ - -o /dev/null + printf "#include \"boost/version.hpp\"\n# if (BOOST_VERSION < 106800 || BOOST_VERSION > 106899)\n#error \"Cannot use system's boost: boost 1.68 required.\"\n#endif\nint main(){}" | gcc -I$(brew --prefix boost)/include -xc++ - -o /dev/null GCC-Toolchain: tag: v7.3.0-alice1 prefer_system_check: | diff --git a/defaults-o2-dev-fairroot.sh b/defaults-o2-dev-fairroot.sh index 3a63a3102b..62b522ee63 100644 --- a/defaults-o2-dev-fairroot.sh +++ b/defaults-o2-dev-fairroot.sh @@ -13,14 +13,14 @@ overrides: autotools: tag: v1.5.0 boost: - tag: "v1.66.0" + tag: "v1.68.0" requires: - "GCC-Toolchain:(?!osx)" - Python-modules - libpng - lzma prefer_system_check: | - printf "#include \"boost/version.hpp\"\n# if (BOOST_VERSION < 106600 || BOOST_VERSION > 106699)\n#error \"Cannot use system's boost: boost 1.66 required.\"\n#endif\nint main(){}" | gcc -I$(brew --prefix boost)/include -xc++ - -o /dev/null + printf "#include \"boost/version.hpp\"\n# if (BOOST_VERSION < 106800 || BOOST_VERSION > 106899)\n#error \"Cannot use system's boost: boost 1.68 required.\"\n#endif\nint main(){}" | gcc -I$(brew --prefix boost)/include -xc++ - -o /dev/null GCC-Toolchain: tag: v7.3.0-alice1 prefer_system_check: | diff --git a/defaults-o2-ninja.sh b/defaults-o2-ninja.sh index ba15a11cad..c1bfe4e308 100644 --- a/defaults-o2-ninja.sh +++ b/defaults-o2-ninja.sh @@ -14,12 +14,12 @@ overrides: autotools: tag: v1.5.0 boost: - tag: "v1.66.0" + tag: "v1.68.0" requires: - "GCC-Toolchain:(?!osx)" - Python-modules prefer_system_check: | - printf "#include \"boost/version.hpp\"\n# if (BOOST_VERSION < 106600 || BOOST_VERSION > 106699)\n#error \"Cannot use system's boost: boost 1.66 required.\"\n#endif\nint main(){}" | gcc -I$(brew --prefix boost)/include -xc++ - -o /dev/null + printf "#include \"boost/version.hpp\"\n# if (BOOST_VERSION < 106800 || BOOST_VERSION > 106899)\n#error \"Cannot use system's boost: boost 1.68 required.\"\n#endif\nint main(){}" | gcc -I$(brew --prefix boost)/include -xc++ - -o /dev/null GCC-Toolchain: tag: v7.3.0-alice1 prefer_system_check: | diff --git a/defaults-o2.sh b/defaults-o2.sh index 259b92574b..10356a117c 100644 --- a/defaults-o2.sh +++ b/defaults-o2.sh @@ -13,12 +13,12 @@ overrides: autotools: tag: v1.5.0 boost: - tag: "v1.66.0" + tag: "v1.68.0" requires: - "GCC-Toolchain:(?!osx)" - Python-modules prefer_system_check: | - printf "#include \"boost/version.hpp\"\n# if (BOOST_VERSION < 106600 || BOOST_VERSION > 106699)\n#error \"Cannot use system's boost: boost 1.66 required.\"\n#endif\nint main(){}" | gcc -I$(brew --prefix boost)/include -xc++ - -o /dev/null + printf "#include \"boost/version.hpp\"\n# if (BOOST_VERSION < 106800 || BOOST_VERSION > 106899)\n#error \"Cannot use system's boost: boost 1.68 required.\"\n#endif\nint main(){}" | gcc -I$(brew --prefix boost)/include -xc++ - -o /dev/null GCC-Toolchain: tag: v7.3.0-alice1 prefer_system_check: | From 977273a2df1a501e82730e2f36e3015f784ab513 Mon Sep 17 00:00:00 2001 From: Dario Berzano Date: Mon, 24 Sep 2018 15:00:05 +0200 Subject: [PATCH 4/9] Bump ApMon to v2.2.8-alice2 (C++17) --- apmon-cpp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apmon-cpp.sh b/apmon-cpp.sh index b262c891d7..073bab6530 100644 --- a/apmon-cpp.sh +++ b/apmon-cpp.sh @@ -1,6 +1,6 @@ package: ApMon-CPP version: "%(tag_basename)s" -tag: v2.2.8-alice1 +tag: v2.2.8-alice2 source: https://github.com/alisw/apmon-cpp.git build_requires: - autotools From 64e86107a33a67b016cd97593b23406f04d1e1fa Mon Sep 17 00:00:00 2001 From: Dario Berzano Date: Fri, 21 Sep 2018 15:08:59 +0200 Subject: [PATCH 5/9] Bump Vc to fix the std::for_each_n issue --- vc.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vc.sh b/vc.sh index 12dc4ef9e0..75b0bba635 100644 --- a/vc.sh +++ b/vc.sh @@ -1,7 +1,7 @@ package: Vc version: "%(tag_basename)s" -tag: 1.3.3 -source: https://github.com/VcDevel/Vc.git +tag: 1.3.3-alice2 +source: https://github.com/alisw/Vc.git requires: - "GCC-Toolchain:(?!osx)" build_requires: From b3a6952412d3aebf8cf04f73e699291cfd5f5eda Mon Sep 17 00:00:00 2001 From: Dario Berzano Date: Mon, 24 Sep 2018 16:20:06 +0200 Subject: [PATCH 6/9] Bump yaml-cpp as well --- yaml-cpp.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yaml-cpp.sh b/yaml-cpp.sh index 19b5934d6e..1db3b15b9a 100644 --- a/yaml-cpp.sh +++ b/yaml-cpp.sh @@ -1,7 +1,7 @@ package: yaml-cpp -version: "v0.5.2" +version: "%(tag_basename)s" +tag: yaml-cpp-0.6.2 source: https://github.com/jbeder/yaml-cpp -tag: release-0.5.2 requires: - boost build_requires: From 1eb1100428a3175890dfd588b3655f8f4de65d14 Mon Sep 17 00:00:00 2001 From: Dario Berzano Date: Wed, 3 Oct 2018 17:03:45 +0200 Subject: [PATCH 7/9] No C++17 for GEANT4 --- geant4.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/geant4.sh b/geant4.sh index f278209def..e9a616cd01 100644 --- a/geant4.sh +++ b/geant4.sh @@ -25,6 +25,8 @@ env: --- #!/bin/bash -e +[[ $CXXSTD > 14 ]] && CXXSTD=14 || true # Only C++14 is supported at the moment + cmake $SOURCEDIR \ -DGEANT4_INSTALL_DATA_TIMEOUT=2000 \ -DCMAKE_CXX_FLAGS="-fPIC" \ From dcac84d75d1c7d05fe5a556bb72e1a22d1727519 Mon Sep 17 00:00:00 2001 From: Dario Berzano Date: Thu, 4 Oct 2018 00:25:22 +0000 Subject: [PATCH 8/9] Build boost with C++14 even under C++17 --- boost.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/boost.sh b/boost.sh index bcc0aabd4c..c66eb7d137 100644 --- a/boost.sh +++ b/boost.sh @@ -18,7 +18,12 @@ python -c 'import sys; sys.exit(1 if sys.version_info < (2, 7) else 0)' pip --help &> /dev/null && \ printf '#include \"pyconfig.h"' | gcc -c $(python-config --includes) -xc -o /dev/null - || \ unset BOOST_PYTHON -[[ $CXXSTD < 17 ]] || unset BOOST_PYTHON +if [[ $CXXSTD && $CXXSTD -ge 17 ]]; then + # Compile boost with C++14 even if we are using C++17, and disable boost_python. + # See: https://github.com/boostorg/system/issues/26#issuecomment-413631998 + CXXSTD=14 + unset BOOST_PYTHON +fi [[ $BOOST_PYTHON ]] || { WITHOUT_PYTHON="--without-python"; unset PYTHON_VERSION; } TMPB2=$BUILDDIR/tmp-boost-build @@ -55,7 +60,6 @@ b2 -q \ threading=multi \ variant=release \ ${CXXSTD:+cxxstd=$CXXSTD} \ - $EXTRA_CXXFLAGS \ install [[ $BOOST_PYTHON ]] && ls -1 "$INSTALLROOT"/lib/*boost_python* > /dev/null From 7333b6f1ee91c38d03d67a0d2c282dd4189948b0 Mon Sep 17 00:00:00 2001 From: Dario Berzano Date: Thu, 4 Oct 2018 11:02:23 +0000 Subject: [PATCH 9/9] Add ROOT_INCLUDE_PATH to boost --- boost.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/boost.sh b/boost.sh index c66eb7d137..d27be3aba4 100644 --- a/boost.sh +++ b/boost.sh @@ -9,6 +9,8 @@ build_requires: prefer_system: (?!slc5) prefer_system_check: | printf "#include \"boost/version.hpp\"\n# if (BOOST_VERSION < 105900)\n#error \"Cannot use system's boost. Boost > 1.59.00 required.\"\n#endif\nint main(){}" | gcc -I$(brew --prefix boost)/include -xc++ - -o /dev/null +prepend_path: + ROOT_INCLUDE_PATH: "$BOOST_ROOT/include" --- #!/bin/bash -e @@ -89,5 +91,6 @@ module load BASE/1.0 ${GCC_TOOLCHAIN_VERSION:+GCC-Toolchain/$GCC_TOOLCHAIN_VERSI # Our environment setenv BOOST_ROOT \$::env(BASEDIR)/$PKGNAME/\$version prepend-path LD_LIBRARY_PATH \$::env(BOOST_ROOT)/lib +prepend-path ROOT_INCLUDE_PATH \$::env(BOOST_ROOT)/include $([[ ${ARCHITECTURE:0:3} == osx ]] && echo "prepend-path DYLD_LIBRARY_PATH \$::env(BOOST_ROOT)/lib") EoF