Difference between revisions of "Installation/swak4Foam/Understanding Error Messages"

From OpenFOAMWiki
(Known Issues: Added instructions about Bison)
m (make*.log -> log.make* - this makes it easier to tell apart from the script names)
 
(11 intermediate revisions by the same user not shown)
Line 25: Line 25:
  
 
The instructions given on the pages here at [[Installation/swak4Foam]], usually tell you run {{tt|Allwmake}} like this:
 
The instructions given on the pages here at [[Installation/swak4Foam]], usually tell you run {{tt|Allwmake}} like this:
<bash>./Allwmake > make.log 2>&1</bash>
+
<bash>./Allwmake > log.make 2>&1</bash>
  
This way you get all of the output (both normal and error messages) that the build process performs, all stored in the file "make.log". Therefore, you'll need to edit the file to check if there are any error messages, e.g. by running:
+
This way you get all of the output (both normal and error messages) that the build process performs, all stored in the file {{tt|log.make}}. Therefore, you'll need to edit the file to check if there are any error messages, e.g. by running:
<bash>gedit make.log</bash>
+
<bash>gedit log.make</bash>
 
The output can be a bit difficult to understand, but in swak4Foam's case, there are a few ways to figure out what went wrong, if anything at all:
 
The output can be a bit difficult to understand, but in swak4Foam's case, there are a few ways to figure out what went wrong, if anything at all:
 
<ol>
 
<ol>
Line 107: Line 107:
 
</li>
 
</li>
  
<li>If you're not able to understand the error stands for, then create a tarball of the log file:
+
<li>Nonetheless, do keep in mind that when it comes to compiling code that is somehow related to OpenFOAM, it's the very '''first error messages''' are actually the ones that tell us the ''whole story'' as to why the compilation procedure did not work as intended.
<bash>tar -czf make.log.tar.gz make.log</bash>
+
</li>
and attach the file "make.log.tar.gz" to a post in the designated thread at the forum [http://www.cfd-online.com/Forums/openfoam-installation/ OpenFOAM Installation].
+
 
 +
<li>If you're not able to understand the error stands for, then create a ''tarball'' of the log file, by running:
 +
<bash>tar -czf logs.tar.gz log.*</bash>
 +
and attach the file {{tt|logs.tar.g}} to a post in the designated thread at the forum [http://www.cfd-online.com/Forums/openfoam-installation/ OpenFOAM Installation].
 
</li>
 
</li>
  
Line 116: Line 119:
  
 
= Known Issues =
 
= Known Issues =
 +
 +
== Known compatibility issues between swak4Foam and certain versions of OpenFOAM ==
 +
;Symptoms: swak4Foam is not building with an older or newer version of OpenFOAM.
 +
 +
;Reason: API changes in OpenFOAM result in swak4Foam having compatibility problems.
 +
 +
;Solution: Compatibility issues between specific OpenFOAM versions and swak4Foam are listed in the introductory part of chapter [[Contrib/swak4Foam#Downloading|6. Downloading]] at [[Contrib/swak4Foam]].
 +
  
 
== {{tt|could no open file * for source file * due to No such file or directory}} ==
 
== {{tt|could no open file * for source file * due to No such file or directory}} ==
Line 135: Line 146:
 
;Reason: OpenFOAM is not properly installed. It's even possible that you have more than one version installed and there is a conflict in the environment variables that define the location of where OpenFOAM (or of any of its variants) is installed.
 
;Reason: OpenFOAM is not properly installed. It's even possible that you have more than one version installed and there is a conflict in the environment variables that define the location of where OpenFOAM (or of any of its variants) is installed.
  
;Solution: Read this page: [[Installation/Working with the Shell]]
+
;Solutions: There are a few known reasons this can happen:
 +
:# Make sure you've properly followed the installation instructions for the OpenFOAM version or variant you've installed.
 +
:#* If you've installed the [http://wikki.gridcore.se/foam-extend/download Deb package for FOAM-Extend 3.0], then follow the instructions given on this post: [http://www.cfd-online.com/Forums/openfoam-installation/132347-basic-error-when-installing-swak4foam-foam-extend-3-0-a.html#post482878 Basic Error when installing swak4foam with foam extend 3.0 - post #2]
 +
:# If you have more than one OpenFOAM version or variant installed, then read this page: [[Installation/Working with the Shell]]
  
  
Line 178: Line 192:
  
 
;Solution: Install Bison. Well, there is more than one way to install Bison, but usually the solution is to install in your system, either by following the instructions given at [[Installation/swak4Foam/Installing_On]], or from source code as explained at [[Installation/swak4Foam/Building dependencies#Bison]].
 
;Solution: Install Bison. Well, there is more than one way to install Bison, but usually the solution is to install in your system, either by following the instructions given at [[Installation/swak4Foam/Installing_On]], or from source code as explained at [[Installation/swak4Foam/Building dependencies#Bison]].
 +
 +
;Warning: Not to be confused with {{tt|Bison++}}, which is not the same thing as {{tt|Bison}}.
 +
 +
 +
== {{tt|Allwmake}} is stuck in the same place for over 5 minutes and says something about {{tt|SWAK_COMPILE_GRAMMAR_OPTION}} ==
 +
;Symptoms: Launched the {{tt|Allwmake}} script according to the instructions. But it's taking a long time to move beyond the message:
 +
<pre>If compilation of the grammers takes prohibitively long set SWAK_COMPILE_GRAMMAR_OPTION to something like -O1</pre>
 +
 +
;Reason: Probably it's as the message says and the build process is spending too much time trying to optimize something that isn't worth optimizing.
 +
 +
;Solution: Abort the build process, using the key combination {{tt|Ctrl+ C}} and run: <bash>export SWAK_COMPILE_GRAMMAR_OPTION=-O1</bash> Then run {{tt|Allwmake}} once again.
 +
 +
 +
 +
== Unable to use/build {{tt|swak4Foam}} in a cluster and/or when {{tt|module load}} is used ==
 +
;Symptoms: When testing {{tt|funkySetFields}} I get {{tt|command not found}}. Or when building I get this error message:
 +
<pre>No change to swak4FoamParsers/foamVersion4swak.H
 +
mkdir: `': No such file or directory
 +
make: *** [/libswak4FoamParsers.so] Error 1</pre>
 +
 +
;Reason: The administrators of clusters and shared workstations sometimes rely on a neat feature that exists for Linux: the {{tt|module load}}, which is a way to load specific environment variables for a particular module or program. Problem is that this usually requires the administrator to manually configure the file that is to be loaded by the {{tt|module}} command and not all system administrators are familiar with how many environment variables OpenFOAM has got and needs.
 +
 +
;Solution: The most likely solution to work is to follow these steps:
 +
<ol>
 +
<li>In the command line, run the {{tt|module load}} command that you've been instructed to use when you need a particular OpenFOAM version. For example:
 +
<bash>module load openfoam230</bash>
 +
</li>
 +
<li>Now run the following commands:
 +
<bash>mkdir $HOME/.OpenFOAM
 +
echo 'export WM_PROJECT_USER_DIR=$HOME/$WM_PROJECT/$USER-$WM_PROJECT_VERSION' > $HOME/.OpenFOAM/prefs.sh
 +
echo 'export FOAM_USER_APPBIN=$WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/bin' >> $HOME/.OpenFOAM/prefs.sh
 +
echo 'export FOAM_USER_LIBBIN=$WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/lib'  >> $HOME/.OpenFOAM/prefs.sh
 +
 +
echo 'export PATH=$PATH:$FOAM_USER_APPBIN'  >> $HOME/.OpenFOAM/prefs.sh
 +
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$FOAM_USER_LIBBIN'  >> $HOME/.OpenFOAM/prefs.sh
 +
 +
source $HOME/.OpenFOAM/prefs.sh</bash>
 +
</li>
 +
<li>Now, whenever you need to activate the OpenFOAM shell environment, you will need two command lines, not just one. For example:
 +
<bash>module load openfoam230
 +
source $HOME/.OpenFOAM/prefs.sh</bash>
 +
This way you load the system's default settings and add in the necessary shell environment variables for building and using {{tt|swak4Foam}}.
 +
</li>
 +
</ol>
 +
 +
 +
 +
== Having trouble building swak4Foam on Mac OS X ==
 +
The Macintosh Operating System X is known to be a bit of a pain to use when trying to compile OpenFOAM related software. The reason for this is because Mac OS X has its own implementations of applications that are slightly different from the ones available in Linux Distributions, namely the GNU core utilities. The usual suspects are as follows:
 +
* sed
 +
* grep
 +
* awk
 +
* flex
 +
 +
The versions implemented in Mac OS X of these applications are usually derived from the BSD implementations, which aren't fully compatible with the GNU ones. Therefore, it's advisable to install the versions available in the Macports repository. In addition, it's advisable that you at least have a look at the instructions available in the page [[Installation/Mac OS]], because those instructions usually give valuable hints on what should be installed and from where, in order to have a working development environment of OpenFOAM on Mac OS X.
 +
 +
 +
 +
== Bison is version 3.x / swak4Foam only confirmed to work with Bison 2.x ==
 +
;Symptoms: Ran the script {{tt|Allwmake}} or ran {{tt|wmake all}}, and got a message similar to this one:
 +
<pre>Swak version is 0.3.1
 +
Bison is version 3.0.2
 +
swak4Foam only confirmed to work with Bison 2.x
 +
Consider running ./maintainanceScripts/compileRequirements.sh for a local bison-installation
 +
Set the environment variable DEVELOP_FOR_NEW_BISON if you want to continue anyway.
 +
Requirements for library not satisified. I see no sense in going on
 +
Check README .... your problem occured to 5 other people before and has been solved on ..</pre>
 +
 +
;Reason: It might be a little hard to see it, but this line says it all:
 +
<pre>swak4Foam only confirmed to work with Bison 2.x</pre>
 +
 +
;Solution: Choose one of the following solutions:
 +
:* Install Bison 2.7 in your system globally, as explained here: [[Installation/swak4Foam/Installing_On]]
 +
:* Do a custom build, as explained here: [[Installation/swak4Foam/Building dependencies#Bison]]
 +
 +
;Warning: Not to be confused with {{tt|Bison++}}, which is not the same thing as {{tt|Bison}}.
 +
 +
 +
 +
== <tt>m4</tt> is not present, too old or buggy ==
 +
; Symptoms: Tried to build Bison (as [[Installation/swak4Foam/Building_dependencies#m4|explained here]]) and got a message similar to this one:
 +
<pre>checking for GNU M4 that supports accurate traces... configure: error: no acceptable m4 could be found in $PATH.
 +
GNU M4 1.4.6 or later is required; 1.4.16 or newer is recommended.
 +
GNU M4 1.4.15 uses a buggy replacement strstr on some systems.
 +
Glibc 2.9 - 2.12 and GNU M4 1.4.11 - 1.4.15 have another strstr bug.</pre>
 +
 +
;Reason: Incompatible m4 version or simply not installed.
 +
 +
;Solution: Do a custom build, as explained here: [[Installation/swak4Foam/Building dependencies#m4]]
  
  
 
[[Category:Installing swak4Foam]]
 
[[Category:Installing swak4Foam]]

Latest revision as of 17:00, 30 April 2016

1 Introduction

This page is dedicated to explaining how to understand the build error messages given during the build process of swak4Foam.

Note to those who are willing to help: Feel free to update and add to this page whenever you find a new error message.


2 How to check if it has installed with success

One simple way to check if the installation of swak4Foam went well, is to check the version by running:

funkySetFields

This ends with an error message, but below the usual OpenFOAM banner you will find the version of swak4Foam and the release date. If there is no swakVersion line, then the installation is older than 0.2.0 (the first version to have this banner). For example, look for banner similar to this one:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
swakVersion: 0.2.4 (Release date: 2013-05-24)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

On the other hand, if it shows a different version of swak4Foam from the one you're trying to build, or if it only shows a message stating:

funkySetFields: command not found

then that means that it did not build as intended. If this is the case, then continue reading this page.


3 The Basics: How to look for errors

The instructions given on the pages here at Installation/swak4Foam, usually tell you run Allwmake like this:

./Allwmake > log.make 2>&1

This way you get all of the output (both normal and error messages) that the build process performs, all stored in the file log.make. Therefore, you'll need to edit the file to check if there are any error messages, e.g. by running:

gedit log.make

The output can be a bit difficult to understand, but in swak4Foam's case, there are a few ways to figure out what went wrong, if anything at all:

  1. When everything goes well, you should get an output similar to this one (and it only happens after you run Allwmake 2 or 3 times):
    No 'swakConfiguration'. Python etc won't work
    Checking swak4Foam-version and generating file
    abort: no repository found in '/home/ofuser/OpenFOAM/ofuser-1.6-ext/swak4Foam' (.hg not found)!
    Swak version is 0.2.4
    Bison is version 2.5
    Flex is version 2.5.35 (Minor version: 35)
    OpenFOAM-version: Major 1 Minor 6 Patch 1.6-ext
    No change to swak4FoamParsers/foamVersion4swak.H
    '/home/ofuser/OpenFOAM/ofuser-1.6-ext/lib/linux64Gcc46DPOpt/libswak4FoamParsers.so' is up to date.
    '/home/ofuser/OpenFOAM/ofuser-1.6-ext/lib/linux64Gcc46DPOpt/libgroovyBC.so' is up to date.
    '/home/ofuser/OpenFOAM/ofuser-1.6-ext/lib/linux64Gcc46DPOpt/libswakFunctionObjects.so' is up to date.
    '/home/ofuser/OpenFOAM/ofuser-1.6-ext/lib/linux64Gcc46DPOpt/libsimpleFunctionObjects.so' is up to date.
    '/home/ofuser/OpenFOAM/ofuser-1.6-ext/lib/linux64Gcc46DPOpt/libsimpleLagrangianFunctionObjects.so' is up to date.
    '/home/ofuser/OpenFOAM/ofuser-1.6-ext/lib/linux64Gcc46DPOpt/libsimpleSearchableSurfaces.so' is up to date.
    '/home/ofuser/OpenFOAM/ofuser-1.6-ext/lib/linux64Gcc46DPOpt/libsimpleSwakFunctionObjects.so' is up to date.
    '/home/ofuser/OpenFOAM/ofuser-1.6-ext/lib/linux64Gcc46DPOpt/libswakTopoSources.so' is up to date.
    '/home/ofuser/OpenFOAM/ofuser-1.6-ext/lib/linux64Gcc46DPOpt/libswakSourceFields.so' is up to date.
    '/home/ofuser/OpenFOAM/ofuser-1.6-ext/lib/linux64Gcc46DPOpt/libswakFiniteArea.so' is up to date.
    '/home/ofuser/OpenFOAM/ofuser-1.6-ext/lib/linux64Gcc46DPOpt/libgroovyStandardBCs.so' is up to date.
    SWAK_PYTHON_INCLUDE not defined .... no Python-Integration
    '/home/ofuser/OpenFOAM/ofuser-1.6-ext/lib/linux64Gcc46DPOpt/libswakMeshQualityFunctionPlugin.so' is up to date.
    '/home/ofuser/OpenFOAM/ofuser-1.6-ext/lib/linux64Gcc46DPOpt/libswakLocalCalculationsFunctionPlugin.so' is up to date.
    '/home/ofuser/OpenFOAM/ofuser-1.6-ext/lib/linux64Gcc46DPOpt/libswakRandomFunctionPlugin.so' is up to date.
    '/home/ofuser/OpenFOAM/ofuser-1.6-ext/lib/linux64Gcc46DPOpt/libswakFvcSchemesFunctionPlugin.so' is up to date.
    '/home/ofuser/OpenFOAM/ofuser-1.6-ext/lib/linux64Gcc46DPOpt/libswakThermoTurbFunctionPlugin.so' is up to date.
    '/home/ofuser/OpenFOAM/ofuser-1.6-ext/lib/linux64Gcc46DPOpt/libswakTransportTurbFunctionPlugin.so' is up to date.
    '/home/ofuser/OpenFOAM/ofuser-1.6-ext/lib/linux64Gcc46DPOpt/libswakSurfacesAndSetsFunctionPlugin.so' is up to date.
    '/home/ofuser/OpenFOAM/ofuser-1.6-ext/lib/linux64Gcc46DPOpt/libswakLagrangianCloudSourcesFunctionPlugin.so' is up to date.
    '/home/ofuser/OpenFOAM/ofuser-1.6-ext/lib/linux64Gcc46DPOpt/libswakVelocityFunctionPlugin.so' is up to date.
    '/home/ofuser/OpenFOAM/ofuser-1.6-ext/lib/linux64Gcc46DPOpt/libswakChemistryModelFunctionPlugin.so' is up to date.
    '/home/ofuser/OpenFOAM/ofuser-1.6-ext/lib/linux64Gcc46DPOpt/libswakRadiationModelFunctionPlugin.so' is up to date.
    '/home/ofuser/OpenFOAM/ofuser-1.6-ext/lib/linux64Gcc46DPOpt/libswakFacSchemesFunctionPlugin.so' is up to date.
    make[1]: `/home/ofuser/OpenFOAM/ofuser-1.6-ext/applications/bin/linux64Gcc46DPOpt/calcNonUniformOffsetsForMapped' is up to date.
    make[1]: `/home/ofuser/OpenFOAM/ofuser-1.6-ext/applications/bin/linux64Gcc46DPOpt/replayTransientBC' is up to date.
    make[1]: `/home/ofuser/OpenFOAM/ofuser-1.6-ext/applications/bin/linux64Gcc46DPOpt/funkyDoCalc' is up to date.
    make[1]: `/home/ofuser/OpenFOAM/ofuser-1.6-ext/applications/bin/linux64Gcc46DPOpt/funkySetBoundaryField' is up to date.
    make[1]: `/home/ofuser/OpenFOAM/ofuser-1.6-ext/applications/bin/linux64Gcc46DPOpt/funkySetFields' is up to date.
    make[1]: `/home/ofuser/OpenFOAM/ofuser-1.6-ext/applications/bin/linux64Gcc46DPOpt/funkySetAreaFields' is up to date.

    If you get something the output above, then everything is OK.

  2. If not, go to the end of the file. If there is an explicit message from swak4Foam's build process, it should indicate what you need to do. For example:
    make: *** [Make/linux64Gcc46DPOpt/FieldValueExpressionParser.o] Error 1
    Parser library did not compile OK. No sense continuing as everything else depends on it
    
    Requirements for Library not satisfied. I see no sense in going on
    Check the README before you go on to ask. And search: Most likely your problem occurred to 5
    other people before and has been solved on the MessageBoard
    

    If you look a bit further up, you'll see something cryptic like this:

    /home/ofuser/OpenFOAM/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/GeometricSymmTensorField.C:44:1: note: template<template<class> 
    class PatchField, class GeoMesh> void Foam::symm(Foam::GeometricField<Foam::SymmTensor<double>, PatchField, GeoMesh>&, const 
    Foam::GeometricField<Foam::SymmTensor<double>, PatchField, GeoMesh>&)
    

    You'll have to keep going up until you find something like this:

    SubsetValueExpressionParser.tab.cc: In member function ‘parserSubset::SubsetValueExpressionParser::token_number_type parserSubset
    ::SubsetValueExpressionParser::yytranslate_(int)’:
    SubsetValueExpressionParser.tab.cc:9666:24: warning: use of old-style cast [-Wold-style-cast]
    In file included from /home/ofuser/OpenFOAM/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/symmTensorFieldField.H:80:0,
                     from /home/ofuser/OpenFOAM/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/GeometricSymmTensorField.C:28,
                     from /home/ofuser/OpenFOAM/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/GeometricSymmTensorField.H:79,
                     from /home/ofuser/OpenFOAM/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/GeometricTensorField.H:40,
                     from /home/ofuser/OpenFOAM/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/GeometricFields.H:37,
                     from /home/ofuser/OpenFOAM/OpenFOAM-1.6-ext/src/finiteVolume/lnInclude/volFields.H:38,
                     from ../FieldValueExpressionParser.yy:44:
    /home/ofuser/OpenFOAM/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/symmTensorFieldField.C: In function ‘void Foam::symm(Foam::FieldField<
    Field, Foam::SymmTensor<double> >&, const Foam::FieldField<Field, Foam::SymmTensor<double> >&) [with Field = Foam::pointPatchField]’:
    /home/ofuser/OpenFOAM/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/GeometricSymmTensorField.C:44:1:   recursively instantiated from ‘void
    Foam::symm(Foam::GeometricField<Foam::SymmTensor<double>, PatchField, GeoMesh>&, const Foam::GeometricField<Foam::SymmTensor<double>,
    PatchField, GeoMesh>&) [with PatchField = Foam::pointPatchField, GeoMesh = Foam::pointMesh]’
    

    Still looks cryptic, but those lines indicated by "In file included" let's us know where the problem occurred. Providing this information in the forum would help us diagnose the issue or to check on this page for the #Known Issues.

  3. Nonetheless, do keep in mind that when it comes to compiling code that is somehow related to OpenFOAM, it's the very first error messages are actually the ones that tell us the whole story as to why the compilation procedure did not work as intended.
  4. If you're not able to understand the error stands for, then create a tarball of the log file, by running:
    tar -czf logs.tar.gz log.*

    and attach the file logs.tar.g to a post in the designated thread at the forum OpenFOAM Installation.


4 Known Issues

4.1 Known compatibility issues between swak4Foam and certain versions of OpenFOAM

Symptoms
swak4Foam is not building with an older or newer version of OpenFOAM.
Reason
API changes in OpenFOAM result in swak4Foam having compatibility problems.
Solution
Compatibility issues between specific OpenFOAM versions and swak4Foam are listed in the introductory part of chapter 6. Downloading at Contrib/swak4Foam.


4.2 could no open file * for source file * due to No such file or directory

Symptoms
During the initial steps of building a library or application, it gives a message like this one:
Making dependency list for source file swakExplicitSources.C
could no open file directMappedFvPatch.H for source file swakExplicitSources.C due to No such file or directory
(...)
Reason
Usually this occurs when OpenFOAM's wmkdep utility is gathering information on the header files needed for building a particular file.
Solution
Usually you can safely ignore this.


4.3 fatal error: *: No such file or directory

Symptoms
While building a library or application, it gives an error message similar to this one:
In file included from helpers/printSwakVersion.C:43:0:
helpers/printSwakVersion.H:46:21: fatal error: Pstream.H: No such file or directory
Reason
OpenFOAM is not properly installed. It's even possible that you have more than one version installed and there is a conflict in the environment variables that define the location of where OpenFOAM (or of any of its variants) is installed.
Solutions
There are a few known reasons this can happen:
  1. Make sure you've properly followed the installation instructions for the OpenFOAM version or variant you've installed.
  2. If you have more than one OpenFOAM version or variant installed, then read this page: Installation/Working with the Shell


4.4 wmake: command not found

Symptoms
It gives this error message:
./Allwmake: line 49: wmake: command not found

Requirements for Library not satisfied. I see no sense in going on
Check the README before you go on to ask. And search: Most likely your problem occurred
to 5 other people before and has been solved on the MessageBoard
Reason
This means that the OpenFOAM shell environment is not working properly or that OpenFOAM is not installed.
Solution
Read this page: Installation/Working with the Shell


4.5 svn: Unable to connect to a repository at URL

Symptoms
Tried downloading from SVN with the svn command and got a message like this:
svn: E000111: Unable to connect to a repository at URL 'svn://svn.code.sf.net/p/openfoam-extend/svn/trunk/Breeder_2.0/libraries/swak4Foam'
svn: E000111: Can't connect to host 'svn.code.sf.net': Connection refused 
Reason
Usually it's a firewall or proxy limitation. Or the Sourceforge.net website is simply off-limits from where you are.
Solution
There are a couple of possible solutions:
  1. You can try replacing "svn://" for "http://", but that usually doesn't solve the problem.
  2. Try another place/method of download, as indicated in the following places:
    1. Try the page that gives an indication of known download locations, which also correlates OpenFOAM version to swak4Foam version: Installation/swak4Foam/Downloading
    2. Try the tarball download links, given here: Contrib/swak4Foam#Tarballs
    3. Try the instructions given on the mirrors section: Contrib/swak4Foam# Mirror repositories


4.6 No 'bison' found. This is absolutely essential for swak4Foam. Can't go on

Symptoms
Ran the script Allwmake or ran wmake all, and got a message similar to this one:
No 'swakConfiguration'. Python etc won't work
Checking swak4Foam-version and generating file
Swak version is 0.2.4
No 'bison' found. This is absolutely essential for swak4Foam. Can't go on
Requirements for Library not satisfied. I see no sense in going on
Reason
Bison is not installed.
Solution
Install Bison. Well, there is more than one way to install Bison, but usually the solution is to install in your system, either by following the instructions given at Installation/swak4Foam/Installing_On, or from source code as explained at Installation/swak4Foam/Building dependencies#Bison.
Warning
Not to be confused with Bison++, which is not the same thing as Bison.


4.7 Allwmake is stuck in the same place for over 5 minutes and says something about SWAK_COMPILE_GRAMMAR_OPTION

Symptoms
Launched the Allwmake script according to the instructions. But it's taking a long time to move beyond the message:
If compilation of the grammers takes prohibitively long set SWAK_COMPILE_GRAMMAR_OPTION to something like -O1
Reason
Probably it's as the message says and the build process is spending too much time trying to optimize something that isn't worth optimizing.
Solution
Abort the build process, using the key combination Ctrl+ C and run:
export SWAK_COMPILE_GRAMMAR_OPTION=-O1
Then run Allwmake once again.


4.8 Unable to use/build swak4Foam in a cluster and/or when module load is used

Symptoms
When testing funkySetFields I get command not found. Or when building I get this error message:
No change to swak4FoamParsers/foamVersion4swak.H
mkdir: `': No such file or directory
make: *** [/libswak4FoamParsers.so] Error 1
Reason
The administrators of clusters and shared workstations sometimes rely on a neat feature that exists for Linux: the module load, which is a way to load specific environment variables for a particular module or program. Problem is that this usually requires the administrator to manually configure the file that is to be loaded by the module command and not all system administrators are familiar with how many environment variables OpenFOAM has got and needs.
Solution
The most likely solution to work is to follow these steps:
  1. In the command line, run the module load command that you've been instructed to use when you need a particular OpenFOAM version. For example:
    module load openfoam230
  2. Now run the following commands:
    mkdir $HOME/.OpenFOAM
    echo 'export WM_PROJECT_USER_DIR=$HOME/$WM_PROJECT/$USER-$WM_PROJECT_VERSION' > $HOME/.OpenFOAM/prefs.sh
    echo 'export FOAM_USER_APPBIN=$WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/bin' >> $HOME/.OpenFOAM/prefs.sh
    echo 'export FOAM_USER_LIBBIN=$WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/lib'  >> $HOME/.OpenFOAM/prefs.sh
     
    echo 'export PATH=$PATH:$FOAM_USER_APPBIN'  >> $HOME/.OpenFOAM/prefs.sh
    echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$FOAM_USER_LIBBIN'  >> $HOME/.OpenFOAM/prefs.sh
     
    source $HOME/.OpenFOAM/prefs.sh
  3. Now, whenever you need to activate the OpenFOAM shell environment, you will need two command lines, not just one. For example:
    module load openfoam230
    source $HOME/.OpenFOAM/prefs.sh

    This way you load the system's default settings and add in the necessary shell environment variables for building and using swak4Foam.


4.9 Having trouble building swak4Foam on Mac OS X

The Macintosh Operating System X is known to be a bit of a pain to use when trying to compile OpenFOAM related software. The reason for this is because Mac OS X has its own implementations of applications that are slightly different from the ones available in Linux Distributions, namely the GNU core utilities. The usual suspects are as follows:

  • sed
  • grep
  • awk
  • flex

The versions implemented in Mac OS X of these applications are usually derived from the BSD implementations, which aren't fully compatible with the GNU ones. Therefore, it's advisable to install the versions available in the Macports repository. In addition, it's advisable that you at least have a look at the instructions available in the page Installation/Mac OS, because those instructions usually give valuable hints on what should be installed and from where, in order to have a working development environment of OpenFOAM on Mac OS X.


4.10 Bison is version 3.x / swak4Foam only confirmed to work with Bison 2.x

Symptoms
Ran the script Allwmake or ran wmake all, and got a message similar to this one:
Swak version is 0.3.1
Bison is version 3.0.2
swak4Foam only confirmed to work with Bison 2.x
Consider running ./maintainanceScripts/compileRequirements.sh for a local bison-installation
Set the environment variable DEVELOP_FOR_NEW_BISON if you want to continue anyway.
Requirements for library not satisified. I see no sense in going on
Check README .... your problem occured to 5 other people before and has been solved on ..
Reason
It might be a little hard to see it, but this line says it all:
swak4Foam only confirmed to work with Bison 2.x
Solution
Choose one of the following solutions:
Warning
Not to be confused with Bison++, which is not the same thing as Bison.


4.11 m4 is not present, too old or buggy

Symptoms
Tried to build Bison (as explained here) and got a message similar to this one:
checking for GNU M4 that supports accurate traces... configure: error: no acceptable m4 could be found in $PATH.
GNU M4 1.4.6 or later is required; 1.4.16 or newer is recommended.
GNU M4 1.4.15 uses a buggy replacement strstr on some systems.
Glibc 2.9 - 2.12 and GNU M4 1.4.11 - 1.4.15 have another strstr bug.
Reason
Incompatible m4 version or simply not installed.
Solution
Do a custom build, as explained here: Installation/swak4Foam/Building dependencies#m4