Rivet fails to configure for HepMC 3.02.08
In the LCG nightly builds against HepMC3 master, rivet 3.1.8 fails to configure with the error message: (https://lcgapp-services.cern.ch/cdash/viewFiles.php?buildid=271420)
configure: Found HepMC3 library at /build/jenkins/workspace/lcg_nightly_pipeline/install/dev3/hepmc3/HEAD/x86_64-centos7-gcc11-opt/lib64/libHepMC3.so
configure: Found HepMC3 header directory at /build/jenkins/workspace/lcg_nightly_pipeline/install/dev3/hepmc3/HEAD/x86_64-centos7-gcc11-opt/include
./configure: line 20640: let: hepmc_third=08: value too great for base (error token is "08")
configure: HepMC version is 3.02.08 -> 32
This is caused by the line in the configure
file, because 08 is interpreted as an octal, and now that version number hits 8, it breaks.
if test x$hepmc_version != x; then
let hepmc_major=`echo "$hepmc_version" | cut -d. -f1`
let hepmc_minor=`echo "$hepmc_version" | cut -d. -f2`
let hepmc_third=`echo "$hepmc_version" | cut -d. -f3`
fi
My knowledge of the autotools is non-existent, so I don't know what the proper fix is to generate a configure file where this doesn't happen?
(We can patch something like `" | sed "s/^0*//" in to remove leading zeros in our builds.)