Cfmesh-of install problems

I’m trying to install hisa and cfmesh-of on my machine in order to use the cfd-of workbench in FreeCAD as a frontend for OpenFOAM (org).
Allwmake script seems to run into problems building cfmesh-of from source.

My inxi -Fazy output
```

System:
Kernel: 5.11.19-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.0
parameters: BOOT_IMAGE=/boot/vmlinuz-5.11-x86_64
root=UUID=cbeb8c53-a621-42ac-a96b-0b748f010d08 ro i915.modeset=1
init=/usr/bin/e4rat-lite-preload intel_pstate=enable quiet apparmor=1
security=apparmor resume=UUID=6315efe9-3ada-4d9e-973b-87e77635e076
udev.log_priority=3
Desktop: KDE Plasma 5.21.5 tk: Qt 5.15.2 wm: kwin_x11 vt: 1 dm: SDDM
Distro: Manjaro Linux base: Arch Linux
Machine:
Type: Laptop System: TOSHIBA product: SATELLITE L855 v: PSKA8E-006008N5
serial:
Mobo: TOSHIBA model: Portable PC v: MP serial:
UEFI-[Legacy]: Insyde v: 1.60 date: 04/20/2012
Battery:
ID-1: BAT0 charge: 39.8 Wh (100.0%) condition: 39.8/48.6 Wh (81.9%)
volts: 10.8 min: 10.8 model: PA5024U-1BRS type: Li-ion serial:
status: Full
CPU:
Info: Quad Core model: Intel Core i7-3610QM bits: 64 type: MT MCP
arch: Ivy Bridge family: 6 model-id: 3A (58) stepping: 9 microcode: 21
cache: L2: 6 MiB
flags: avx lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 36732
Speed: 2062 MHz min/max: 1200/2300 MHz Core speeds (MHz): 1: 2062 2: 2181
3: 2203 4: 2255 5: 2028 6: 2295 7: 2295 8: 2136
Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled
Type: l1tf
mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
Type: mds mitigation: Clear CPU buffers; SMT vulnerable
Type: meltdown mitigation: PTI
Type: spec_store_bypass
mitigation: Speculative Store Bypass disabled via prctl and seccomp
Type: spectre_v1
mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional,
IBRS_FW, STIBP: conditional, RSB filling
Type: srbds status: Vulnerable: No microcode
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: Intel 3rd Gen Core processor Graphics vendor: Toshiba driver: i915
v: kernel bus-ID: 00:02.0 chip-ID: 8086:0166 class-ID: 0300
Device-2: Importek TOSHIBA Web Camera - HD type: USB driver: uvcvideo
bus-ID: 1-1.3:5 chip-ID: 10f1:1a43 class-ID: 0e02
Display: x11 server: X.Org 1.20.11 compositor: kwin_x11 driver:
loaded: intel display-ID: :0 screens: 1
Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 361x203mm (14.2x8.0")
s-diag: 414mm (16.3")
Monitor-1: LVDS1 res: 1366x768 hz: 60 dpi: 99 size: 350x190mm (13.8x7.5")
diag: 398mm (15.7")
OpenGL: renderer: Mesa DRI Intel HD Graphics 4000 (IVB GT2)
v: 4.2 Mesa 21.0.3 compat-v: 3.0 direct render: Yes
Audio:
Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: Toshiba
driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:1e20
class-ID: 0403
Sound Server-1: ALSA v: k5.11.19-1-MANJARO running: yes
Sound Server-2: JACK v: 0.125.0 running: no
Sound Server-3: PulseAudio v: 14.2 running: yes
Sound Server-4: PipeWire v: 0.3.27 running: yes
Network:
Device-1: Qualcomm Atheros AR8161 Gigabit Ethernet vendor: Toshiba
driver: alx v: kernel port: 2000 bus-ID: 01:00.0 chip-ID: 1969:1091
class-ID: 0200
IF: enp1s0 state: down mac:
Device-2: Qualcomm Atheros AR9485 Wireless Network Adapter vendor: Askey
driver: ath9k v: kernel port: 2000 bus-ID: 02:00.0 chip-ID: 168c:0032
class-ID: 0280
IF: wlp2s0 state: up mac:
IF-ID-1: virbr0 state: down mac:
Bluetooth:
Device-1: Toshiba Bluetooth USB Host Controller type: USB driver: btusb
v: 0.8 bus-ID: 1-1.2:13 chip-ID: 0930:0219 class-ID: e001 serial:
Report: rfkill ID: hci0 rfk-id: 5 state: up address: see --recommends
Drives:
Local Storage: total: 465.76 GiB used: 129.12 GiB (27.7%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/sda maj-min: 8:0 vendor: Toshiba model: MK5075GSX
size: 465.76 GiB block-size: physical: 512 B logical: 512 B speed: 3.0 Gb/s
rotation: 5400 rpm serial: rev: 1M scheme: MBR
Partition:
ID-1: / raw-size: 448.64 GiB size: 440.59 GiB (98.21%)
used: 129.12 GiB (29.3%) fs: ext4 dev: /dev/sda1 maj-min: 8:1
Swap:
Kernel: swappiness: 200 (default 60) cache-pressure: 10 (default 100)
ID-1: swap-1 type: zram size: 6 GiB used: 1.01 GiB (16.9%) priority: -2
dev: /dev/zram0
Sensors:
System Temperatures: cpu: 53.0 C mobo: N/A
Fan Speeds (RPM): N/A
Info:
Processes: 272 Uptime: 1d 3h 05m wakeups: 27 Memory: 15.56 GiB
used: 2.79 GiB (17.9%) Init: systemd v: 247 tool: systemctl Compilers:
gcc: 10.2.0 clang: 11.1.0 Packages: 1767 pacman: 1752 lib: 456 flatpak: 15
Shell: Bash v: 5.1.8 running-in: yakuake inxi: 3.3.04 ```

terminal output of ./Allwmake executed from /opt/OpenFOAM/ThirdParty-8 (containing only files from cfmesh-of)
wmake error: could not change to directory 'meshLibrary'
wmake executables
wmake cartesian2DMesh
make[1]: Entering directory '/opt/OpenFOAM/ThirdParty-8/executables/cartesian2DMesh'
Making dependency list for source file cartesian2DMesh.C
could not open file cartesian2DMeshGenerator.H for source file cartesian2DMesh.C due to No such file or directory
could not open dependencies file Make/linux64GccDPInt32Opt/cartesian2DMesh.C.dep for source file cartesian2DMesh.C due to Permission denied
make[1]: *** No rule to make target 'Make/linux64GccDPInt32Opt/cartesian2DMesh.C.dep', needed by 'Make/linux64GccDPInt32Opt/cartesian2DMesh.o'.  Stop.
make[1]: Leaving directory '/opt/OpenFOAM/ThirdParty-8/executables/cartesian2DMesh'
make: *** [/opt/OpenFOAM/OpenFOAM-8/wmake/makefiles/apps:39: cartesian2DMesh] Error 2
wmake utilities .
wmake error: could not change to directory 'meshLibrary'
wmake executables
wmake cartesian2DMesh
make[1]: Entering directory '/opt/OpenFOAM/ThirdParty-8/executables/cartesian2DMesh'
Making dependency list for source file cartesian2DMesh.C
could not open file cartesian2DMeshGenerator.H for source file cartesian2DMesh.C due to No such file or directory
could not open dependencies file Make/linux64GccDPInt32Opt/cartesian2DMesh.C.dep for source file cartesian2DMesh.C due to Permission denied
make[1]: *** No rule to make target 'Make/linux64GccDPInt32Opt/cartesian2DMesh.C.dep', needed by 'Make/linux64GccDPInt32Opt/cartesian2DMesh.o'.  Stop.
make[1]: Leaving directory '/opt/OpenFOAM/ThirdParty-8/executables/cartesian2DMesh'
make: *** [/opt/OpenFOAM/OpenFOAM-8/wmake/makefiles/apps:39: cartesian2DMesh] Error 2
wmake utilities .
wmake error: could not change to directory 'meshLibrary'
wmake executables
wmake cartesian2DMesh
make[1]: Entering directory '/opt/OpenFOAM/ThirdParty-8/executables/cartesian2DMesh'
Making dependency list for source file cartesian2DMesh.C
could not open file cartesian2DMeshGenerator.H for source file cartesian2DMesh.C due to No such file or directory
could not open dependencies file Make/linux64GccDPInt32Opt/cartesian2DMesh.C.dep for source file cartesian2DMesh.C due to Permission denied
make[1]: *** No rule to make target 'Make/linux64GccDPInt32Opt/cartesian2DMesh.C.dep', needed by 'Make/linux64GccDPInt32Opt/cartesian2DMesh.o'.  Stop.
make[1]: Leaving directory '/opt/OpenFOAM/ThirdParty-8/executables/cartesian2DMesh'
make: *** [/opt/OpenFOAM/OpenFOAM-8/wmake/makefiles/apps:39: cartesian2DMesh] Error 2
wmake utilities .
wmake error: could not change to directory 'meshLibrary'

./Allwmake executed as sudo, got this error:

    cd /opt/OpenFOAM/ThirdParty-8/ && sudo ./Allwmake
    wmake error: environment variable $WM_OPTIONS not set

so i checked /opt/OpenFOAM/OpenFOAM-8/etc/config.sh/settings and don’t understand if something is wrong:

settings
#----------------------------------*-sh-*--------------------------------------
# =========                 |
# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
#  \\    /   O peration     | Website:  https://openfoam.org
#   \\  /    A nd           | Copyright (C) 2011-2020 OpenFOAM Foundation
#    \\/     M anipulation  |
#------------------------------------------------------------------------------
# License
#     This file is part of OpenFOAM.
#
#     OpenFOAM is free software: you can redistribute it and/or modify it
#     under the terms of the GNU General Public License as published by
#     the Free Software Foundation, either version 3 of the License, or
#     (at your option) any later version.
#
#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
#     for more details.
#
#     You should have received a copy of the GNU General Public License
#     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
#
# File
#     etc/config.sh/settings
#
# Description
#     Startup file for OpenFOAM
#     Sourced from OpenFOAM-<VERSION>/etc/bashrc
#
#------------------------------------------------------------------------------

# Set environment variables according to system type
export WM_ARCH=`uname -s`

case "$WM_ARCH" in
Linux)
    WM_ARCH=linux

    # Compiler specifics
    case `uname -m` in
        i686)
            export WM_ARCH_OPTION=32
            export WM_CC='gcc'
            export WM_CXX='g++'
            export WM_CFLAGS='-fPIC'
            export WM_CXXFLAGS='-fPIC -std=c++0x'
            export WM_LDFLAGS=
        ;;

    x86_64)
        case "$WM_ARCH_OPTION" in
        32)
            export WM_COMPILER_ARCH=64
            export WM_CC='gcc'
            export WM_CXX='g++'
            export WM_CFLAGS='-m32 -fPIC'
            export WM_CXXFLAGS='-m32 -fPIC -std=c++0x'
            export WM_LDFLAGS='-m32'
            ;;
        64)
            WM_ARCH=linux64
            export WM_COMPILER_LIB_ARCH=64
            export WM_CC='gcc'
            export WM_CXX='g++'
            export WM_CFLAGS='-m64 -fPIC'
            export WM_CXXFLAGS='-m64 -fPIC -std=c++0x'
            export WM_LDFLAGS='-m64'
            ;;
        *)
            echo "Unknown WM_ARCH_OPTION '$WM_ARCH_OPTION', should be 32 or 64"\
                 1>&2
            ;;
        esac
        ;;

    aarch64)
        WM_ARCH=linuxArm64
        export WM_COMPILER_LIB_ARCH=64
        export WM_CC='gcc'
        export WM_CXX='g++'
        export WM_CFLAGS='-fPIC'
        export WM_CXXFLAGS='-fPIC -std=c++0x'
        export WM_LDFLAGS=
        ;;

    armv7l)
        WM_ARCH=linuxARM7
        export WM_ARCH_OPTION=32
        export WM_COMPILER_LIB_ARCH=32
        export WM_CC='gcc'
        export WM_CXX='g++'
        export WM_CFLAGS='-fPIC'
        export WM_CXXFLAGS='-fPIC -std=c++0x'
        export WM_LDFLAGS=
        ;;

    ppc64)
        WM_ARCH=linuxPPC64
        export WM_COMPILER_LIB_ARCH=64
        export WM_CC='gcc'
        export WM_CXX='g++'
        export WM_CFLAGS='-m64 -fPIC'
        export WM_CXXFLAGS='-m64 -fPIC -std=c++0x'
        export WM_LDFLAGS='-m64'
        ;;

    ppc64le)
        WM_ARCH=linuxPPC64le
        export WM_COMPILER_LIB_ARCH=64
        export WM_CC='gcc'
        export WM_CXX='g++'
        export WM_CFLAGS='-m64 -fPIC'
        export WM_CXXFLAGS='-m64 -fPIC -std=c++0x'
        export WM_LDFLAGS='-m64'
        ;;

    *)
        echo Unknown processor type `uname -m` for Linux 1>&2
        ;;
    esac
    ;;

SunOS)
    WM_ARCH=SunOS64
    WM_MPLIB=FJMPI
    export WM_COMPILER_LIB_ARCH=64
    export WM_CC='gcc'
    export WM_CXX='g++'
    export WM_CFLAGS='-mabi=64 -fPIC'
    export WM_CXXFLAGS='-mabi=64 -fPIC -std=c++0x'
    export WM_LDFLAGS='-mabi=64 -G0'
    ;;

*)    # An unsupported operating system
    /bin/cat <<USAGE 1>&2

    Your "$WM_ARCH" operating system is not supported by this release
    of OpenFOAM. For further assistance, please contact https://openfoam.org

USAGE
    ;;
esac


#------------------------------------------------------------------------------

# Location of the jobControl directory
export FOAM_JOB_DIR=$WM_PROJECT_INST_DIR/jobControl

# wmake configuration
export WM_DIR=$WM_PROJECT_DIR/wmake
export WM_LINK_LANGUAGE=c++
export WM_LABEL_OPTION=Int$WM_LABEL_SIZE
export WM_OPTIONS=$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION$WM_COMPILE_OPTION

# Base executables/libraries
export FOAM_APPBIN=$WM_PROJECT_DIR/platforms/$WM_OPTIONS/bin
export FOAM_LIBBIN=$WM_PROJECT_DIR/platforms/$WM_OPTIONS/lib

# External (ThirdParty) libraries
export FOAM_EXT_LIBBIN=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/lib

# Site-specific directory
siteDir="${WM_PROJECT_SITE:-$WM_PROJECT_INST_DIR/site}"

# Shared site executables/libraries
# Similar naming convention as ~OpenFOAM expansion
export FOAM_SITE_APPBIN=$siteDir/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/bin
export FOAM_SITE_LIBBIN=$siteDir/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/lib

# User executables/libraries
export FOAM_USER_APPBIN=$WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/bin
export FOAM_USER_LIBBIN=$WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/lib

# DynamicCode templates
# - default location is the "~OpenFOAM/codeTemplates/dynamicCode" expansion
# export FOAM_CODE_TEMPLATES=$WM_PROJECT_DIR/etc/codeTemplates/dynamicCode

# Convenience
export FOAM_ETC=$WM_PROJECT_DIR/etc
export FOAM_APP=$WM_PROJECT_DIR/applications
export FOAM_SRC=$WM_PROJECT_DIR/src
export FOAM_TUTORIALS=$WM_PROJECT_DIR/tutorials
export FOAM_UTILITIES=$FOAM_APP/utilities
export FOAM_SOLVERS=$FOAM_APP/solvers
export FOAM_RUN=$WM_PROJECT_USER_DIR/run

# Add wmake to the path - not required for runtime-only environment
[ -d "$WM_DIR" ] && PATH=$WM_DIR:$PATH
# Add OpenFOAM scripts to the path
export PATH=$WM_PROJECT_DIR/bin:$PATH

# Add site-specific scripts to path - only if they exist
if [ -d "$siteDir/bin" ]                        # Generic
then
    _foamAddPath "$siteDir/bin"
fi
if [ -d "$siteDir/$WM_PROJECT_VERSION/bin" ]    # Version-specific
then
    _foamAddPath "$siteDir/$WM_PROJECT_VERSION/bin"
fi
unset siteDir

_foamAddPath $FOAM_USER_APPBIN:$FOAM_SITE_APPBIN:$FOAM_APPBIN
# Make sure to pick up dummy versions of external libraries last
_foamAddLib  $FOAM_USER_LIBBIN:$FOAM_SITE_LIBBIN:$FOAM_LIBBIN:$FOAM_EXT_LIBBIN:$FOAM_LIBBIN/dummy

# Compiler settings
# ~~~~~~~~~~~~~~~~~
unset gcc_version gmp_version mpfr_version mpc_version
unset MPFR_ARCH_PATH GMP_ARCH_PATH

# Location of compiler installation
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if [ -z "$WM_COMPILER_TYPE" ]
then
    WM_COMPILER_TYPE=system
    echo "Warning in $WM_PROJECT_DIR/etc/config.sh/settings:" 1>&2
    echo "    WM_COMPILER_TYPE not set, using '$WM_COMPILER_TYPE'" 1>&2
fi

# Load configured compiler versions, regardless of the compiler type
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/compiler`

case "$WM_COMPILER_TYPE" in
OpenFOAM | ThirdParty)

    if [ -n "$gcc_version" ]
    then
        gccDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gcc_version
        gmpDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gmp_version
        mpfrDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpfr_version
        mpcDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpc_version

        # Check that the compiler directory can be found
        [ -d "$gccDir" ] || {
            echo 1>&2
            echo "Warning in $WM_PROJECT_DIR/etc/config.sh/settings:" 1>&2
            echo "    Cannot find $gccDir installation." 1>&2
            echo "    Please install this compiler version or if you wish to" \
                 " use the system compiler," 1>&2
            echo "    change the 'WM_COMPILER_TYPE' setting to 'system'" 1>&2
            echo
        }

        _foamAddMan     $gccDir/man
        _foamAddPath    $gccDir/bin

        # Add compiler libraries to run-time environment
        _foamAddLib     $gccDir/lib$WM_COMPILER_LIB_ARCH

        # Add gmp/mpfr libraries to run-time environment
        _foamAddLib     $gmpDir/lib$WM_COMPILER_LIB_ARCH
        _foamAddLib     $mpfrDir/lib$WM_COMPILER_LIB_ARCH

        # Add mpc libraries (not need for older gcc) to run-time environment
        if [ -n "$mpc_version" ]
        then
            _foamAddLib     $mpcDir/lib$WM_COMPILER_LIB_ARCH
        fi

        # Used by boost/CGAL:
        export MPFR_ARCH_PATH=$mpfrDir
        export GMP_ARCH_PATH=$gmpDir
    fi
    unset gcc_version gccDir
    unset gmp_version gmpDir  mpfr_version mpfrDir  mpc_version mpcDir

    if [ -n "$clang_version" ]
    then
        clangDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$clang_version

        # Check that the compiler directory can be found
        [ -d "$clangDir" ] || {
            echo 1>&2
            echo "Warning in $WM_PROJECT_DIR/etc/config.sh/settings:" 1>&2
            echo "    Cannot find $clangDir installation." 1>&2
            echo "    Please install this compiler version or if you wish to" \
                 " use the system compiler," 1>&2
            echo "    change the 'WM_COMPILER_TYPE' setting to 'system'" 1>&2
            echo 1>&2
        }

        _foamAddMan     $clangDir/share/man
        _foamAddPath    $clangDir/bin
    fi
    unset clang_version clangDir
    ;;
system)
    # Use system compiler
    ;;
*)
    echo "Warn: WM_COMPILER_TYPE='$WM_COMPILER_TYPE' is unsupported" 1>&2
    echo "   treating as 'system' instead" 1>&2
    ;;
esac

#------------------------------------------------------------------------------

installed version of openfoam:

    pacman -Qs Openfoam
    local/openfoam 8-1

cfmesh-of downloaded from https://sourceforge .net/projects/cfmesh-cfdof/

Please let me know if I should provide more information.

I don’t know the cause, but installing cfmesh and HiSA through the cfd-of workbench in Freecad (latest appimage from github) results in errors and failed builds when the installed version of OpenFOAM is openfoam 8-1 from arch4edu repo.

I solved this by installing openfoam-v2012, also from arch4edu repo, and repeat installation of cfmesh and HiSA through the cfd-of workbench.

Now the dependency checker utility gives ‘no missing dependencies’ and I’ll probably be able to do some cfd simulation.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.