diff options
author | Andrei Rabusov <arabusov@gmail.com> | 2024-08-21 08:34:18 +0200 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-08-23 21:37:39 +0700 |
commit | 377da0750106f324c25bd7a468423b063b90c9ef (patch) | |
tree | 0a82cb0ad4a3a4dabc242ae0bd29f1f1ca921778 /academic | |
parent | c9179718c2afd8f754cf8ab0f290b5ef29fc3bb4 (diff) |
academic/root: Updated for version 6.32.04 (+fix 32 bit)
Added a patch from the 6.34 fixes branch to fix the issue #15738. It
shall be removed later when we switch to the 6.34 branch.
remove ld.so.conf and PATH manipulations
Wrapper scripts are created in /usr/bin for all ROOT binaries.
The trick does not work for python though, one needs to run
LD_LIBRARY_PATH=${ROOTSYS}/lib python3 in order to import ROOT
modules correctly.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'academic')
-rw-r--r-- | academic/root/doinst.sh | 3 | ||||
-rw-r--r-- | academic/root/fixWriteFastArray.patch | 126 | ||||
-rw-r--r-- | academic/root/root.SlackBuild | 26 | ||||
-rw-r--r-- | academic/root/root.info | 10 |
4 files changed, 148 insertions, 17 deletions
diff --git a/academic/root/doinst.sh b/academic/root/doinst.sh deleted file mode 100644 index 2346641304cb..000000000000 --- a/academic/root/doinst.sh +++ /dev/null @@ -1,3 +0,0 @@ -if [ ! "$(grep @PREFIX@/lib@LIBDIRSUFFIX@ etc/ld.so.conf)" ]; then - echo "@PREFIX@/lib@LIBDIRSUFFIX@" >> etc/ld.so.conf -fi diff --git a/academic/root/fixWriteFastArray.patch b/academic/root/fixWriteFastArray.patch new file mode 100644 index 000000000000..91d0b2f7691c --- /dev/null +++ b/academic/root/fixWriteFastArray.patch @@ -0,0 +1,126 @@ +From 9f847714d9dbb432d9e6ce27954711e3819ddfee Mon Sep 17 00:00:00 2001 +From: Mattias Ellert <mattias.ellert@physics.uu.se> +Date: Fri, 7 Jun 2024 06:49:39 +0200 +Subject: [PATCH 1/2] [io] WriteFastArray: return early if n == 0, to prevent + crash in bswapcpy + +--- + io/io/src/TBufferFile.cxx | 25 ++++++++++++++++++++++++- + 1 file changed, 24 insertions(+), 1 deletion(-) + +diff --git a/io/io/src/TBufferFile.cxx b/io/io/src/TBufferFile.cxx +index 81e0f95e02..b5b7ef9831 100644 +--- a/io/io/src/TBufferFile.cxx ++++ b/io/io/src/TBufferFile.cxx +@@ -1948,6 +1948,8 @@ void TBufferFile::WriteArrayDouble32(const Double_t *d, Int_t n, TStreamerElemen + + void TBufferFile::WriteFastArray(const Bool_t *b, Long64_t n) + { ++ if (n == 0) return; ++ + constexpr Int_t dataWidth = static_cast<Int_t>(sizeof(UChar_t)); + const Int_t maxElements = (std::numeric_limits<Int_t>::max() - Length())/dataWidth; + if (n < 0 || n > maxElements) +@@ -1974,6 +1976,8 @@ void TBufferFile::WriteFastArray(const Bool_t *b, Long64_t n) + + void TBufferFile::WriteFastArray(const Char_t *c, Long64_t n) + { ++ if (n == 0) return; ++ + constexpr Int_t dataWidth = static_cast<Int_t>(sizeof(Char_t)); + const Int_t maxElements = (std::numeric_limits<Int_t>::max() - Length())/dataWidth; + if (n < 0 || n > maxElements) +@@ -1995,6 +1999,8 @@ void TBufferFile::WriteFastArray(const Char_t *c, Long64_t n) + + void TBufferFile::WriteFastArrayString(const Char_t *c, Long64_t n) + { ++ if (n == 0) return; ++ + constexpr Int_t dataWidth = static_cast<Int_t>(sizeof(Char_t)); + const Int_t maxElements = (std::numeric_limits<Int_t>::max() - Length())/dataWidth; + if (n < 0 || n > maxElements) +@@ -2023,6 +2029,8 @@ void TBufferFile::WriteFastArrayString(const Char_t *c, Long64_t n) + + void TBufferFile::WriteFastArray(const Short_t *h, Long64_t n) + { ++ if (n == 0) return; ++ + constexpr Int_t dataWidth = static_cast<Int_t>(sizeof(Short_t)); + const Int_t maxElements = (std::numeric_limits<Int_t>::max() - Length())/dataWidth; + if (n < 0 || n > maxElements) +@@ -2054,7 +2062,8 @@ void TBufferFile::WriteFastArray(const Short_t *h, Long64_t n) + + void TBufferFile::WriteFastArray(const Int_t *ii, Long64_t n) + { +- ++ if (n == 0) return; ++ + constexpr Int_t dataWidth = 4; + const Int_t maxElements = (std::numeric_limits<Int_t>::max() - Length())/dataWidth; + if (n < 0 || n > maxElements) +@@ -2086,6 +2095,8 @@ void TBufferFile::WriteFastArray(const Int_t *ii, Long64_t n) + + void TBufferFile::WriteFastArray(const Long_t *ll, Long64_t n) + { ++ if (n == 0) return; ++ + constexpr Int_t dataWidth = 8; + const Int_t maxElements = (std::numeric_limits<Int_t>::max() - Length())/dataWidth; + if (n < 0 || n > maxElements) +@@ -2108,6 +2119,8 @@ void TBufferFile::WriteFastArray(const Long_t *ll, Long64_t n) + + void TBufferFile::WriteFastArray(const ULong_t *ll, Long64_t n) + { ++ if (n == 0) return; ++ + constexpr Int_t dataWidth = 8; + const Int_t maxElements = (std::numeric_limits<Int_t>::max() - Length())/dataWidth; + if (n < 0 || n > maxElements) +@@ -2128,6 +2141,8 @@ void TBufferFile::WriteFastArray(const ULong_t *ll, Long64_t n) + + void TBufferFile::WriteFastArray(const Long64_t *ll, Long64_t n) + { ++ if (n == 0) return; ++ + constexpr Int_t dataWidth = static_cast<Int_t>(sizeof(Long64_t)); + const Int_t maxElements = (std::numeric_limits<Int_t>::max() - Length())/dataWidth; + if (n < 0 || n > maxElements) +@@ -2154,6 +2169,8 @@ void TBufferFile::WriteFastArray(const Long64_t *ll, Long64_t n) + + void TBufferFile::WriteFastArray(const Float_t *f, Long64_t n) + { ++ if (n == 0) return; ++ + constexpr Int_t dataWidth = static_cast<Int_t>(sizeof(Float_t)); + const Int_t maxElements = (std::numeric_limits<Int_t>::max() - Length())/dataWidth; + if (n < 0 || n > maxElements) +@@ -2185,6 +2202,8 @@ void TBufferFile::WriteFastArray(const Float_t *f, Long64_t n) + + void TBufferFile::WriteFastArray(const Double_t *d, Long64_t n) + { ++ if (n == 0) return; ++ + constexpr Int_t dataWidth = static_cast<Int_t>(sizeof(Double_t)); + const Int_t maxElements = (std::numeric_limits<Int_t>::max() - Length())/dataWidth; + if (n < 0 || n > maxElements) +@@ -2212,6 +2231,8 @@ void TBufferFile::WriteFastArray(const Double_t *d, Long64_t n) + + void TBufferFile::WriteFastArrayFloat16(const Float_t *f, Long64_t n, TStreamerElement *ele) + { ++ if (n == 0) return; ++ + constexpr Int_t dataWidth = static_cast<Int_t>(sizeof(Float_t)); + const Int_t maxElements = (std::numeric_limits<Int_t>::max() - Length())/dataWidth; + if (n < 0 || n > maxElements) +@@ -2270,6 +2291,8 @@ void TBufferFile::WriteFastArrayFloat16(const Float_t *f, Long64_t n, TStreamerE + + void TBufferFile::WriteFastArrayDouble32(const Double_t *d, Long64_t n, TStreamerElement *ele) + { ++ if (n == 0) return; ++ + constexpr Int_t dataWidth = static_cast<Int_t>(sizeof(Float_t)); + const Int_t maxElements = (std::numeric_limits<Int_t>::max() - Length())/dataWidth; + if (n < 0 || n > maxElements) +-- +2.39.4 + diff --git a/academic/root/root.SlackBuild b/academic/root/root.SlackBuild index 6ee487d6458d..23dfa4a17b44 100644 --- a/academic/root/root.SlackBuild +++ b/academic/root/root.SlackBuild @@ -20,7 +20,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=root -VERSION=${VERSION:-6.30.08} +VERSION=${VERSION:-6.32.04} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -55,7 +55,6 @@ fi CXXSTD=${CXXSTD:-17} set -e - rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP @@ -65,6 +64,9 @@ mv root-$VERSION src mkdir -p $PRGNAM-$VERSION mv src $PRGNAM-$VERSION cd $PRGNAM-$VERSION +cd src +patch -p1 <$CWD/fixWriteFastArray.patch +cd .. chown -R root:root . find -L . \ @@ -132,7 +134,7 @@ cmake ../src \ -Ddcache=OFF \ -Ddev=OFF \ -Ddistcc=OFF \ - -Dexceptions=ON \ + -Dexceptions=OFF \ -Dfail-on-missing=ON \ -Dfcgi=OFF \ -Dfitsio=ON \ @@ -149,7 +151,6 @@ cmake ../src \ -Dmacos_native=OFF \ -Dmemory_termination=OFF \ -Dminimal=OFF \ - -Dminuit2=ON \ -Dmlp=ON \ -Dmonalisa=OFF \ -Dmpi=OFF \ @@ -225,7 +226,6 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/etc/profile.d # Start with tcsh echo "setenv ROOTSYS $PREFIX" > $PKG/etc/profile.d/root.csh -echo "set path = ( \$path $PREFIX/bin )" >> $PKG/etc/profile.d/root.csh echo "setenv MANPATH \${MANPATH}:$PREFIX/man" >> $PKG/etc/profile.d/root.csh echo "if ( ! \$?PYTHONPATH ) then" >> $PKG/etc/profile.d/root.csh echo "setenv PYTHONPATH $PREFIX/lib" >> $PKG/etc/profile.d/root.csh @@ -238,7 +238,6 @@ echo "endif" >> $PKG/etc/profile.d/root.csh echo "endif" >> $PKG/etc/profile.d/root.csh # And bash echo "ROOTSYS=$PREFIX" > $PKG/etc/profile.d/root.sh -echo "PATH=\$PATH:$PREFIX/bin" >> $PKG/etc/profile.d/root.sh echo "MANPATH=\$MANPATH:$PREFIX/man" >> $PKG/etc/profile.d/root.sh echo "if [ -z \"\${PYTHONPATH}\" ]; then" >> $PKG/etc/profile.d/root.sh echo " export PYTHONPATH=$PREFIX/lib" >> $PKG/etc/profile.d/root.sh @@ -248,12 +247,21 @@ echo " export PYTHONPATH=\$PYTHONPATH:$PREFIX/lib" \ echo "fi" >> $PKG/etc/profile.d/root.sh chmod +x $PKG/etc/profile.d/root.* -mkdir -p $PKG/etc/ld.so.conf.d -echo "$PREFIX/lib" > $PKG/etc/ld.so.conf.d/root.conf +mkdir -p $PKG/usr/bin +for B in $(find $PKG/$PREFIX/bin -executable -type f); do + BINARY=$(basename $B) + echo "#!/bin/bash" > $PKG/usr/bin/${BINARY} + echo "# shell wrapper for SBo $BINARY pkg" >> $PKG/usr/bin/${BINARY} + echo "# autogenerated by root.Slackbuild" >> $PKG/usr/bin/${BINARY} + echo >> $PKG/usr/bin/${BINARY} + echo "source ${PREFIX}/bin/thisroot.sh" >> $PKG/usr/bin/${BINARY} + echo >> $PKG/usr/bin/${BINARY} + echo "exec ${PREFIX}/bin/${BINARY} "'"$@"' >> $PKG/usr/bin/${BINARY} + chmod +x $PKG/usr/bin/${BINARY} +done mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc -cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/academic/root/root.info b/academic/root/root.info index 8f1326e4617e..5996fbb32aa9 100644 --- a/academic/root/root.info +++ b/academic/root/root.info @@ -1,10 +1,10 @@ PRGNAM="root" -VERSION="6.30.08" +VERSION="6.32.04" HOMEPAGE="https://root.cern" -DOWNLOAD="UNSUPPORTED" -MD5SUM="" -DOWNLOAD_x86_64="https://root.cern/download/root_v6.30.08.source.tar.gz" -MD5SUM_x86_64="0be570ec97004395d7ccde20edd8a803" +DOWNLOAD="https://root.cern/download/root_v6.32.04.source.tar.gz" +MD5SUM="d71795311fae41b0b53573ce24197a2b" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" REQUIRES="gl2ps libAfterImage python3-numpy tbb ftgl" MAINTAINER="Andrei Rabusov" EMAIL="arabusov@gmail.com" |