Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GCC] Build latest GCC 12 with stdcxx backtrace enabled #8821

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions autotools.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,21 @@
%define automake_version 1.16.3
%define automake_maj %(echo %{automake_version} | cut -f1,2 -d.)
%define libtool_version 2.4.6
%define m4_version 1.4.18
%define m4_version 1.4.19
%define gettext_version 0.21
%define pkgconfig_version 0.29.2
Source0: http://ftp.gnu.org/gnu/autoconf/autoconf-%{autoconf_version}.tar.gz
Source1: http://ftp.gnu.org/gnu/automake/automake-%{automake_version}.tar.gz
Source2: http://ftp.gnu.org/gnu/libtool/libtool-%{libtool_version}.tar.gz
Source3: http://ftp.gnu.org/gnu/m4/m4-%{m4_version}.tar.bz2
Source3: http://ftp.gnu.org/gnu/m4/m4-%{m4_version}.tar.gz
Source4: http://ftp.gnu.org/gnu/gettext/gettext-%{gettext_version}.tar.gz
Source5: http://pkgconfig.freedesktop.org/releases/pkg-config-%{pkgconfig_version}.tar.gz
Patch0: m4-centos8

%prep
%setup -D -T -b 0 -n autoconf-%{autoconf_version}
%setup -D -T -b 1 -n automake-%{automake_version}
%setup -D -T -b 2 -n libtool-%{libtool_version}
%setup -D -T -b 3 -n m4-%{m4_version}
%patch0 -p1
%setup -D -T -b 4 -n gettext-%{gettext_version}
%setup -D -T -b 5 -n pkg-config-%{pkgconfig_version}

Expand Down
10 changes: 5 additions & 5 deletions bootstrap-bundle.spec
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
### RPM external bootstrap-bundle 3.0
### RPM external bootstrap-bundle 4.0
## NO_AUTO_DEPENDENCY
## NOCOMPILER

AutoReqProv: no
BuildRequires: gcc
BuildRequires: db6-bootstrap lua-bootstrap file-bootstrap
BuildRequires: xz-bootstrap libarchive-bootstrap
BuildRequires: lua-bootstrap file-bootstrap zstd-bootstrap
BuildRequires: xz-bootstrap libarchive-bootstrap sqlite-bootstrap

%define keep_archives true

Expand Down Expand Up @@ -51,7 +51,7 @@ find %{i}/lib -type f ! -name '*.a' -writable -exec %{strip} {} \;
# RPM requires it to generate requires/provides also (otherwise it ignores the files)
find %{i}/lib -type f | xargs chmod 0755

mv %{i}/lib/lib{lua,archive}.a %{i}/tmp
mv %{i}/lib/lib{lua,archive,zstd}.a %{i}/tmp
rm -f %{i}/lib/*.{l,}a
mv %{i}/tmp/lib* %{i}/lib/
rm -rf %{i}/tmp
54 changes: 31 additions & 23 deletions bootstrap-driver.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### RPM external bootstrap-driver 40.0
### RPM external bootstrap-driver 42.0
## NOCOMPILER
Requires: rpm
BuildRequires: cms-common fakesystem
Expand All @@ -9,50 +9,58 @@ BuildRequires: cms-common fakesystem
%build
%install
packageList=""
echo requiredtools `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
for tool in `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
do
case X$tool in
Xdistcc|Xccache )
;;
* )
toolcap=`echo $tool | tr a-z- A-Z_`
toolversion=$(eval echo $`echo ${toolcap}_VERSION`)
toolrevision=$(eval echo $`echo ${toolcap}_REVISION`)
echo $toolversion $toolrevision
packageList="$packageList external+${tool}+${toolversion}-1-${toolrevision}.%cmsplatf.rpm"
;;
esac
for tool in $(echo %{directpkgreqs} | tr '/' '+') ; do
packageList="$packageList ${tool}-1-1.%{cmsplatf}.rpm"
done

additionalProvides=""
##############################
# Packages to seed for runtime
##############################
platformSeeds="bash tcsh perl bzip2-libs glibc nspr nss nss-util popt zlib glibc-devel openssl openssl-devel openssl-libs krb5-libs
libcom_err libX11 libXext libXft libXpm libglvnd-glx libglvnd-opengl mesa-libGLU"
platformSeeds=" bash glibc glibc-headers python3 openssl-libs"
platformSeeds+=" libbrotli libX11 libxcrypt"

# Needed by python runtime
platformSeeds+=" readline ncurses-libs tcl tk"

# Needed by root runtime
platformSeeds+=" mesa-libGLU libglvnd-glx libglvnd-opengl libXext libXft libXpm"

#Various packages perl dependencies
platformSeeds+=" perl perl-base perl-filetest perl-lib perl-libs perl-overload perl-vars"

#Various packages required by xrootd with krb5 enabled
platformSeeds+=" libcom_err krb5-libs"

# Seed packages which provides these
packagesWithProvides="/usr/bin/python3 /usr/bin/perl /usr/bin/env /usr/bin/uname"
packagesWithProvides=" /usr/bin/python3 /usr/bin/env /usr/bin/uname /bin/sh /usr/bin/perl"

##############################
#Packages to seed for build
##############################
platformBuildSeeds="git patch make zip unzip bzip2 java-1.8.0-openjdk-devel libcom_err-devel which libXpm-devel libXft-devel mesa-libGLU-devel rsync"
#Needed by autotools,go and lcov
#platformBuildSeeds+=" perl-Carp perl-Data-Dumper perl-Digest-MD5 perl-Exporter perl-File-Path perl-File-Temp perl-Getopt-Long perl-PathTools perl-Text-ParseWords perl-constant"
platformBuildSeeds=" git patch make zip unzip bzip2 which rsync"
platformBuildSeeds+=" openssl-devel brotli-devel libxcrypt-devel"
platformBuildSeeds+=" libX11-devel libXpm-devel libXft-devel mesa-libGLU-devel"
platformBuildSeeds+=" java-1.8.0-openjdk-devel"

#Various packages required by xrootd with krb5 enabled
platformBuildSeeds+=" libcom_err-devel krb5-devel"

#needed by python build
platformBuildSeeds+=" readline-devel ncurses-devel tcl-devel tk-devel"

##############################
#Packages which provides a definition
##############################
packagesWithBuildProvides=""

%ifnarch aarch64
# Needed by oracle
platformSeeds+=" libaio"
%endif

%if "%{rhel}" != "7"
platformSeeds+=" libxcrypt perl-libs"
%if "%{rhel}" == "9"
platformSeeds+=" libgcc"
%endif

defaultPkgs="cms+cms-common+1.0 cms+fakesystem+1.0"
Expand Down
10 changes: 10 additions & 0 deletions cepgen-gcc12.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- a/CepGen/Utils/Drawer.h.orig 2023-06-05 11:45:35.916095554 +0200
+++ b/CepGen/Utils/Drawer.h 2023-06-05 11:46:11.721935669 +0200
@@ -20,6 +20,7 @@
#define CepGen_Utils_Drawer_h

#include "CepGen/Modules/NamedModule.h"
+#include <cstdint>

namespace cepgen {
namespace utils {
2 changes: 2 additions & 0 deletions cepgen.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ Source: https://github.com/cepgen/cepgen/archive/refs/tags/%{realversion}.tar.gz

BuildRequires: cmake ninja
Requires: gsl OpenBLAS hepmc hepmc3 lhapdf pythia6 root bz2lib zlib xz
Patch0: cepgen-gcc12

%prep
%setup -n %{n}-%{realversion}
%patch0 -p1

%build
rm -rf ../build
Expand Down
18 changes: 0 additions & 18 deletions db6-bootstrap.spec

This file was deleted.

4 changes: 2 additions & 2 deletions dd4hep.spec
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
### RPM external dd4hep v01-25x
### RPM external dd4hep v01-26x
## INCLUDE compilation_flags
## INCLUDE compilation_flags_lto
## INCLUDE cpp-standard

%define tag b07fa115c59d80d37154cf205cf00dff8137ee36
%define tag 8715c52c1c8b3c714d80896cb8540f3f8f888786
%define branch master
%define github_user AIDASoft
%define keep_archives true
Expand Down
1 change: 1 addition & 0 deletions file-bootstrap.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### RPM external file-bootstrap 5.33
%define file_tag %(echo FILE%{realversion} | tr . _)
AutoReqProv: no
Source: https://github.com/file/file/archive/%{file_tag}.tar.gz

%prep
Expand Down
2 changes: 1 addition & 1 deletion gbl.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### RPM external gbl V02-04-01
### RPM external gbl V03-00-00
## INCLUDE cpp-standard

%define tag 31e726d777fe93cdbed0c363dc15f803f7767f40
Expand Down
3 changes: 2 additions & 1 deletion gcc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Use the git repository for fetching the sources. This gives us more control while developing
# a new platform so that we can compile yet to be released versions of the compiler.
# See: https://gcc.gnu.org/viewcvs/gcc/branches/gcc-8-branch/?view=log
%define gccTag 10ebb8b9db2ec7ad53e4fc1f2900d9a8c8ddeaea
%define gccTag b76c4656631977ccf5119bd326df5e03d26f66ac
%define gccBranch releases/gcc-12

%define moduleName %{n}-%{realversion}
Expand Down Expand Up @@ -264,6 +264,7 @@ export LD_LIBRARY_PATH=%{i}/lib64:%{i}/lib:$LD_LIBRARY_PATH
$CONF_GCC_OS_SPEC $CONF_GCC_WITH_LTO --with-gmp=%{i} --with-mpfr=%{i} --enable-bootstrap \
--with-mpc=%{i} --with-isl=%{i} --enable-checking=release \
--build=%{_build} --host=%{_host} --enable-libstdcxx-time=rt $CONF_GCC_ARCH_SPEC \
-enable-libstdcxx-backtrace=yes \
--enable-shared --disable-libgcj \
--with-zstd=%{i}/tmp/sw \
CC="$CC" CXX="$CXX" CPP="$CPP" CXXCPP="$CXXCPP" \
Expand Down
2 changes: 1 addition & 1 deletion giflib.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### RPM external giflib 5.2.0
### RPM external giflib 5.2.1

Source: https://sourceforge.net/projects/giflib/files/giflib-%{realversion}.tar.gz
BuildRequires: autotools
Expand Down
31 changes: 31 additions & 0 deletions grpc-gcc11.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
--- grpc/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc.orig 2023-06-12 13:50:04.615712549 +0200
+++ grpc/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc 2023-06-12 13:50:21.878566886 +0200
@@ -37,6 +37,7 @@

#include <algorithm>
#include <array>
+#include <limits>
#include "absl/base/internal/hide_ptr.h"
#include "absl/base/internal/raw_logging.h"
#include "absl/base/internal/spinlock.h"
--- grpc/third_party/abseil-cpp/absl/copts/GENERATED_AbseilCopts.cmake.orig 2023-06-12 13:50:35.303453601 +0200
+++ grpc/third_party/abseil-cpp/absl/copts/GENERATED_AbseilCopts.cmake 2023-06-12 13:51:05.358200009 +0200
@@ -202,6 +202,7 @@

list(APPEND ABSL_RANDOM_HWAES_ARM64_FLAGS
"-march=armv8-a+crypto"
+ "-mno-outline-atomics"
)

list(APPEND ABSL_RANDOM_HWAES_MSVC_X64_FLAGS
--- grpc/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc.orig 2023-06-12 13:51:27.063016878 +0200
+++ grpc/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc 2023-06-12 13:52:05.133695671 +0200
@@ -125,7 +125,7 @@
#else
const size_t page_mask = sysconf(_SC_PAGESIZE) - 1;
#endif
- size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask;
+ size_t stack_size = (std::max<size_t>(SIGSTKSZ, 65536) + page_mask) & ~page_mask;
#if defined(ADDRESS_SANITIZER) || defined(MEMORY_SANITIZER) || \
defined(THREAD_SANITIZER)
// Account for sanitizer instrumentation requiring additional stack space.
4 changes: 2 additions & 2 deletions igprof.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ rm -rf ../build; mkdir ../build; cd ../build

cmake ../igprof-%{git_commit} \
-DCMAKE_INSTALL_PREFIX=%i -DCMAKE_VERBOSE_MAKEFILE=TRUE \
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-g -O3" \
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-g -O3 -Wno-error=deprecated-declarations" \
-DCMAKE_PREFIX_PATH="$LIBUNWIND_ROOT;$PCRE_ROOT"
make DEBUG=1 VERBOSE=1 %makeprocesses
make DEBUG=1 VERBOSE=1 %makeprocesses

%install
cd ../build
Expand Down
2 changes: 1 addition & 1 deletion java-env.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### RPM external java-env 1.1
### RPM external java-env 11.0
## INITENV SET JAVA_HOME %{java_home}
## INITENV +PATH PATH %{java_home}/bin
## INITENV +PATH LD_LIBRARY_PATH %{java_home}/lib
Expand Down
2 changes: 1 addition & 1 deletion libarchive-bootstrap.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### RPM external libarchive-bootstrap 3.5.1
Source0: http://www.libarchive.org/downloads/libarchive-%{realversion}.tar.gz

AutoReqProv: no
Requires: xz-bootstrap

%define keep_archives true
Expand Down
2 changes: 1 addition & 1 deletion professor2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ sed -i -e 's|-std=c[+][+]11|-std=c++%{cms_cxx_standard}|' pyext/setup.py
grep -q 'CXXSTD := c[+][+]11' Makefile
sed -i -e 's|CXXSTD := c[+][+]11|CXXSTD := c++%{cms_cxx_standard}|' Makefile

%define build_flags CPPFLAGS=-I${EIGEN_ROOT}/include/eigen3 PYTHON=$(which python3) PROF_VERSION=%{realversion} PYTHONPATH=./${PYTHON3_LIB_SITE_PACKAGES}
%define build_flags CPPFLAGS=-I${EIGEN_ROOT}/include/eigen3 PYTHON=$(which python3) PROF_VERSION=%{realversion} PYTHONPATH=./${PYTHON3_LIB_SITE_PACKAGES}:./pyext/professor2

%build
make %{build_flags}
Expand Down
Loading