Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • openfoam openfoam
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 426
    • Issues 426
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 8
    • Merge requests 8
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • openfoamopenfoam
  • Issues
  • #1782
Closed
Open
Issue created Jul 22, 2020 by Shinji Nakagawa@snaka

Wrong installation dir of modules on Ubuntu

Summary

On Ubuntu 18.04 (and other version using dash), compilation of modules such as runTimePostProcessing finishes successfully. However, installation directory is wrong.

Expected dir: $WM_PROJECT_DIR/platforms/linux64GccDPInt32Opt/lib Installed dir: $WM_PROJECT_DIR/platforms/linux64GccDPInt32Opt/lib/lib

Related issue:

ThirdParty-common#48 (closed)

ThirdParty-common@cd811d9b

Steps to reproduce

cd $WM_THIRD_PARTY_DIR
makeParaView
ln -s ParaView-v5.6.3/VTK/ VTK-8.2.0
makeVTK
wmRefresh
cd $WM_PROJECT_DIR
export ParaView_DIR=$WM_THIRD_PARTY_DIR/platforms/linux64Gcc/ParaView-5.6.3
export VTK_DIR=$WM_THIRD_PARTY_DIR/platforms/linux64Gcc/VTK-8.2.0
foam
./Allwmake -j -s -l

You can check the functionality with tutorials/incompressible/simpleFoam/windAroundBuildings.

You will get the error message like this librunTimePostProcessing.so: cannot open shared object file: No such file or directory.

Example case

What is the current bug behaviour?

Library files like librunTimePostProcessing.so are stored in the directory $WM_PROJECT_DIR/platforms/linux64GccDPInt32Opt/lib/lib.

What is the expected correct behavior?

Library files like librunTimePostProcessing.so should be stored in the directory $WM_PROJECT_DIR/platforms/linux64GccDPInt32Opt/lib.

Relevant logs and/or images

Partially modified (to smear a user name) $WM_PROJECT_DIR/build/linux64GccDPInt32Opt/modules/visualization/src/runTimePostProcessing/cmake_install.cmake file

# Install script for directory: $WM_PROJECT_DIR/modules/visualization/src/runTimePostProcessing

# Set the install prefix
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
  set(CMAKE_INSTALL_PREFIX "$WM_PROJECT_DIR/platforms/linux64GccDPInt32Opt/lib")
endif()
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")

CMAKE_INSTALL_PREFIX does not need the last “lib”.

Environment information

  • OpenFOAM version : OpenFOAM v2006
  • Operating system : Ubuntu 18.04.4
  • Hardware info :
  • Compiler : gcc 7.5.0

Possible fixes

This will be related to dash (not bash) used in Ubuntu.

The test script is created using line 17 of `$WM_PROJECT_DIR/modules/visualization/src/runTimePostProcessing/Allwmake. The above modification rips “lib” off from $FOAM_LIBBIN with dash or bash.

Original:

: "${CMAKE_INSTALL_PREFIX:=${FOAM_LIBBIN%/*}}"

Modification:

: "${CMAKE_INSTALL_PREFIX:="${FOAM_LIBBIN%/*}"}"

test01.sh <- not modified with sh

test01bash.sh <- not modified with bash

test02.sh <- modified with sh

test02bash.sh <- modified with bash

$ ./test01.sh 
#!/bin/sh
/home/user/OpenFOAM/OpenFOAM-v2006/platforms/linux64GccDPInt32Opt/lib
/home/user/OpenFOAM/OpenFOAM-v2006/platforms/linux64GccDPInt32Opt/lib

$ ./test01bash.sh 
#!/bin/bash
/home/user/OpenFOAM/OpenFOAM-v2006/platforms/linux64GccDPInt32Opt/lib
/home/user/OpenFOAM/OpenFOAM-v2006/platforms/linux64GccDPInt32Opt

$ ./test02.sh 
#!/bin/sh
/home/user/OpenFOAM/OpenFOAM-v2006/platforms/linux64GccDPInt32Opt/lib
/home/user/OpenFOAM/OpenFOAM-v2006/platforms/linux64GccDPInt32Opt

$ ./test02bash.sh 
#!/bin/bash
/home/user/OpenFOAM/OpenFOAM-v2006/platforms/linux64GccDPInt32Opt/lib
/home/user/OpenFOAM/OpenFOAM-v2006/platforms/linux64GccDPInt32Opt

/label bug

Edited Jul 22, 2020 by Shinji Nakagawa
Assignee
Assign to
Time tracking