Haha, silly me. I missed that @carlosal1015 was also hinting me at an outdated package. My bad. Now up-to-date
/Pico
Git Clone URL: | https://aur.archlinux.org/clhep.git (read-only, click to copy) |
---|---|
Package Base: | clhep |
Description: | A Class library for High Energy Physics |
Upstream URL: | http://proj-clhep.web.cern.ch/ |
Licenses: | GPL3 |
Submitter: | Sonequa |
Maintainer: | donpicoro |
Last Packager: | donpicoro |
Votes: | 9 |
Popularity: | 0.000086 |
First Submitted: | 2007-10-17 17:47 (UTC) |
Last Updated: | 2024-08-14 07:53 (UTC) |
Haha, silly me. I missed that @carlosal1015 was also hinting me at an outdated package. My bad. Now up-to-date
/Pico
It now compiles. There was a missing texlive package. I also adopted the cmake build thanks to @carlosal1015
/Pico
# Maintainer: Luis Sarmiento <Luis.Sarmiento@nuclear.lu.se>
# Contributor: Sebastian Voecking <voeck-ala-web.de>
_pkgname=CLHEP
pkgname=${_pkgname,,}
pkgver=2.4.7.1
pkgrel=1
pkgdesc="A Class library for High Energy Physics"
url="https://proj-clhep.web.cern.ch"
arch=(x86_64)
license=(GPL-3.0-or-later)
depends=(bash)
options=('!emptydirs' 'staticlibs')
makedepends=(cmake doxygen texlive-latex)
source=(${url}/proj-clhep/dist1/${pkgname}-${pkgver}.tgz)
sha256sums=('1c8304a7772ac6b99195f1300378c6e3ddf4ad07c85d64a04505652abb8a55f9')
build() {
cmake \
-S ${pkgver}/${_pkgname} \
-B build \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCLHEP_BUILD_DOCS=ON
cmake --build build --target all
}
check() {
ctest --test-dir build
}
package() {
DESTDIR="${pkgdir}" cmake --build build --target install
install -Dm 644 ${pkgver}/${_pkgname}/COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
Getting the following error during build:
kpathsea: Running mktexfmt pdflatex.fmt
mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order):
mktexfmt: /etc/texmf/web2c/fmtutil.cnf
mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes:
mktexfmt: /build/.texlive/texmf-config/web2c/fmtutil.cnf
mktexfmt [INFO]: writing formats under /build/.texlive/texmf-var/web2c
mktexfmt [INFO]: Did not find entry for byfmt=pdflatex skipped
mktexfmt [INFO]: not selected formats: 8
mktexfmt [INFO]: total formats: 8
mktexfmt [INFO]: exiting with status 0
I can't find the format file `pdflatex.fmt'!
make[2]: *** [Units/doc/CMakeFiles/Units.dir/build.make:83: Units/doc/Units.aux] Error 1
make[1]: *** [CMakeFiles/Makefile2:1128: Units/doc/CMakeFiles/Units.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
https://github.com/arch4edu/cactus/actions/runs/10302456931/job/28516174192
NOTE to users compiling geant4 with the option GEANT4_USE_SYSTEM_CLHEP=ON
:
The geant4 checks for clhep will fail as they will look for the static libraries which are removed by default.
To avoid the removal of clhep libraries needed by geant4 for its check make sure to add staticlibs
to the options
array.
I know how to manually modify the packages for me, so for me any solution is ok. Just thought I should share the findings..
My thought is that clhep is a library, and provides a script which helps other software link to it. And these scripts look for files that makepkg is currently removing (which may be fair enough, static linking is a boo in my mind). So I think there should be a patch on clhep side to remove the static library part of these cmake checks. Maybe one could even send a patch upstream to have an option to only build dynamic libraries in the first place.
@Eothred: OK, I get it now. But would you agree that the packages as such should not be modified?
We should keep a "pinned comment" regarding this at both geant4 and clhep packages mentioning this for those users like you. Would this be an OK way to go for you? Thoughts?
You can try to build geant4 with the option GEANT4_USE_SYSTEM_CLHEP on, and you should get the same error.
The cmake scripts provided by clhep for other software to link to clhep, includes checks to confirm that all "required files" are present. While I'd argue that the static libraries shouldn't be needed (by default), it looks for example for the CLHEP::VectorS which is the static Vector library. See README.md where this is mentioned.
Hello @Eothred,
I'm not sure I understand which check is failing for you. When I compile CLHEP by itself all the 44 tests pass without a hitch. Or perhaps you mean Geant4 check? (if so, which one? I am not aware of a check).
/Pico
This took me a short while to realise. I tried to build geant4 linking to this package, but the cmake configuration failed.
In the end, I figured out that the cmake "checks" looks for the static libraries, which makepkg by default removes. I think for this package it would be correct to add "staticlibs" to the options array.
Maybe there is a patch one could apply to have cmake not look for the static libraries instead, but I don't know how to fix this.
Pinned Comments
donpicoro commented on 2018-11-23 10:55 (UTC)
NOTE to users compiling geant4 with the option
GEANT4_USE_SYSTEM_CLHEP=ON
:The geant4 checks for clhep will fail as they will look for the static libraries which are removed by default.
To avoid the removal of clhep libraries needed by geant4 for its check make sure to add
staticlibs
to theoptions
array.