You are not logged in.

#1 2024-02-10 12:58:16

japs
Member
Registered: 2016-02-09
Posts: 3
Website

PKGBUILD review: GLVis

Hi, I would like to post my first PKGBUILD contribution to AUR: GLVis, a scientific visualisation tool. Besides asking for general advice and comments, I have some specific questions:
1) Are the dependencies correct? In particular the split of `makedepends` and `depends`?
2) Openmpi 5 was released just a few days ago, which deprecates `libmpi_cxx.so`, a depedency of GLVis. I marked the version requirements in the dependency but it is not clear to me if this is the correct was to proceed and what should an end user do to install Openmpi 4.
3) A homonym package is already present in AUR. Since GLVis is strongly coupled with MFEM, I prefixed the name with `mfem-`. Is this OK?

Thanks!

# Maintainer: japs
# Contributor: japs
pkgname=mfem-glvis
_pkgname=glvis
pkgver=4.2
pkgrel=1
pkgdesc="A lightweight tool for accurate and flexible finite element visualization"
arch=("x86_64")
url="https://glvis.org"
license=('BSD-3-Clause')
groups=()
depends=(libpng 'openmpi<5' freetype2 sdl2 mfem glew gcc-libs libglvnd fontconfig glibc)
makedepends=(cmake patch tinyxxd)
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=(${_pkgname}-${pkgver}.tar.gz::https://github.com/GLVis/$_pkgname/archive/refs/tags/v$pkgver.tar.gz)
noextract=()
md5sums=('a228c65c285e7a66e38b1ec2f2812842')

prepare() {
    # Backporting upstream commit 92bab4c 
    # "Fix installation with CMake on non-APPLE platforms"
    cd $_pkgname-$pkgver
    echo -e "318a319\n>   if (APPLE)\n339a341\n>   endif (APPLE)" | patch CMakeLists.txt
}

build() {
  cmake \
    -S "$_pkgname-$pkgver" \
    -B build \
    -D CMAKE_BUILD_TYPE:STRING=Release \
    -D CMAKE_INSTALL_PREFIX:STRING=/usr \
    -D GLVIS_USE_LIBTIFF=OFF \
    -D GLVIS_USE_LIBPNG=ON

  local N_CORES=$(grep "core id" /proc/cpuinfo | uniq | wc -l)
  cmake --build build --parallel $N_CORES
}

package() {
  ln -s build/glvis build/GLVis
  ls build
  DESTDIR="${pkgdir}" cmake --build build --target install -v

  install \
      -v \
      -Dm 644 \
      ${_pkgname}-${pkgver}/LICENSE \
      -t "${pkgdir}/usr/share/licenses/${_pkgname}"
}

Offline

#2 2024-02-10 19:54:04

loqs
Member
Registered: 2014-03-06
Posts: 17,908

Re: PKGBUILD review: GLVis

japs wrote:

1) Are the dependencies correct? In particular the split of `makedepends` and `depends`?

makedepends=(cmake patch tinyxxd)

patch is a dependency of base-devel which is assumed installed.

japs wrote:

2) Openmpi 5 was released just a few days ago, which deprecates `libmpi_cxx.so`, a depedency of GLVis. I marked the version requirements in the dependency but it is not clear to me if this is the correct was to proceed and what should an end user do to install Openmpi 4.

I built mfem without openmpi and then built mfem-glvis with the dependency on openmpi removed.  Is openmpi directly used by glivs?  I had to add glm libxi but that might be related to my changes to mfem.

Minor nits

# Contributor: japs

Not usually used when you are the maintainer.

groups=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
noextract=()

Unused variables.

  local N_CORES=$(grep "core id" /proc/cpuinfo | uniq | wc -l)
  cmake --build build --parallel $N_CORES

I would suggest switching to using ninja as the generator which will use all cores by default.

Offline

#3 2024-02-11 12:39:50

japs
Member
Registered: 2016-02-09
Posts: 3
Website

Re: PKGBUILD review: GLVis

Hi loqs, thanks a lot for your feedback.

loqs wrote:

patch is a dependency of base-devel which is assumed installed.

Will remove patch.

loqs wrote:
japs wrote:

2) Openmpi 5 was released just a few days ago, which deprecates `libmpi_cxx.so`, a depedency of GLVis. I marked the version requirements in the dependency but it is not clear to me if this is the correct was to proceed and what should an end user do to install Openmpi 4.

I built mfem without openmpi and then built mfem-glvis with the dependency on openmpi removed.  Is openmpi directly used by glivs?  I had to add glm libxi but that might be related to my changes to mfem.

While in theory you are right that mfem could be built without openmpi, that's not going to be very useful for any practical purpose. Cf. also my comment to mfem's package [1]. Besides this, keeping the MPI requirement would enable package managers to simply download and build mfem and mfem-glvis without any user intervention. For these reasons I think it is strongly preferable to keep the MPI requirements in glvis.

[1] https://aur.archlinux.org/packages/mfem#comment-951398

loqs wrote:

Minor nits [...]

Thanks, will amend.

loqs wrote:

I would suggest switching to using ninja as the generator which will use all cores by default.

That would require me to study a bit as I have only used Ninja as mediated by Meson. I would probably defer this change to a later iteration of the package.

Thanks again for all your feedback.

Offline

#4 2024-02-11 13:18:12

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,789

Re: PKGBUILD review: GLVis

  local N_CORES=$(grep "core id" /proc/cpuinfo | uniq | wc -l)
  cmake --build build --parallel $N_CORES

Setting such options in PKGBUILD is usually frowned upon as you are forcing something on a user system that you know almost nothing about.
Claiming all cores can cause the user system to crash or become unresponsive.

The preferred method is to direct users to configure MAKEFLAGS in /etc/makepkg.conf .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#5 2024-02-11 13:20:34

loqs
Member
Registered: 2014-03-06
Posts: 17,908

Re: PKGBUILD review: GLVis

I could not produce an issue with mfem and openmpi 5.0.1-2 from extra or 5.0.2-2 from extra-tetsing.
mfem-4.6-3-x86_64-build.log from building that package in a clean chroot against extra-testing with all AUR dependencies having been built the same way:

-- CMake version: 3.28.3
-- Loading USER_CONFIG = /build/mfem/src/mfem-4.6/config/user.cmake (NOTFOUND)
-- USE_XSDK_DEFAULTS = 'OFF'
-- The CXX compiler identification is GNU 13.2.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found MPI_CXX: /usr/lib/libmpi.so (found version "3.1") 
-- Found MPI: TRUE (found version "3.1")  
-- Looking for HYPRE ...
--    in HYPRE_DIR = /usr/include/hypre
-- Performing Test HYPRE_USING_HIP
-- Performing Test HYPRE_USING_HIP - Failed
-- Found HYPRE: /usr/lib/libHYPRE.so  
-- HYPRE_INCLUDE_DIRS=/usr/include/hypre
-- Found HYPRE version 23000
-- Looking for METIS ...
--    in METIS_DIR = /build/mfem/src/mfem-4.6/../metis-4.0
-- Performing Test METIS_VERSION_5
-- Performing Test METIS_VERSION_5 - Success
-- Found METIS: /usr/lib/libmetis.so  
-- METIS_INCLUDE_DIRS=/usr/include
-- Looking for POSIXClocks ...
--    checking library: <standard c/c++>
-- Found POSIXClocks: TRUE  
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- MFEM: using package HYPRE
-- MFEM: using package METIS
-- MFEM: using package POSIXCLOCKS
-- MFEM: using package MPI_CXX
-- MFEM shared library: BUILD_SHARED_LIBS = TRUE
-- MFEM build type: CMAKE_BUILD_TYPE = None
-- MFEM version: v4.6.0
-- MFEM git string: (unknown)
-- TPL_INCLUDE_DIRS = /usr/include/hypre;/usr/include
-- Writing substitute header --> "mfem.hpp"
-- Writing substitute header --> "mfem-performance.hpp"
-- performance_ex1: add flags "-march=native -Wall -pedantic --param max-completely-peel-times=3"
-- performance_ex1p: add flags "-march=native -Wall -pedantic --param max-completely-peel-times=3"
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- CMAKE_INSTALL_PREFIX = /usr
-- Configuring done (1.1s)
-- Generating done (0.2s)
-- Build files have been written to: /build/mfem/src/build
[  0%] Building CXX object CMakeFiles/mfem.dir/general/binaryio.cpp.o
[  0%] Building CXX object CMakeFiles/mfem.dir/general/device.cpp.o
[  0%] Building CXX object CMakeFiles/mfem.dir/general/gecko.cpp.o
[  0%] Building CXX object CMakeFiles/mfem.dir/general/cuda.cpp.o
[  3%] Building CXX object CMakeFiles/mfem.dir/general/array.cpp.o
[  3%] Building CXX object CMakeFiles/mfem.dir/general/error.cpp.o
[  3%] Building CXX object CMakeFiles/mfem.dir/general/globals.cpp.o
[  3%] Building CXX object CMakeFiles/mfem.dir/general/hash.cpp.o
[  7%] Building CXX object CMakeFiles/mfem.dir/general/isockstream.cpp.o
[  7%] Building CXX object CMakeFiles/mfem.dir/general/mem_manager.cpp.o
[  7%] Building CXX object CMakeFiles/mfem.dir/general/optparser.cpp.o
[  7%] Building CXX object CMakeFiles/mfem.dir/general/osockstream.cpp.o
[  7%] Building CXX object CMakeFiles/mfem.dir/general/sets.cpp.o
[  7%] Building CXX object CMakeFiles/mfem.dir/general/occa.cpp.o
[  7%] Building CXX object CMakeFiles/mfem.dir/general/socketstream.cpp.o
[  7%] Building CXX object CMakeFiles/mfem.dir/general/stable3d.cpp.o
[  7%] Building CXX object CMakeFiles/mfem.dir/general/table.cpp.o
[ 11%] Building CXX object CMakeFiles/mfem.dir/general/tic_toc.cpp.o
[ 11%] Building CXX object CMakeFiles/mfem.dir/general/tinyxml2.cpp.o
[ 11%] Building CXX object CMakeFiles/mfem.dir/general/version.cpp.o
[ 11%] Building CXX object CMakeFiles/mfem.dir/general/hip.cpp.o
[ 11%] Building CXX object CMakeFiles/mfem.dir/general/communication.cpp.o
[ 11%] Building CXX object CMakeFiles/mfem.dir/linalg/auxiliary.cpp.o
[ 11%] Building CXX object CMakeFiles/mfem.dir/linalg/blockmatrix.cpp.o
[ 11%] Building CXX object CMakeFiles/mfem.dir/linalg/complex_densemat.cpp.o
[ 11%] Building CXX object CMakeFiles/mfem.dir/linalg/complex_operator.cpp.o
[ 11%] Building CXX object CMakeFiles/mfem.dir/linalg/blockoperator.cpp.o
[ 15%] Building CXX object CMakeFiles/mfem.dir/linalg/blockvector.cpp.o
[ 15%] Building CXX object CMakeFiles/mfem.dir/linalg/constraints.cpp.o
[ 15%] Building CXX object CMakeFiles/mfem.dir/linalg/densemat.cpp.o
[ 15%] Building CXX object CMakeFiles/mfem.dir/linalg/symmat.cpp.o
[ 15%] Building CXX object CMakeFiles/mfem.dir/linalg/handle.cpp.o
[ 15%] Building CXX object CMakeFiles/mfem.dir/linalg/matrix.cpp.o
[ 19%] Building CXX object CMakeFiles/mfem.dir/linalg/ode.cpp.o
[ 19%] Building CXX object CMakeFiles/mfem.dir/linalg/operator.cpp.o
[ 19%] Building CXX object CMakeFiles/mfem.dir/linalg/solvers.cpp.o
[ 19%] Building CXX object CMakeFiles/mfem.dir/linalg/sparsemat.cpp.o
[ 19%] Building CXX object CMakeFiles/mfem.dir/linalg/sparsesmoothers.cpp.o
[ 19%] Building CXX object CMakeFiles/mfem.dir/linalg/vector.cpp.o
[ 19%] Building CXX object CMakeFiles/mfem.dir/linalg/hypre.cpp.o
[ 19%] Building CXX object CMakeFiles/mfem.dir/linalg/hypre_parcsr.cpp.o
[ 23%] Building CXX object CMakeFiles/mfem.dir/mesh/element.cpp.o
[ 23%] Building CXX object CMakeFiles/mfem.dir/mesh/hexahedron.cpp.o
[ 23%] Building CXX object CMakeFiles/mfem.dir/mesh/gmsh.cpp.o
[ 23%] Building CXX object CMakeFiles/mfem.dir/mesh/mesh.cpp.o
[ 23%] Building CXX object CMakeFiles/mfem.dir/mesh/mesh_operators.cpp.o
[ 23%] Building CXX object CMakeFiles/mfem.dir/mesh/mesh_readers.cpp.o
[ 23%] Building CXX object CMakeFiles/mfem.dir/mesh/ncmesh.cpp.o
[ 23%] Building CXX object CMakeFiles/mfem.dir/mesh/nurbs.cpp.o
[ 23%] Building CXX object CMakeFiles/mfem.dir/mesh/point.cpp.o
[ 26%] Building CXX object CMakeFiles/mfem.dir/mesh/pyramid.cpp.o
[ 26%] Building CXX object CMakeFiles/mfem.dir/mesh/quadrilateral.cpp.o
[ 26%] Building CXX object CMakeFiles/mfem.dir/mesh/tetrahedron.cpp.o
[ 26%] Building CXX object CMakeFiles/mfem.dir/mesh/segment.cpp.o
[ 26%] Building CXX object CMakeFiles/mfem.dir/mesh/triangle.cpp.o
[ 26%] Building CXX object CMakeFiles/mfem.dir/mesh/vertex.cpp.o
[ 26%] Building CXX object CMakeFiles/mfem.dir/mesh/vtk.cpp.o
[ 26%] Building CXX object CMakeFiles/mfem.dir/mesh/wedge.cpp.o
[ 30%] Building CXX object CMakeFiles/mfem.dir/mesh/submesh/submesh.cpp.o
[ 30%] Building CXX object CMakeFiles/mfem.dir/mesh/submesh/submesh_utils.cpp.o
[ 30%] Building CXX object CMakeFiles/mfem.dir/mesh/submesh/transfermap.cpp.o
[ 30%] Building CXX object CMakeFiles/mfem.dir/mesh/pmesh.cpp.o
[ 30%] Building CXX object CMakeFiles/mfem.dir/mesh/pncmesh.cpp.o
[ 30%] Building CXX object CMakeFiles/mfem.dir/mesh/submesh/ptransfermap.cpp.o
[ 30%] Building CXX object CMakeFiles/mfem.dir/mesh/submesh/psubmesh.cpp.o
[ 30%] Building CXX object CMakeFiles/mfem.dir/fem/bilinearform.cpp.o
[ 34%] Building CXX object CMakeFiles/mfem.dir/fem/bilinearform_ext.cpp.o
[ 34%] Building CXX object CMakeFiles/mfem.dir/fem/bilininteg.cpp.o
[ 34%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_br2.cpp.o
[ 34%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_convection_mf.cpp.o
[ 34%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_convection_pa.cpp.o
[ 34%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_convection_ea.cpp.o
[ 34%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_curlcurl_pa.cpp.o
[ 34%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_dgtrace_pa.cpp.o
[ 34%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_dgtrace_ea.cpp.o
[ 38%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_diffusion_mf.cpp.o
[ 38%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_diffusion_pa.cpp.o
[ 38%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_diffusion_ea.cpp.o
[ 38%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_diffusion_patch.cpp.o
[ 38%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_divdiv_pa.cpp.o
[ 38%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_gradient_pa.cpp.o
[ 38%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_interp_pa.cpp.o
[ 38%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_mass_mf.cpp.o
[ 42%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_mass_pa.cpp.o
[ 42%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_mass_ea.cpp.o
[ 42%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_mixedcurl_pa.cpp.o
[ 42%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_mixedvecgrad_pa.cpp.o
[ 42%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_transpose_ea.cpp.o
[ 42%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_vecdiffusion_mf.cpp.o
[ 42%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_vecdiffusion_pa.cpp.o
[ 42%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_vecdiv_pa.cpp.o
[ 46%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_vecmass_mf.cpp.o
[ 46%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_vecmass_pa.cpp.o
[ 46%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_vectorfediv_pa.cpp.o
[ 46%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_vectorfemass_pa.cpp.o
[ 46%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_diffusion_kernels.cpp.o
[ 46%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_hcurl_kernels.cpp.o
[ 46%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_hdiv_kernels.cpp.o
[ 46%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_hcurlhdiv_kernels.cpp.o
[ 50%] Building CXX object CMakeFiles/mfem.dir/fem/integ/bilininteg_mass_kernels.cpp.o
[ 50%] Building CXX object CMakeFiles/mfem.dir/fem/integ/lininteg_boundary.cpp.o
[ 50%] Building CXX object CMakeFiles/mfem.dir/fem/integ/lininteg_boundary_flux.cpp.o
[ 50%] Building CXX object CMakeFiles/mfem.dir/fem/integ/lininteg_domain.cpp.o
[ 50%] Building CXX object CMakeFiles/mfem.dir/fem/integ/lininteg_domain_grad.cpp.o
[ 50%] Building CXX object CMakeFiles/mfem.dir/fem/integ/lininteg_domain_vectorfe.cpp.o
[ 50%] Building CXX object CMakeFiles/mfem.dir/fem/integ/nonlininteg_vecconvection_pa.cpp.o
[ 50%] Building CXX object CMakeFiles/mfem.dir/fem/integ/nonlininteg_vecconvection_mf.cpp.o
[ 50%] Building CXX object CMakeFiles/mfem.dir/fem/coefficient.cpp.o
[ 53%] Building CXX object CMakeFiles/mfem.dir/fem/complex_fem.cpp.o
[ 53%] Building CXX object CMakeFiles/mfem.dir/fem/convergence.cpp.o
[ 53%] Building CXX object CMakeFiles/mfem.dir/fem/datacollection.cpp.o
[ 53%] Building CXX object CMakeFiles/mfem.dir/fem/dgmassinv.cpp.o
[ 53%] Building CXX object CMakeFiles/mfem.dir/fem/doftrans.cpp.o
[ 53%] Building CXX object CMakeFiles/mfem.dir/fem/eltrans.cpp.o
[ 53%] Building CXX object CMakeFiles/mfem.dir/fem/estimators.cpp.o
[ 53%] Building CXX object CMakeFiles/mfem.dir/fem/fe.cpp.o
[ 57%] Building CXX object CMakeFiles/mfem.dir/fem/fe/face_map_utils.cpp.o
[ 57%] Building CXX object CMakeFiles/mfem.dir/fem/fe/fe_base.cpp.o
[ 57%] Building CXX object CMakeFiles/mfem.dir/fem/fe/fe_fixed_order.cpp.o
[ 57%] Building CXX object CMakeFiles/mfem.dir/fem/fe/fe_h1.cpp.o
[ 57%] Building CXX object CMakeFiles/mfem.dir/fem/fe/fe_l2.cpp.o
[ 57%] Building CXX object CMakeFiles/mfem.dir/fem/fe/fe_nd.cpp.o
[ 57%] Building CXX object CMakeFiles/mfem.dir/fem/fe/fe_nurbs.cpp.o
[ 57%] Building CXX object CMakeFiles/mfem.dir/fem/fe/fe_pos.cpp.o
[ 61%] Building CXX object CMakeFiles/mfem.dir/fem/fe/fe_rt.cpp.o
[ 61%] Building CXX object CMakeFiles/mfem.dir/fem/fe/fe_ser.cpp.o
[ 61%] Building CXX object CMakeFiles/mfem.dir/fem/fe_coll.cpp.o
[ 61%] Building CXX object CMakeFiles/mfem.dir/fem/fespace.cpp.o
[ 61%] Building CXX object CMakeFiles/mfem.dir/fem/geom.cpp.o
[ 61%] Building CXX object CMakeFiles/mfem.dir/fem/gridfunc.cpp.o
[ 61%] Building CXX object CMakeFiles/mfem.dir/fem/hybridization.cpp.o
[ 61%] Building CXX object CMakeFiles/mfem.dir/fem/intrules.cpp.o
[ 65%] Building CXX object CMakeFiles/mfem.dir/fem/ceed/interface/basis.cpp.o
[ 65%] Building CXX object CMakeFiles/mfem.dir/fem/ceed/interface/restriction.cpp.o
[ 65%] Building CXX object CMakeFiles/mfem.dir/fem/ceed/interface/operator.cpp.o
[ 65%] Building CXX object CMakeFiles/mfem.dir/fem/ceed/interface/util.cpp.o
[ 65%] Building CXX object CMakeFiles/mfem.dir/fem/ceed/integrators/convection/convection.cpp.o
[ 65%] Building CXX object CMakeFiles/mfem.dir/fem/ceed/integrators/diffusion/diffusion.cpp.o
[ 65%] Building CXX object CMakeFiles/mfem.dir/fem/ceed/integrators/nlconvection/nlconvection.cpp.o
[ 65%] Building CXX object CMakeFiles/mfem.dir/fem/ceed/integrators/mass/mass.cpp.o
[ 65%] Building CXX object CMakeFiles/mfem.dir/fem/ceed/solvers/algebraic.cpp.o
[ 69%] Building CXX object CMakeFiles/mfem.dir/fem/ceed/solvers/full-assembly.cpp.o
[ 69%] Building CXX object CMakeFiles/mfem.dir/fem/ceed/solvers/solvers-atpmg.cpp.o
[ 69%] Building CXX object CMakeFiles/mfem.dir/fem/kdtree.cpp.o
[ 69%] Building CXX object CMakeFiles/mfem.dir/fem/linearform.cpp.o
[ 69%] Building CXX object CMakeFiles/mfem.dir/fem/linearform_ext.cpp.o
[ 69%] Building CXX object CMakeFiles/mfem.dir/fem/lininteg.cpp.o
[ 69%] Building CXX object CMakeFiles/mfem.dir/fem/lor/lor.cpp.o
[ 69%] Building CXX object CMakeFiles/mfem.dir/fem/lor/lor_ads.cpp.o
[ 73%] Building CXX object CMakeFiles/mfem.dir/fem/lor/lor_ams.cpp.o
[ 73%] Building CXX object CMakeFiles/mfem.dir/fem/lor/lor_batched.cpp.o
[ 73%] Building CXX object CMakeFiles/mfem.dir/fem/lor/lor_h1.cpp.o
[ 73%] Building CXX object CMakeFiles/mfem.dir/fem/lor/lor_nd.cpp.o
[ 73%] Building CXX object CMakeFiles/mfem.dir/fem/lor/lor_rt.cpp.o
[ 73%] Building CXX object CMakeFiles/mfem.dir/fem/multigrid.cpp.o
[ 73%] Building CXX object CMakeFiles/mfem.dir/fem/nonlinearform.cpp.o
[ 73%] Building CXX object CMakeFiles/mfem.dir/fem/nonlinearform_ext.cpp.o
[ 76%] Building CXX object CMakeFiles/mfem.dir/fem/nonlininteg.cpp.o
[ 76%] Building CXX object CMakeFiles/mfem.dir/fem/fespacehierarchy.cpp.o
[ 76%] Building CXX object CMakeFiles/mfem.dir/fem/qfunction.cpp.o
[ 76%] Building CXX object CMakeFiles/mfem.dir/fem/qinterp/det.cpp.o
[ 76%] Building CXX object CMakeFiles/mfem.dir/fem/qinterp/eval_by_nodes.cpp.o
[ 76%] Building CXX object CMakeFiles/mfem.dir/fem/qinterp/eval_by_vdim.cpp.o
[ 76%] Building CXX object CMakeFiles/mfem.dir/fem/qinterp/grad_by_nodes.cpp.o
[ 76%] Building CXX object CMakeFiles/mfem.dir/fem/qinterp/grad_by_vdim.cpp.o
[ 80%] Building CXX object CMakeFiles/mfem.dir/fem/qinterp/grad_phys_by_vdim.cpp.o
[ 80%] Building CXX object CMakeFiles/mfem.dir/fem/qinterp/grad_phys_by_nodes.cpp.o
[ 80%] Building CXX object CMakeFiles/mfem.dir/fem/qspace.cpp.o
[ 80%] Building CXX object CMakeFiles/mfem.dir/fem/quadinterpolator.cpp.o
[ 80%] Building CXX object CMakeFiles/mfem.dir/fem/quadinterpolator_face.cpp.o
[ 80%] Building CXX object CMakeFiles/mfem.dir/fem/restriction.cpp.o
[ 80%] Building CXX object CMakeFiles/mfem.dir/fem/staticcond.cpp.o
[ 80%] Building CXX object CMakeFiles/mfem.dir/fem/tmop.cpp.o
[ 80%] Building CXX object CMakeFiles/mfem.dir/fem/tmop/tmop_pa.cpp.o
[ 84%] Building CXX object CMakeFiles/mfem.dir/fem/tmop/tmop_pa_da3.cpp.o
[ 84%] Building CXX object CMakeFiles/mfem.dir/fem/tmop/tmop_pa_h2d.cpp.o
[ 84%] Building CXX object CMakeFiles/mfem.dir/fem/tmop/tmop_pa_h2d_c0.cpp.o
[ 84%] Building CXX object CMakeFiles/mfem.dir/fem/tmop/tmop_pa_h2m.cpp.o
[ 84%] Building CXX object CMakeFiles/mfem.dir/fem/tmop/tmop_pa_h2m_c0.cpp.o
[ 84%] Building CXX object CMakeFiles/mfem.dir/fem/tmop/tmop_pa_h2s.cpp.o
[ 84%] Building CXX object CMakeFiles/mfem.dir/fem/tmop/tmop_pa_h2s_c0.cpp.o
[ 84%] Building CXX object CMakeFiles/mfem.dir/fem/tmop/tmop_pa_h3d.cpp.o
[ 88%] Building CXX object CMakeFiles/mfem.dir/fem/tmop/tmop_pa_h3d_c0.cpp.o
[ 88%] Building CXX object CMakeFiles/mfem.dir/fem/tmop/tmop_pa_h3m.cpp.o
[ 88%] Building CXX object CMakeFiles/mfem.dir/fem/tmop/tmop_pa_h3m_c0.cpp.o
[ 88%] Building CXX object CMakeFiles/mfem.dir/fem/tmop/tmop_pa_h3s.cpp.o
[ 88%] Building CXX object CMakeFiles/mfem.dir/fem/tmop/tmop_pa_h3s_c0.cpp.o
[ 88%] Building CXX object CMakeFiles/mfem.dir/fem/tmop/tmop_pa_jp2.cpp.o
[ 88%] Building CXX object CMakeFiles/mfem.dir/fem/tmop/tmop_pa_jp3.cpp.o
[ 88%] Building CXX object CMakeFiles/mfem.dir/fem/tmop/tmop_pa_p2.cpp.o
[ 92%] Building CXX object CMakeFiles/mfem.dir/fem/tmop/tmop_pa_p2_c0.cpp.o
[ 92%] Building CXX object CMakeFiles/mfem.dir/fem/tmop/tmop_pa_p3.cpp.o
[ 92%] Building CXX object CMakeFiles/mfem.dir/fem/tmop/tmop_pa_p3_c0.cpp.o
[ 92%] Building CXX object CMakeFiles/mfem.dir/fem/tmop/tmop_pa_tc2.cpp.o
[ 92%] Building CXX object CMakeFiles/mfem.dir/fem/tmop/tmop_pa_tc3.cpp.o
[ 92%] Building CXX object CMakeFiles/mfem.dir/fem/tmop/tmop_pa_w2.cpp.o
[ 92%] Building CXX object CMakeFiles/mfem.dir/fem/tmop/tmop_pa_w2_c0.cpp.o
[ 92%] Building CXX object CMakeFiles/mfem.dir/fem/tmop/tmop_pa_w3.cpp.o
[ 92%] Building CXX object CMakeFiles/mfem.dir/fem/tmop/tmop_pa_w3_c0.cpp.o
[ 96%] Building CXX object CMakeFiles/mfem.dir/fem/tmop_tools.cpp.o
[ 96%] Building CXX object CMakeFiles/mfem.dir/fem/tmop_amr.cpp.o
[ 96%] Building CXX object CMakeFiles/mfem.dir/fem/gslib.cpp.o
[ 96%] Building CXX object CMakeFiles/mfem.dir/fem/transfer.cpp.o
[ 96%] Building CXX object CMakeFiles/mfem.dir/fem/pbilinearform.cpp.o
[ 96%] Building CXX object CMakeFiles/mfem.dir/fem/pfespace.cpp.o
[ 96%] Building CXX object CMakeFiles/mfem.dir/fem/pgridfunc.cpp.o
[ 96%] Building CXX object CMakeFiles/mfem.dir/fem/plinearform.cpp.o
[100%] Building CXX object CMakeFiles/mfem.dir/fem/pnonlinearform.cpp.o
[100%] Building CXX object CMakeFiles/mfem.dir/fem/prestriction.cpp.o
[100%] Linking CXX shared library libmfem.so
/usr/src/debug/mfem/mfem-4.6/linalg/ode.cpp: In member function ‘__ct_base ’:
/usr/src/debug/mfem/mfem-4.6/linalg/ode.cpp:145:20: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
/usr/include/c++/13.2.1/new:128:26: note: in a call to allocation function ‘operator new []’ declared here
  128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^
/usr/src/debug/mfem/mfem-4.6/fem/bilininteg.cpp: In member function ‘ComputeFluxEnergy’:
/usr/src/debug/mfem/mfem-4.6/fem/bilininteg.cpp:2178:43: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
/usr/include/c++/13.2.1/new:128:26: note: in a call to allocation function ‘operator new []’ declared here
  128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^
/usr/src/debug/mfem/mfem-4.6/linalg/blockvector.cpp: In member function ‘__ct_base ’:
/usr/src/debug/mfem/mfem-4.6/linalg/blockvector.cpp:42:33: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
/usr/include/c++/13.2.1/new:128:26: note: in a call to allocation function ‘operator new []’ declared here
  128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^
/usr/src/debug/mfem/mfem-4.6/linalg/blockvector.cpp: In member function ‘__ct_base ’:
/usr/src/debug/mfem/mfem-4.6/linalg/blockvector.cpp:51:33: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
/usr/include/c++/13.2.1/new:128:26: note: in a call to allocation function ‘operator new []’ declared here
  128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^
/usr/src/debug/mfem/mfem-4.6/linalg/blockvector.cpp: In member function ‘__ct_base ’:
/usr/src/debug/mfem/mfem-4.6/linalg/blockvector.cpp:71:33: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
/usr/include/c++/13.2.1/new:128:26: note: in a call to allocation function ‘operator new []’ declared here
  128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^
/usr/src/debug/mfem/mfem-4.6/linalg/blockvector.cpp: In member function ‘Update’:
/usr/src/debug/mfem/mfem-4.6/linalg/blockvector.cpp:103:36: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
/usr/include/c++/13.2.1/new:128:26: note: in a call to allocation function ‘operator new []’ declared here
  128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^
/usr/src/debug/mfem/mfem-4.6/linalg/blockvector.cpp: In member function ‘Update’:
/usr/src/debug/mfem/mfem-4.6/linalg/blockvector.cpp:160:36: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
/usr/include/c++/13.2.1/new:128:26: note: in a call to allocation function ‘operator new []’ declared here
  128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^
/usr/src/debug/mfem/mfem-4.6/linalg/blockvector.cpp: In member function ‘__ct_base ’:
/usr/src/debug/mfem/mfem-4.6/linalg/blockvector.cpp:81:33: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
/usr/include/c++/13.2.1/new:128:26: note: in a call to allocation function ‘operator new []’ declared here
  128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^
/usr/src/debug/mfem/mfem-4.6/linalg/blockvector.cpp: In member function ‘__ct_base ’:
/usr/src/debug/mfem/mfem-4.6/linalg/blockvector.cpp:91:33: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
/usr/include/c++/13.2.1/new:128:26: note: in a call to allocation function ‘operator new []’ declared here
  128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^
/usr/src/debug/mfem/mfem-4.6/linalg/blockvector.cpp: In member function ‘Update’:
/usr/src/debug/mfem/mfem-4.6/linalg/blockvector.cpp:115:36: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
/usr/include/c++/13.2.1/new:128:26: note: in a call to allocation function ‘operator new []’ declared here
  128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^
/usr/src/debug/mfem/mfem-4.6/linalg/solvers.cpp: In member function ‘__ct_base ’:
/usr/src/debug/mfem/mfem-4.6/linalg/solvers.cpp:3360:62: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
/usr/include/c++/13.2.1/new:128:26: note: in a call to allocation function ‘operator new []’ declared here
  128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^
/usr/src/debug/mfem/mfem-4.6/linalg/blockvector.cpp: In member function ‘__ct_base ’:
/usr/src/debug/mfem/mfem-4.6/linalg/blockvector.cpp:61:33: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
/usr/include/c++/13.2.1/new:128:26: note: in a call to allocation function ‘operator new []’ declared here
  128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^
/usr/src/debug/mfem/mfem-4.6/mesh/pmesh.cpp: In member function ‘LocalRefinement’:
/usr/src/debug/mfem/mfem-4.6/mesh/pmesh.cpp:3493:76: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
/usr/include/c++/13.2.1/new:128:26: note: in a call to allocation function ‘operator new []’ declared here
  128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^
[100%] Built target mfem

Last edited by loqs (2024-02-11 13:25:54)

Offline

#6 2024-02-12 13:40:22

japs
Member
Registered: 2016-02-09
Posts: 3
Website

Re: PKGBUILD review: GLVis

loqs wrote:

I could not produce an issue with mfem and openmpi 5.0.1-2 from extra or 5.0.2-2 from extra-tetsing.
mfem-4.6-3-x86_64-build.log from building that package in a clean chroot against extra-testing with all AUR dependencies having been built the same way:

Hi, thanks again for your feedback. I had indeed a stale mfem linked against the old openmpi 4 which was triggering the error. By (learning and) building in a chroot as detailed in [1] I see that I need to add glm and libxi as you suggested in the first reply.

Lone_Wolf wrote:
  local N_CORES=$(grep "core id" /proc/cpuinfo | uniq | wc -l)
  cmake --build build --parallel $N_CORES

Setting such options in PKGBUILD is usually frowned upon as you are forcing something on a user system that you know almost nothing about.
Claiming all cores can cause the user system to crash or become unresponsive.

The preferred method is to direct users to configure MAKEFLAGS in /etc/makepkg.conf .

Got it, will remove. Thanks

[1] https://wiki.archlinux.org/title/Develo … ean_chroot

Offline

#7 2024-02-12 19:22:21

loqs
Member
Registered: 2014-03-06
Posts: 17,908

Re: PKGBUILD review: GLVis

Diff of changes I made to your original PKGBUILD:

diff --git a/PKGBUILD b/PKGBUILD
index 9a998c4..bf0981a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,5 +1,4 @@
 # Maintainer: japs
-# Contributor: japs
 pkgname=mfem-glvis
 _pkgname=glvis
 pkgver=4.2
@@ -8,45 +7,32 @@ pkgdesc="A lightweight tool for accurate and flexible finite element visualizati
 arch=("x86_64")
 url="https://glvis.org"
 license=('BSD-3-Clause')
-groups=()
-depends=(libpng 'openmpi<5' freetype2 sdl2 mfem glew gcc-libs libglvnd fontconfig glibc)
-makedepends=(cmake patch tinyxxd)
-optdepends=()
-provides=()
-conflicts=()
-replaces=()
-backup=()
-options=()
-install=
-changelog=
-source=(${_pkgname}-${pkgver}.tar.gz::https://github.com/GLVis/$_pkgname/archive/refs/tags/v$pkgver.tar.gz)
-noextract=()
+depends=(libpng freetype2 sdl2 mfem glew gcc-libs libglvnd fontconfig glibc)
+makedepends=(cmake glm libxi ninja tinyxxd)
+source=(https://github.com/GLVis/$_pkgname/archive/v$pkgver/${_pkgname}-${pkgver}.tar.gz)
 md5sums=('a228c65c285e7a66e38b1ec2f2812842')
 
 prepare() {
-    # Backporting upstream commit 92bab4c 
     # "Fix installation with CMake on non-APPLE platforms"
-    cd $_pkgname-$pkgver
-    echo -e "318a319\n>   if (APPLE)\n339a341\n>   endif (APPLE)" | patch CMakeLists.txt
+    sed -i '/GLVIS_APP_ICON/,+20d' $_pkgname-$pkgver/CMakeLists.txt
 }
 
 build() {
   cmake \
     -S "$_pkgname-$pkgver" \
     -B build \
+    -G Ninja \
     -D CMAKE_BUILD_TYPE:STRING=Release \
     -D CMAKE_INSTALL_PREFIX:STRING=/usr \
     -D GLVIS_USE_LIBTIFF=OFF \
-    -D GLVIS_USE_LIBPNG=ON
+    -D GLVIS_USE_LIBPNG=ON \
+    -Wno-dev
 
-  local N_CORES=$(grep "core id" /proc/cpuinfo | uniq | wc -l)
-  cmake --build build --parallel $N_CORES
+  cmake --build build
 }
 
 package() {
-  ln -s build/glvis build/GLVis
-  ls build
-  DESTDIR="${pkgdir}" cmake --build build --target install -v
+  DESTDIR="${pkgdir}" cmake --install build -v
 
   install \
       -v \

Apart from already discussed changes I made the usage of cmake closer to CMake_package_guidelines#Template,  had github rename the archive and swapped the contextless patch to sed match and delete.

Offline

#8 2024-09-21 14:07:19

yvs
Member
Registered: 2024-06-30
Posts: 2

Re: PKGBUILD review: GLVis

build() {
  cmake \
...
    -D CMAKE_BUILD_TYPE:STRING=Release \

isn't it better to not force RELEASE build type for all possible builds? CMake package guidelines

Offline

Board footer

Powered by FluxBB