Package Details: openfoam-org 13.20250911+cde978a-1

Git Clone URL: https://aur.archlinux.org/openfoam.git (read-only, click to copy)
Package Base: openfoam
Description: The open source CFD toolbox (www.openfoam.org)
Upstream URL: http://www.openfoam.org
Licenses: GPL-3.0-or-later
Provides: openfoam
Submitter: None
Maintainer: None
Last Packager: envolution
Votes: 66
Popularity: 0.75
First Submitted: 2009-07-02 09:16 (UTC)
Last Updated: 2025-09-12 05:45 (UTC)

Latest Comments

1 2 3 4 5 6 .. 32 Next › Last »

gpettinello commented on 2026-08-02 16:29 (UTC) (edited on 2026-08-02 16:31 (UTC) by gpettinello)

Hi, I have updated the PKGBUILD to version 14. Below the code


# Maintainer: envolution
# Contributor: Gianluca Pettinello <g_pet@hotmail.com>
# Contributor: Jingbei Li <i@jingbei.li>
# Contributor: Xwang <xwaang1976@gmail.com>
# Contributor: George Eleftheriou <eleftg>
# Contributor: Andrew Fischer <andrew_at_apastron.co>
# shellcheck shell=bash disable=SC2034,SC2154

pkgbase=openfoam
pkgname=openfoam-org
pkgver=14.20260724+7b05503
_pkgver="${pkgver%%.*}"
_subver_and_commit="${pkgver#*.}"
_subver="${_subver_and_commit%+*}"
_commit="${pkgver#*+}"
pkgrel=1
pkgdesc="The open source CFD toolbox (www.openfoam.org)"
_distpkgbase=OpenFOAM
_gitname=$_distpkgbase-$_pkgver
options=(!strip)
arch=('x86_64')
url="http://www.openfoam.org"
license=("GPL-3.0-or-later")
depends=(
  glibc
  qt6-base
  gcc-libs
  metis
  vtk
  bzip2
  paraview
  parmetis
  scotch
  boost
  cgal
  zoltan
  openmpi
  gnuplot
  libxt
  libxml2
  freetype2
  double-conversion
  glew
  utf8cpp
  gl2ps
  python
  hdf5
  zlib
)
makedepends=(
  git
  cmake
  cli11 
  nlohmann-json 
  fast_float 
  flex
)
provides=(openfoam)
source=(
  "$_gitname-$_subver::git+https://github.com/OpenFOAM/OpenFOAM-${_pkgver}.git#commit=${_commit}"
  paraview.arch
  openfoam.install
)
install="${pkgbase}.install"
sha256sums=('SKIP'
            'bbec057b1153a616ea388dc80fdaeb6337edc6150e0601f140a1304f82a10ddb'
            'a94080d4e5bc4736868269d66f61f5430dec961c70bdcdaa1c9a402dba5203d2')

_cache_notify() {
  local yellow='\033[1;33m'
  local red='\033[1;31m'
  local nc='\033[0m'
  echo -e "${yellow}==> Using build cache:${nc}"
  echo "    ${srcdir}/${_distpkgbase}-${_pkgver}"
  echo
  echo -e "${yellow}==> To build from scratch, run:${nc}"
  echo -e "    ${red}rm -rf ${srcdir}/${_distpkgbase}-${_pkgver}${nc}"
}

prepare() {
  _cachefile=${_distpkgbase}-${_pkgver}/.arch_cache
  if [[ -f "$_cachefile" ]] && grep -q "$pkgver" "$_cachefile"; then
    _cache_notify
  else
    rm -rf $_distpkgbase-$_pkgver
    mv $_gitname-$_subver $_distpkgbase-$_pkgver

    _bashrc=${_distpkgbase}-${_pkgver}/etc/bashrc
    sed -i "s|^export WM_PROJECT_VERSION=.*|export WM_PROJECT_VERSION=${_pkgver}|" "$_bashrc"
    cp ${_bashrc} ${_bashrc}.prepared

    # we'll be using $bashrc while building, and replace it with $bashrc.prepared
    # (below) during install - so we have to modify the FOAM_INST_DIR for post-install use
    sed -i 's|^# export FOAM_INST_DIR=.*|export FOAM_INST_DIR=/opt/\$WM_PROJECT|' \
      ${_bashrc}.prepared

    # Add system library settings to prefs.sh
    cat <<EOF >"${_distpkgbase}-${_pkgver}/etc/prefs.sh"
# System-wide settings for Arch Linux
export SCOTCH_TYPE=system
export METIS_TYPE=system
export PARMETIS_TYPE=system
export ZOLTAN_TYPE=system
EOF

    echo $pkgver >$_cachefile
  fi

  # Drop in Arch paraview environment script
  cd ${_distpkgbase}-${_pkgver}
  cp ${srcdir}/paraview.arch etc/config.sh/paraview
}

build() {
  cd ${_distpkgbase}-${_pkgver}
  # export FOAM_VERBOSE=1
  # export PS1='~' # required for verbosity checks
  # Setup the build environment
  source etc/bashrc || true

  # see if we have extra threads available in /etc/makepkg.conf MAKEFLAGS
  [[ $MAKEFLAGS =~ -j[[:space:]]*([0-9]+) ]] &&
    _jval="${BASH_REMATCH[1]}" || _jval=1

  export PATH="$PWD/wmake:$PATH" 
  wmakeLnIncludeAll
  ./Allwmake -s -q -j ${_jval:=1}
}

package() {
  # Create destination directories
  install -d "${pkgdir}/opt/${_distpkgbase}" "${pkgdir}/etc/profile.d"

  # Copy package to pkgdir
  cp -r "${_distpkgbase}-${_pkgver}" "${pkgdir}/opt/${_distpkgbase}"

  # Clean up build files
  # https://openfoamwiki.net/index.php/Installation/Delete_intermediate_files#OpenFOAM_v1706_and_newer
  _baseclean="${pkgdir}/opt/${_distpkgbase}/${_distpkgbase}-${_pkgver}"
  rm -rf ${_baseclean}/platforms/*/applications ${_baseclean}/platforms/*/src

  # Add bash profile
  _bash_profile=${pkgdir}/etc/profile.d/openfoam-${_pkgver}.sh
  echo "export FOAM_INST_DIR=/opt/${_distpkgbase}" >$_bash_profile
  echo "alias ofoam=\"source \${FOAM_INST_DIR}/${_distpkgbase}-${_pkgver}/etc/bashrc\"" \
    >>$_bash_profile
  echo "alias ofoam${_pkgver}=\"source \${FOAM_INST_DIR}/${_distpkgbase}-${_pkgver}/etc/bashrc\"" \
    >>$_bash_profile
  chmod 755 $_bash_profile

  # Add stub thirdparty directory to keep openfoam happy
  install -d "${pkgdir}/opt/${_distpkgbase}/ThirdParty-${_pkgver}"

  install -Dm755 "${_distpkgbase}-${_pkgver}/etc/bashrc.prepared" \
    "${pkgdir}/opt/${_distpkgbase}/${_distpkgbase}-${_pkgver}/etc/bashrc"
  install -Dm644 ${_distpkgbase}-${_pkgver}/COPYING -t $pkgdir/usr/share/licenses/$pkgname
}

# vim:set ts=2 sw=2 et:

I kindly ask the maintainer to check the code and update if he thinks it is ok. I compiled in my system and it worked

pspssp commented on 2026-03-11 20:03 (UTC) (edited on 2026-03-11 20:07 (UTC) by pspssp)

Hi @carlosal1015 , opening like the wiki suggests (with 'paraFoam -builtin') works but paraView doesn't load a lagrangian mesh (for example, like the one needed for the cyclone tutorial for incompressibleDenseParticleFluid). Not sure it's a problem with the install though, just checked an Ubuntu machine with OF13 (same as here) but paraview 5 and everything works. Thanks for the reply :)

edit: tried foamToVTK and it also doesn't work

carlosal1015 commented on 2026-03-11 16:37 (UTC)

Hi @pspssp, which paraview plugin is missing? Did you tried https://wiki.archlinux.org/title/OpenFOAM#Paraview_not_installed

pspssp commented on 2026-03-11 15:59 (UTC) (edited on 2026-03-11 16:01 (UTC) by pspssp)

Hi there, I'm getting a paraview error when trying to run paraFoam. The error is:

FATAL ERROR: The reader module for OpenFOAM data was not found on your system. This means that OpenFOAM was not built with ParaView support, or that ParaView is not installed, or that OpenFOAM has been configured to use a different installation of ParaView from that which is installed.

I noticed the discussion below and tried reinstalling vtk but that didn't work.

If I run "paraview -builtin" it works but I don't get some of the paraFoam functionalities that I need.

Shinmen commented on 2025-08-15 11:51 (UTC)

Already have vtk on system, but reinstall fix the problem somehow

envolution commented on 2025-08-15 02:14 (UTC) (edited on 2025-08-15 02:16 (UTC) by envolution)

@Shinmen thanks for the report - that library issue seems related to vtk

$ pacman -Q vtk
vtk 9.5.0-6

$ pacman -Ql vtk | grep libvtkFiltersReduction.so.1
vtk /usr/lib/libvtkFiltersReduction.so.1

paraview is expecting to find symbols in your system installed vtk that is not being provided. This is typically a problem of upstream paraview being compiled with a newer version of vtk than your system provides

Shinmen commented on 2025-08-15 01:49 (UTC)

Getting the following output. The pvserver it's not correctly, I will try to uninstall and reinstall paraview to see if fix

==> Starting build()...
pvserver: symbol lookup error: /usr/lib/libvtkFiltersReduction.so.1: undefined symbol: _ZN3vtk6detail3smp24vtkSMPToolsImplForOpenMPExxxPFvPvxxxES2_b
Using paraview
    ParaView_DIR          : /opt/paraview
    ParaView_LIB_DIR      : /opt/paraview/lib
    ParaView_INCLUDE_DIR  : /opt/paraview/include/paraview
    PV_PLUGIN_PATH        : /home/Shinmen/openfoam/src/OpenFOAM-13/platforms/linux64GccDPInt32Opt/lib/paraview
wmakeLnIncludeAll: running wmakeLnInclude
[Shinmen@Saturn ~]$ which pvserver
/opt/paraview/bin/pvserver
[Shinmen@Saturn ~]$ pacman -Qo /usr/bin/pvserver
/usr/bin/pvserver is owned by paraview 6.0.0-2
[Shinmen@Saturn ~]$ pvserver --version
pvserver: symbol lookup error: /usr/lib/libvtkFiltersReduction.so.1: undefined symbol: _ZN3vtk6detail3smp24vtkSMPToolsImplForOpenMPExxxPFvPvxxxES2_b

envolution commented on 2025-08-14 21:05 (UTC)

@Shinmen

I think it's having trouble identifying your paraview installation, or the process in paraview.arch is not properly reproducable. Could I as you to please try run the following? This does not need to be done on a clean build - please open a fresh terminal (without running the ofoam alias, and without sourcing the openfoam-13.sh profile)

$ FOAM_VERBOSE=1 PS1='~' makepkg

The first few lines of output are what I'm interested in - it should look like:

Using paraview
    ParaView_DIR          : /opt/paraview
    ParaView_LIB_DIR      : /opt/paraview/lib
    ParaView_INCLUDE_DIR  : /opt/paraview/include/paraview
    PV_PLUGIN_PATH        : /Downloads/20250813122524_openfoam/openfoam/src/OpenFOAM-13/platforms/linux64GccDPInt32Opt/lib/paraview

I'm also interested in the following:

$ which pvserver
/usr/bin/pvserver
$ pacman -Qo /usr/bin/pvserver
/usr/bin/pvserver is owned by paraview 6.0.0-2
$ pvserver --version
paraview version 6.0.0

If those all look okay, please run the full makepkg from this terminal. Just to note I'm still having connectivity issues to AUR - if it's all the same to you can we continue with an issue report on https://github.com/envolution/aur/issues at least until things settle down?

Shinmen commented on 2025-08-14 02:32 (UTC)

still get the missing freetype error even in 13.20250706+65eda17-2 (rel /2/)

envolution commented on 2025-08-13 19:28 (UTC)

@Shinmen can you confirm you're trying to build 13.20250706+65eda17-2 (rel /2/) ? It seems the current aur situation caused some files not to be updated in rel 1 - specifically the paraview.arch file which would result in that exact issue. Sorry for the inconvenience