View Issue Details

IDProjectCategoryView StatusLast Update
0003086OpenFOAMBugpublic2018-10-14 12:48
Reporterkryptomatrix Assigned Towyldckat  
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionno change required 
PlatformUnixOSLinux UbuntuOS Version18.10
Summary0003086: Unable to build OpenFOAM
DescriptionI read this https://openfoam.org/download/source/ explanation on how to compile OpenFoam from source. I tried running this script:

    #!/bin/bash
    apt-get install build-essential flex bison git-core cmake zlib1g-dev libboost-system-dev libboost-thread-dev libopenmpi-dev openmpi-bin gnuplot libreadline-dev libncurses-dev libxt-dev
    apt-get install qt4-dev-tools libqt4-dev libqt4-opengl-dev freeglut3-dev libqtwebkit-dev curl
    
    rm -r OpenFOAM-6
    rm -r ThirdParty-6
    rm -r /opt/OpenFOAM-6
    rm -r /opt/ThirdParty-6
    git clone git://github.com/OpenFOAM/OpenFOAM-6.git
    git clone git://github.com/OpenFOAM/ThirdParty-6.git
    cp -r OpenFOAM-6 /opt/
    cp -r ThirdParty-6 /opt/
    source /opt/OpenFOAM-6/etc/bashrc
    export WM_COMPILE_OPTION=Debug
    /opt/ThirdParty-6/Allwmake -j
    /opt/ThirdParty-6/makeParaView
    wmRefresh
    /opt/OpenFOAM-6/src/Allwmake -j
But this script failed with the following output:

    ... a lot of output without erros ...
    -- Installing: /opt/ThirdParty-6/platforms/linux64Gcc/ParaView-5.4.0/share/doc/paraview-5.4/paraview.qch
        ---
        Installation complete for paraview-5.4.0
        Now update the environment by running:
            wmRefresh
        ---
    
    Done
    /opt/OpenFOAM-6/etc/config.sh/aliases: line 85: wmUnset: command not found
    Compiling enabled on 4 cores
    Allwmake src
    version changed from previous build
    removing .o files corresponding to OpenFOAM/global/global.o ...
    Allwmake src/Pstream
    wmake dummy
    wmakeLnIncludeAll: running wmakeLnInclude on dependent libraries:
        wmakeLnInclude: linking include files to /opt/OpenFOAM-6/src/OpenFOAM/lnInclude
        wmakeLnInclude: linking include files to /opt/OpenFOAM-6/src/OSspecific/POSIX/lnInclude
    wmakeLnInclude: linking include files to ./lnInclude
    Making dependency list for source file UOPwrite.C
    Making dependency list for source file UIPread.C
    Making dependency list for source file UPstream.C
    make: /opt/OpenFOAM-6/wmake/platforms/linux64Gcc/wmkdep: Command not found
    make: /opt/OpenFOAM-6/wmake/platforms/linux64Gcc/wmkdep: Command not found
    make: /opt/OpenFOAM-6/wmake/platforms/linux64Gcc/wmkdep: Command not found
    make: *** No rule to make target '/opt/OpenFOAM-6/platforms/linux64GccDPInt32Opt/src/Pstream/dummy/UPstream.C.dep', needed by '/opt/OpenFOAM-6/platforms/linux64GccDPInt32Opt/src/Pstream/dummy/UPstream.o'. Stop.
I would be thankful if anyone could explain to me why the compilation failes and how to fix it.

I attached the file "out.txt" that contains the total output of the script.
Steps To ReproduceRun this script:
    #!/bin/bash
    apt-get install build-essential flex bison git-core cmake zlib1g-dev libboost-system-dev libboost-thread-dev libopenmpi-dev openmpi-bin gnuplot libreadline-dev libncurses-dev libxt-dev
    apt-get install qt4-dev-tools libqt4-dev libqt4-opengl-dev freeglut3-dev libqtwebkit-dev curl
    
    rm -r OpenFOAM-6
    rm -r ThirdParty-6
    rm -r /opt/OpenFOAM-6
    rm -r /opt/ThirdParty-6
    git clone git://github.com/OpenFOAM/OpenFOAM-6.git
    git clone git://github.com/OpenFOAM/ThirdParty-6.git
    cp -r OpenFOAM-6 /opt/
    cp -r ThirdParty-6 /opt/
    source /opt/OpenFOAM-6/etc/bashrc
    export WM_COMPILE_OPTION=Debug
    /opt/ThirdParty-6/Allwmake -j
    /opt/ThirdParty-6/makeParaView
    wmRefresh
    /opt/OpenFOAM-6/src/Allwmake -j
TagsNo tags attached.

Relationships

related to 0003088 resolvedhenry Proposition for wmRefresh with Bash to not use aliases 

Activities

kryptomatrix

2018-10-12 17:30

reporter  

out.txt (1,876,605 bytes)

wyldckat

2018-10-13 12:25

updater   ~0010099

So the first issue here is that this is mostly reported as a user support request, rather than a bug report, which is against the current guide lines: https://bugs.openfoam.org/rules.php - and I quote:

     Reports that indicate a significant possibility of user error will be closed or deleted.

The second issue is that you've somehow called the last "Allwmake" script from the wrong folder, because this page: https://openfoam.org/download/source/compiling-openfoam/ - specifically states that the script "Allwmake" should be called from within the example folder "OpenFOAM-dev"... which in your case, if should be "/opt/OpenFOAM-6/Allwmake -j", not "/opt/OpenFOAM-6/src/Allwmake -j".


However, I wasn't expecting the following limitation within this, namely when "wmRefresh" is called from within a script... which works for the most part since it's a shell function, but it then namely it gives this error message:

    /opt/OpenFOAM-6/etc/config.sh/aliases: line 85: wmUnset: command not found

This is because the alias name "wmUnset" is used instead of making a strict call to the unset script...

I'm closing this current report as somewhat of a user support request. Then I'll open a patch report regarding this limitation, as soon as possible, given that it's useful to have wmRefresh work from within scripts.

Issue History

Date Modified Username Field Change
2018-10-12 17:30 kryptomatrix New Issue
2018-10-12 17:30 kryptomatrix File Added: out.txt
2018-10-13 12:25 wyldckat Note Added: 0010099
2018-10-13 12:26 wyldckat Assigned To => wyldckat
2018-10-13 12:26 wyldckat Status new => closed
2018-10-13 12:26 wyldckat Resolution open => no change required
2018-10-14 12:48 wyldckat Relationship added related to 0003088