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 11.4; CUDA 11.8; cleanup for cmsplatf/cmsos use #8545

Merged
merged 5 commits into from
Jun 20, 2023
Merged
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
13 changes: 4 additions & 9 deletions archive/python.spec
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ sed -ibak "s|LIBFFI_INCLUDEDIR=.*|LIBFFI_INCLUDEDIR=\"${LIBFFI_ROOT}/include\"|g
# in CMSSW and pyconfig.h is not smart enough to detect already defined
# macros on Linux. The following problem does not exists on BSD machines as
# cdefs.h does not define these macros.
case %cmsplatf in
osx*);;
*)
%ifnos darwin
rm -f cms_configtest.cpp
cat <<CMS_EOF > cms_configtest.cpp
#include <features.h>
Expand All @@ -106,8 +104,7 @@ CMS_EOF

sed -ibak "s/\(#define _POSIX_C_SOURCE \)\(.*\)/\1${POSIX_C_SOURCE}/g" pyconfig.h
sed -ibak "s/\(#define _XOPEN_SOURCE \)\(.*\)/\1${XOPEN_SOURCE}/g" pyconfig.h
;;
esac
%endif

# Modify pyconfig.h to disable GCC format attribute as it is used incorrectly.
# Triggers an error if -Werror=format is used with GNU GCC 4.8.0+.
Expand All @@ -127,8 +124,7 @@ export LIBFFI_ROOT
make install
%define pythonv %(echo %realversion | cut -d. -f 1,2)

case %cmsplatf in
osx*)
%ifos darwin
make install prefix=%i
(cd Misc; /bin/rm -rf RPM)
mkdir -p %i/share/doc/%n
Expand All @@ -145,8 +141,7 @@ case %cmsplatf in
perl -p -i -e 's|-fno-common||g' Makefile)

find %i/lib/python%{pythonv}/config -name 'libpython*' -exec mv -f {} %i/lib \;
;;
esac
%endif

perl -p -i -e "s|^#!.*python|#!/usr/bin/env python|" %{i}/bin/idle \
%{i}/bin/pydoc \
Expand Down
20 changes: 9 additions & 11 deletions boost.spec
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ Requires: python3 bz2lib zlib openmpi xz zstd
%setup -n %{n}-%{realversion}

%build
case %cmsos in
osx*) TOOLSET=darwin ;;
*) TOOLSET=gcc ;;
esac

%ifos darwin
TOOLSET=darwin
%else
TOOLSET=gcc
%endif

%if "%{?arch_build_flags}"
echo 'using gcc : : : <cxxflags>"%{arch_build_flags}" <cflags>"%{arch_build_flags}" ;' > user-config.jam
Expand Down Expand Up @@ -67,21 +69,17 @@ b2 -q \
stage

%install
case %{cmsos} in
osx*) so=dylib ;;
*) so=so ;;
esac
mkdir -p %{i}/lib %{i}/include
# copy files around in their final location.
# We use tar to reduce the number of processes required
# and because we need to build the build hierarchy for
# the files that we are copying.
pushd stage/lib
find . -name "*.${so}*" -type f | tar cf - -T - | (cd %{i}/lib; tar xfp -)
find . -name "*.%{dynamic_lib_ext}*" -type f | tar cf - -T - | (cd %{i}/lib; tar xfp -)
popd
find boost -name '*.[hi]*' | tar cf - -T - | ( cd %{i}/include; tar xfp -)

for l in $(find %{i}/lib -name "*.${so}.*")
for l in $(find %{i}/lib -name "*.%{dynamic_lib_ext}.*")
do
ln -s $(basename ${l}) $(echo ${l} | sed -e "s|[.]${so}[.].*|.${so}|")
ln -s $(basename ${l}) $(echo ${l} | sed -e "s|[.]%{dynamic_lib_ext}[.].*|.%{dynamic_lib_ext}|")
done
11 changes: 2 additions & 9 deletions bootstrap-driver.spec
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,9 @@ packagesWithBuildProvides=""
platformSeeds+=" libaio"
%endif

case %cmsplatf in
slc*)
# platformBuildSeeds+=" perl-Switch"
true
;;
*)
#platformSeeds+=" perl-IO"
%if "%{rhel}" != "7"
platformSeeds+=" libxcrypt perl-libs"
;;
esac
%endif

defaultPkgs="cms+cms-common+1.0 cms+fakesystem+1.0"

Expand Down
2 changes: 0 additions & 2 deletions bz2lib.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
### RPM external bz2lib 1.0.6
Source: http://www.bzip.org/%{realversion}/bzip2-%{realversion}.tar.gz
%define cpu %(echo "%{cmsplatf}" | cut -f2 -d_)


%prep
%setup -n bzip2-%{realversion}
Expand Down
14 changes: 5 additions & 9 deletions cmake.spec
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,11 @@ EOF
export CMAKE_PREFIX_PATH=$CURL_ROOT:$ZLIB_ROOT:$EXPAT_ROOT:$BZ2LIB_ROOT
# For OS X 10.8 ("Mountain Lion") do not use Objective-C in
# C and C++ code.
case %cmsplatf in
osx108_*)
CXXFLAGS="-DOS_OBJECT_USE_OBJC=0" CFLAGS="-DOS_OBJECT_USE_OBJC=0" \
./configure --prefix=%i --init=build-flags.cmake --parallel=%compiling_processes
;;
*)
./configure --prefix=%i --init=build-flags.cmake --parallel=%compiling_processes
;;
esac
%ifos darwin
CXXFLAGS="-DOS_OBJECT_USE_OBJC=0" CFLAGS="-DOS_OBJECT_USE_OBJC=0" \
%endif
./configure --prefix=%{i} --init=build-flags.cmake --parallel=%{compiling_processes}

make %makeprocesses

%install
Expand Down
4 changes: 2 additions & 2 deletions cuda.spec
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
### RPM external cuda 11.5.2
### RPM external cuda 11.8.0
## INITENV +PATH LD_LIBRARY_PATH %i/lib64

%define runpath_opts -m compute-sanitizer -m drivers -m nvvm
%define driversversion 495.29.05
%define driversversion 520.61.05

%ifarch x86_64
Source0: https://developer.download.nvidia.com/compute/cuda/%{realversion}/local_installers/%{n}_%{realversion}_%{driversversion}_linux.run
Expand Down
13 changes: 5 additions & 8 deletions curl.spec
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ Requires: zlib
%setup -n %{n}-%{realversion}

%build
case %{cmsplatf} in
osx*) KERBEROS_ROOT=/usr/heimdal ;;
*) KERBEROS_ROOT=/usr ;;
esac
%ifos darwin
KERBEROS_ROOT=/usr/heimdal
%else
KERBEROS_ROOT=/usr
%endif

./configure \
--prefix=%{i} \
Expand All @@ -27,10 +28,6 @@ make %{makeprocesses}

%install
make install
case %{cmsos} in
osx*) SONAME=dylib ;;
*) SONAME=so ;;
esac

# Trick to get our version of curl pick up our version of its associated shared
# library (which is different from the one coming from the system!).
Expand Down
14 changes: 3 additions & 11 deletions evtgen.spec
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,16 @@ rm -rf ../build
mkdir ../build
cd ../build


case %cmsplatf in
osx*)
;;
esac

cmake -DCMAKE_INSTALL_PREFIX:PATH=%{i} ../%{n}-%{realversion} \
-DEVTGEN_HEPMC3:BOOL=OFF -DHEPMC2_ROOT_DIR:PATH=$HEPMC_ROOT \
-DEVTGEN_PYTHIA:BOOL=ON -DPYTHIA8_ROOT_DIR:PATH=$PYTHIA8_ROOT \
-DEVTGEN_PHOTOS:BOOL=ON -DPHOTOSPP_ROOT_DIR:PATH=$PHOTOSPP_ROOT \
-DEVTGEN_TAUOLA:BOOL=ON -DTAUOLAPP_ROOT_DIR:PATH=$TAUOLAPP_ROOT

# One more fix-up for OSX (in addition to the patch above)
case %cmsplatf in
osx*)
perl -p -i -e "s|-shared|-dynamiclib -undefined dynamic_lookup|" make.inc
;;
esac
%ifos darwin
perl -p -i -e "s|-shared|-dynamiclib -undefined dynamic_lookup|" make.inc
%endif

make

Expand Down
54 changes: 32 additions & 22 deletions gcc.spec
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
### RPM external gcc 11.2.1
### RPM external gcc 11.4.1
## USE_COMPILER_VERSION
## INITENV +PATH LD_LIBRARY_PATH %{i}/lib64
# 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 a0a0499b8bb920fdd98e791804812f001f0b4fe8
%define gccTag d41085966d842e54fd4b528c719ed5af2e51c473
%define gccBranch releases/gcc-11

%define moduleName %{n}-%{realversion}
Expand All @@ -13,20 +13,22 @@ Source0: git+https://github.com/gcc-mirror/%{n}.git?obj=%{gccBranch}/%{gccTag}&e
%define keep_archives true

%define gmpVersion 6.2.1
%define mpfrVersion 4.1.0
%define mpcVersion 1.2.1
%define islVersion 0.24
%define zlibVersion 1.2.11
%define mpfrVersion 4.2.0
%define mpcVersion 1.3.1
%define islVersion 0.26
%define zlibVersion 1.2.13
%define zstdVersion 1.4.5
Source1: https://gmplib.org/download/gmp/gmp-%{gmpVersion}.tar.bz2
Source2: http://www.mpfr.org/mpfr-%{mpfrVersion}/mpfr-%{mpfrVersion}.tar.bz2
Source3: https://ftp.gnu.org/gnu/mpc/mpc-%{mpcVersion}.tar.gz
Source4: http://isl.gforge.inria.fr/isl-%{islVersion}.tar.bz2
Source4: https://libisl.sourceforge.io/isl-%{islVersion}.tar.bz2
Source12: http://zlib.net/zlib-%{zlibVersion}.tar.gz
Source13: https://github.com/facebook/zstd/releases/download/v%{zstdVersion}/zstd-%{zstdVersion}.tar.gz

%ifos linux
%define bisonVersion 3.7.6
%define binutilsVersion 2.36.1
%define elfutilsVersion 0.183
%define bisonVersion 3.8.2
%define binutilsVersion 2.40
%define elfutilsVersion 0.189
%define m4Version 1.4.19
%define flexVersion 2.6.4
Source7: http://ftp.gnu.org/gnu/bison/bison-%{bisonVersion}.tar.gz
Expand All @@ -38,12 +40,10 @@ Source11: https://github.com/westes/flex/releases/download/v%{flexVersion}/flex-

Patch0: gcc-flex-nonfull-path-m4
Patch1: gcc-flex-disable-doc
Patch2: gcc-03af8492bee6243a9d10e78fea1a3e423bd5f9cd

%prep

%setup -T -b 0 -n %{moduleName}
%patch2 -p1

# Filter out private stuff from RPM requires headers.
cat << \EOF > %{name}-req
Expand Down Expand Up @@ -96,6 +96,7 @@ EOF_CMS_H
%setup -D -T -b 3 -n mpc-%{mpcVersion}
%setup -D -T -b 4 -n isl-%{islVersion}
%setup -D -T -b 12 -n zlib-%{zlibVersion}
%setup -D -T -b 13 -n zstd-%{zstdVersion}

%ifos linux
%setup -D -T -b 7 -n bison-%{bisonVersion}
Expand Down Expand Up @@ -139,6 +140,10 @@ CFLAGS="${CONF_FLAGS}" ./configure --static --prefix=%{i}/tmp/sw
make %{makeprocesses}
make install

#Build and install zstd static library
make -C ../zstd-%{zstdVersion}/lib %{makeprocesses} \
install-static install-includes prefix=%{i}/tmp/sw \
CPPFLAGS="-fPIC" CFLAGS="-fPIC"
%ifos linux
CONF_BINUTILS_OPTS="--enable-ld=default --enable-lto --enable-plugins --enable-threads"
CONF_GCC_WITH_LTO="--enable-ld=default --enable-lto"
Expand Down Expand Up @@ -166,20 +171,13 @@ make install
# Build Flex (for building)
cd ../flex-%{flexVersion}
./configure --disable-nls --prefix=%{i}/tmp/sw \
--enable-static --disable-shared \
--build=%{_build} --host=%{_host} \
CC="$CC" CXX="$CXX"
make %{makeprocesses}
make install
hash -r

# Build Flex
cd ../flex-%{flexVersion}
./configure --disable-nls --prefix=%{i} \
--build=%{_build} --host=%{_host} \
CC="$CC" CXX="$CXX"
make %{makeprocesses}
make install

# Build elfutils
cd ../elfutils-%{elfutilsVersion}
./configure --disable-static --with-zlib --without-bzlib --without-lzma \
Expand Down Expand Up @@ -263,13 +261,15 @@ 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-shared --disable-libgcj CC="$CC" CXX="$CXX" CPP="$CPP" CXXCPP="$CXXCPP" \
--enable-shared --disable-libgcj \
--with-zstd=%{i}/tmp/sw \
CC="$CC" CXX="$CXX" CPP="$CPP" CXXCPP="$CXXCPP" \
CFLAGS="-I%{i}/tmp/sw/include" CXXFLAGS="-I%{i}/tmp/sw/include" LDFLAGS="-L%{i}/tmp/sw/lib"

make %{makeprocesses} profiledbootstrap

%install
cd %_builddir/%{moduleName}/obj && make install
cd %_builddir/%{moduleName}/obj && make install

ln -s gcc %{i}/bin/cc
find %{i}/lib %{i}/lib64 -name '*.la' -exec rm -f {} \; || true
Expand All @@ -282,3 +282,13 @@ find %{i}/lib %{i}/lib64 -name '*.la' -exec rm -f {} \; || true
%define keep_archives yes
# This avoids having a dependency on the system pkg-config.
rm -rf %{i}/lib/pkg-config

%post
%{relocateConfig}bin/eu-make-debug-archive
%{relocateConfig}etc/profile.d/debuginfod.*sh
%{relocateConfig}lib/gcc/*/%{realversion}/plugin/include/auto-host.h
%{relocateConfig}lib/gcc/*/%{realversion}/plugin/include/configargs.h
%{relocateConfig}lib64/libstdc++*-gdb.py
%{relocateConfig}libexec/gcc/*/%{realversion}/install-tools/mkheaders
%{relocateConfig}libexec/gcc/*/%{realversion}/liblto_plugin.la
for f in $(find $RPM_INSTALL_PREFIX/%{pkgrel}/*/lib/ldscripts -type f) ; do %{relocateCmsFiles} $f || true ; done
1 change: 1 addition & 0 deletions gdbm.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### RPM external gdbm 1.10
Source: http://ftp.gnu.org/gnu/%{n}/%{n}-%{realversion}.tar.gz
BuildRequires: gmake

%prep
%setup -n %{n}-%{realversion}
Expand Down
3 changes: 3 additions & 0 deletions gnuplot.spec
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
### RPM external gnuplot 5.2.8
Source: http://downloads.sourceforge.net/project/gnuplot/gnuplot/%{realversion}/gnuplot-%{realversion}.tar.gz
Requires: zlib

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

%build
CFLAGS=-I${ZLIB_ROOT}/include \
LDFLAGS=-L${ZLIB_ROOT}/lib \
./configure \
--prefix %{i} \
--disable-wxt \
Expand Down
3 changes: 3 additions & 0 deletions hdf5.spec
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@ make install

%post
%{relocateConfig}bin/h5pcc
%{relocateConfig}bin/h5c++
%{relocateConfig}share/hdf5_examples/c*/run-*-ex.sh
%{relocateConfig}share/hdf5_examples/hl/c*/run-*-ex.sh
%{relocateConfig}lib/libhdf5.settings
6 changes: 3 additions & 3 deletions hector.spec
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ mkdir -p obj lib
%build
# Correct link path for root.
#perl -p -i -e "s|^ROOTLIBS.*$|ROOTLIBS=-L$ROOT_ROOT/lib -lCore -lRint -lMatrix -lPhysics -lCling -lMathCore -pthread -lm -ldl -rdynamic|" Makefile
case %cmsplatf in
osx*) perl -p -i -e 's|-rdynamic||g' Makefile ;;
esac
%ifos darwin
perl -p -i -e 's|-rdynamic||g' Makefile
%endif

# Add CXX and CXXFLAGS to Makefile and increase output versbose level
sed -ibak "s/@g++/\$(CXX) \$(CXXFLAGS)/g" Makefile
Expand Down
6 changes: 3 additions & 3 deletions pip/pillow.file
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%define PipBuildOptions --global-option="build_ext" --global-option="--disable-xcb"
Requires: libjpeg-turbo zlib libtiff
%define PipPreBuild export LDFLAGS="-L${LIBJPEG_TURBO_ROOT}/lib64 -L${ZLIB_ROOT}/lib -L${LIBTIFF_ROOT}/lib"; \
export CFLAGS="-I${LIBJPEG_TURBO_ROOT}/include -I${ZLIB_ROOT}/include -I${LIBTIFF_ROOT}/include"
Requires: libjpeg-turbo zlib libtiff freetype
%define PipPreBuild export LDFLAGS="-L${LIBJPEG_TURBO_ROOT}/lib64 -L${ZLIB_ROOT}/lib -L${LIBTIFF_ROOT}/lib -L${FREETYPE_ROOT}/lib"; \
export CFLAGS="-I${LIBJPEG_TURBO_ROOT}/include -I${ZLIB_ROOT}/include -I${LIBTIFF_ROOT}/include -I${FREETYPE_ROOT}/include"
Loading