GlueX Install on Fedora 35

It works in a container with version.xml -> version_5.8.0.xml

date > /data/scratch/f35_build/gluex_top/gluex_MCwrapper/gluex_MCwrapper-v2.6.2/.untar_done
cd /data/scratch/f35_build/gluex_top/gluex_MCwrapper/gluex_MCwrapper-v2.6.2 ; /data/scratch/f35_build/gluex_top/build_scripts/version_prereqs.pl gluex_mcwrapper
make[1]: Leaving directory '/data/scratch/f35_build/gluex_top/gluex_MCwrapper'
gluex_install.sh info: done
Apptainer> dahell
hostname = markdesk5.itodomain
release = Fedora release 35 (Thirty Five)
 16:17:09 up 4 days,  3:55,  0 users,  load average: 0.36, 0.41, 0.50
whoami = marki
pwd = /data/scratch/f35_build

Error building CERNLIB on Fedora 35

Get an error on several packages. From the grep of the log file for errors:

gmake[3]: *** [Makefile:439: libpacklib.a] Error 123
gmake[2]: *** [Makefile:335: install.lib] Error 2
gmake[3]: *** [Makefile:483: install.bin] Error 2
gmake[2]: *** [Makefile:500: install.bin] Error 2
gmake[5]: *** [Makefile:440: libzftplib.a] Error 123
gmake[4]: *** [Makefile:335: install.bin] Error 2
gmake[3]: *** [Makefile:473: install.bin] Error 2
gmake[2]: *** [Makefile:512: install.bin] Error 2
make[1]: *** [/data/scratch/gluex_top/build_scripts/Makefile_cernlib_Vogt:67: .error_check_done] Error 1
make[1]: Leaving directory '/data/scratch/gluex_top/cernlib'
make: *** [/data/scratch/gluex_top/build_scripts/Makefile_all:64: cernlib_make] Error 2
pass 1 failed, exiting

From the log, the error for packlib looks like:

gmake[4]: Leaving directory '/data/scratch/gluex_top/cernlib/2005/build/packlib/kernlib'
rebuild archive library libpacklib.a in /packlib
Sat Nov 13 02:19:40 PM EST 2021
ar: libdeps specified more than once
gmake[3]: *** [Makefile:439: libpacklib.a] Error 123
gmake[3]: Leaving directory '/data/scratch/gluex_top/cernlib/2005/build/packlib'
gmake[2]: *** [Makefile:335: install.lib] Error 2
gmake[2]: Leaving directory '/data/scratch/gluex_top/cernlib/2005/build'
gmake[2]: Entering directory '/data/scratch/gluex_top/cernlib/2005/build/pawlib'

The error is reported in several places, for example, here.

And indeed, in cernlib/2005/build/packlib/Makefile, one sees AR = ar clq .

To fix it, after unpacking src, as part of patch step, change clq to cq in ./2005/src/config/Imake.tmpl . Note that there was already a patch for Imake.tmpl in the patches directory for cernlib in build scripts. That seems to have had something to do with throwing debug flags for FORTRAN, but just overwrote it with the new patch. The old patch was not being applied by Makefile_cernlib_Vogt in any case. The actual patch command had to be added to that makefile.