CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [swak4Foam] Error installing swak4Foam (https://www.cfd-online.com/Forums/openfoam-community-contributions/113239-error-installing-swak4foam.html)

gschaider November 5, 2014 04:55

Quote:

Originally Posted by Masgar (Post 517430)
Dear All,

I am trying to install swak4FOAM on my OpenFOAM1.6ext, but it gives the error:
----------------------------------------------------------------------------------------------------------------------------
lnInclude/swak.H:89:5: note: in expansion of macro ‘FOAM_VERSION4SWAK’
#if FOAM_VERSION4SWAK < VERSION_NR(1,7,0)
^
make: *** [Make/linux64GccDPOpt/printSwakVersion.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [Make/linux64GccDPOpt/exprString.o] Error 1
Parser library did not compile OK. No sense continuing as everything else depends on it
----------------------------------------------------------------------------------------------------------------------------

Could you please let me know how I could make it work?

Thanks in advance and Best,

You probably have your reasons for using 1.6-ext (and not foam-extend-3.x) but you must understand that it is quite hard to support such an old version (so if you can: upgrade)

The error is quite strange because because FOAM_VERSION4SWAK is defined a few lines further up. The only reason I can think of is that Libraries/swak4FoamParsers/foamVersion4swak.H was not correctly created. What is the content of that file?

Masgar November 12, 2014 02:38

Hi Bernhard,

Thanks for your reply. I just upgraded to foam-extend-3.1 and swak4Foam and groovyBCs were easily installed. Now it is working nicely :)

Thanks again and Best,
Mahdi

mordab July 22, 2015 02:57

hi friends,
I have problem with installing swake4foam,
my OpenFoam version is 2.3.1, is there any patch for this version?
thanks all

wyldckat July 25, 2015 14:34

Quote:

Originally Posted by mordab (Post 556428)
hi friends,
I have problem with installing swake4foam,
my OpenFoam version is 2.3.1, is there any patch for this version?
thanks all

Quick answer: I've tested building the latest swak4Foam with OpenFOAM 2.3.1 in Ubuntu 12.04 and everything worked fine. Please check the instructions given here: http://openfoamwiki.net/index.php/In...tion/swak4Foam - I added the section "Detailed instructions on how to install swak4Foam" just now and hopefully it can answer some of the pending questions on how to build swak4Foam from source code...

iLyrics December 2, 2015 11:01

I have been busy with installing swak4foam all night. Finally, under the guidence of the master, I was successful. The procedure is following:
1、hg clone http://hg.code.sf.net/p/openfoam-extend/swak4Foam openfoam-extend-
swak4Foam
2、./maintainanceScripts/compileRequirements.sh
3、Downloading the patch file, and copy it to the installing catalog.
4、patch -p1 < swakFixFor20x.patch
5、ln -s swakConfiguration.automatic swakConfiguration
6、./Allwclean

HKVadmin December 10, 2015 05:58

Installing swak4foam on openfoam 2.4.0
 
Hello!

I am trying to install swak4foam (0.3.2) on openfoam 2.4.0 and I am getting the following error:

Code:

Previously compiled for OpenFOAM 2.4.0

/usr/local/OpenFOAM/OpenFOAM-2.0.x/swak4Foam_2.x/privateRequirements/bin existing. Prepending to PATH-variable (private version of Bison)

Reading variables from 'swakConfiguration'
Checking swak4Foam-version and generating file
Swak version is 0.3.2
Bison is version 2.7.12-4996
Flex is version 2.5.35 (Minor version: 35)
OpenFOAM-version: Major 2 Minor 4 Patch 0 (-1 == x / 0)
No change to swak4FoamParsers/foamVersion4swak.H
SOURCE=entryToExpression/entryToExpression.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -IMake/linux64GccDPOpt          -I/usr/local/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-2.4.0/src/sampling/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-2.4.0/src/fileFormats/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-2.4.0/src/triSurface/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-2.4.0/src/surfMesh/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-2.4.0/src/lagrangian/basic/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-2.4.0/src/meshTools/lnInclude -IlnInclude -I. -I/usr/local/OpenFOAM/OpenFOAM-2.4.0/src/OpenFOAM/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-2.4.0/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linux64GccDPOpt/entryToExpression.o
entryToExpression/entryToExpression.C: In static member function ‘static Foam::string Foam::entryToExpression::fromEntry(const Foam::entry&)’:
entryToExpression/entryToExpression.C:96: error: no matching function for call to ‘dynamicCast(const Foam::entry&)’
make: *** [Make/linux64GccDPOpt/entryToExpression.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 occured to 5 other people before and has been solved on the MessageBoard

Can someone point me in the right direction?

With kind regards

wyldckat December 10, 2015 15:23

Greetings HKVadmin and welcome to the forum!

That is a very peculiar error message. I tested it just now with Ubuntu 12.04 which uses GCC 4.6.3 and I didn't have that problem.

To diagnose the origin of the problem, I need the following information:
  1. Try running the following commands inside the "swak4Foam" folder:
    Code:

    wclean all
    ./Allwmake

  2. Does it give you the same error message or is it now building without problems? If it still gives the same message, then continue the following steps...
  3. What do the following commands give you?
    Code:

    gcc --version
    g++ --version

  4. Please zip and attach the file "Libraries/swak4FoamParsers/entryToExpression/entryToExpression.dep". What I'm looking for is the entry "typeInfo.H" in the file and to compare with the one I get on my installation. Because I suspect that due to some weird reason, your build could be picking up another file with the same name.
  5. How are you keep versions of OpenFOAM apart from each other?
    • In particular, do you use the same terminal window to work with more than one version of OpenFOAM?
I hope I'm not forgetting anything.


Best regards,
Bruno

HKVadmin December 11, 2015 03:37

1 Attachment(s)
Thank you Bruno!

Quote:

Originally Posted by wyldckat (Post 577138)
[*]Try running the following commands inside the "swak4Foam" folder:
Code:

wclean all
./Allwmake

[*]Does it give you the same error message or is it now building without problems? If it still gives the same message, then continue the following steps...

I did the wclean all and then ./Allwmake but unfortunatly got the same error message.

Quote:

Originally Posted by wyldckat (Post 577138)
[*]What do the following commands give you?
Code:

gcc --version
g++ --version


gcc --version gives:
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50)
g++ --version gives:
g++ (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50)

Quote:

Originally Posted by wyldckat (Post 577138)
[*]Please zip and attach the file "Libraries/swak4FoamParsers/entryToExpression/entryToExpression.dep". What I'm looking for is the entry "typeInfo.H" in the file and to compare with the one I get on my installation. Because I suspect that due to some weird reason, your build could be picking up another file with the same name.

If I attached the file correctly there should be an entrytoexpression.tar.gz file attached to this post. Is that okay or do you need a .zip?

Quote:

Originally Posted by wyldckat (Post 577138)
[*]How are you keep versions of OpenFOAM apart from each other?
  • In particular, do you use the same terminal window to work with more than one version of OpenFOAM?
[/LIST]

That is a good question. One that I don't really have an answer for. I have asked my collegue who works with the software (I am just tasked with installing software on our cluster). He says that when he starts a job he targets the version (we have 2.0.x and 2.4.0 installed) that he needs?

In /usr/local/OpenFOAM we have multiple folders:
drwxr-xr-x 3 root root 4096 Oct 17 2011 engrid-1.2.0
drwxr-xr-x 4 root root 4096 Oct 17 2011 gmsh-2.4.2
drwxr-xr-x 6 root root 4096 Oct 17 2011 netgen-4.9.14-svn
drwxr-xr-x 10 root root 4096 Dec 10 12:25 OpenFOAM-2.0.x
drwxrwxr-x 11 root root 4096 Dec 10 12:26 OpenFOAM-2.4.0
drwxr-xr-x 4 root root 4096 Oct 17 2011 paraview-3.10.0
drwxr-xr-x 6 root root 4096 Oct 17 2011 ThirdParty-2.0.x
drwxr-xr-x 10 root root 4096 Oct 1 12:31 ThirdParty-2.4.0

Maybe also important in this case: Our OpenFOAM-2.4.0 installation is not working exactly as it should be. Parallel processing isn't working (but single core is). We are still trying to figure that out as well. Could that perhaps be the reason wak4foam isn't building?

Thank you very much for your help so far!

With kind regards,
Marc


EDIT:

Turns out that our gcc version was not new enough. With gcc version 4.2.8 swak4foam builds as it should!

wyldckat December 12, 2015 15:06

Hi Marc,

The dependency file looks OK.

I'm guessing you're using Redhat 5.x, given that the default is GCC 4.1.2. Have a look at these instructions for ideas regarding the issue with MPI (for running in parallel): http://openfoamwiki.net/index.php/In...EL#CentOS_5.11

Quote:

Originally Posted by HKVadmin (Post 577199)
Turns out that our gcc version was not new enough. With gcc version 4.2.8 swak4foam builds as it should!

As for the GCC version, the minimum is GCC 4.5 for building OpenFOAM 2.4.0: http://openfoamwiki.net/index.php/In...tion_.28GCC.29 - so I guess you're referring to GCC 4.8.2 and not 4.2.8? ;)

Best regards,
Bruno

HKVadmin December 14, 2015 07:11

Quote:

Originally Posted by wyldckat (Post 577358)
Hi Marc,

The dependency file looks OK.

I'm guessing you're using Redhat 5.x, given that the default is GCC 4.1.2. Have a look at these instructions for ideas regarding the issue with MPI (for running in parallel): http://openfoamwiki.net/index.php/In...EL#CentOS_5.11


As for the GCC version, the minimum is GCC 4.5 for building OpenFOAM 2.4.0: http://openfoamwiki.net/index.php/In...tion_.28GCC.29 - so I guess you're referring to GCC 4.8.2 and not 4.2.8? ;)

Best regards,
Bruno

Hi Bruno,

You guessed correctly! I meant 4.8.2

As for running in parralel. This seemed to be a strange issue as well. We figured out that OpenFOAM uses mpicc to get some information about OpenMPI? Turns out that on our environment mpicc was not recognized while OpenMPI and mpi etc. were succesfully installed. We then edited the file /usr/local/OpenFOAM/OpenFOAM-2.4.0/etc/config.sh and around line 369 added:

export PATH=/usr/local/openmpi-1.8.5/bin:$PATH

That worked. But then log.interFoam stated that a dummy library in Pstream could not be used in parallel. A quick search showed (by earlier responses by you) that this is solved by compiling Pstream again. So we did (after exporting openmpi to our PATH as Pstream also uses mpicc for something) that by running Allwmake in the Pstream directory and after that everything seemed to work.

My collegeau is going to test this week and hopefully he comes to the same conclusion as mine and that is that everything is working properly.

With kind regards,
Marc

HKVadmin December 18, 2015 04:23

Hi Bruno,

I still have an issue. Our users are logging in on our cluster with their own username. But swak4foam doens't seem to work for them. This is because it has been built by root as stated on this page: https://openfoamwiki.net/index.php/Contrib/swak4Foam

It says "Note: building swak4Foam installs it into FOAM_USER_LIBBIN for the current user. So if it built as root (or another administrative account) it is not usable from another account (or in other words: every user must compile swak4Foam for himself separately. There are ways to install it for all users. They are documented but you must find the way there yourself as a test to make sure you know what you're doing as doing this wrong may introduce very peculiar problems)"

Could you point me in the right direction to make it so that every user can use swak4foam?

Thanks in advance!
Marc

EDIT: Nevermind, I should RTFM ;)

Uyan October 14, 2016 16:00

openfoam 1.6-ext : Parser error
 
For people who got this error

Code:

Parser library did not compile OK. No sense continuing as everything else depends on it
See if your bison version is 3.x.x , if so try to uninstall bison and install a 2.x.x version and re-compile.

For me that solved the problem of installing swak4Foam with 1.6-ext.

KingKraut December 12, 2016 04:09

swak4Foam with Rapid CFD
 
Dear all,
I tried installing swak4Foam (v0.3.2) with RapidCFD (GPU implementation of OF based on OpenFOAM-2.3.1). I opened this thread for this, but got no reply so far.

Since I am very much interested in both, or rather dependent on both working together, I try to push this here...

The problem seems to be, that swak4Foam does not recognise RapidCFD as a valid version of OpenFOAM, because it cannot identify the version of OpenFOAM in one of the first steps in the installation process.

If anybody has any idea, in how I could try doing this, please let me know! All help is welcome!!

Best regards
Johannes

EKW January 29, 2018 19:04

Hi all

I am trying to compile swak4Foam on a cluster for openFOAM-2.1.1. Here are the system configurations

Code:

This is a clean install
No file 'swakConfiguration'. Python etc won't work. See README for details
Try 'ln -s swakConfiguration.automatic swakConfiguration' for automatic configuration. BEWARE: this does not work on some systems
Checking swak4Foam-version and generating file
abort: There is no Mercurial repository here (.hg not found)!
Swak version is 0.3.2
Bison is version 2.4.1
Flex is version 2.5.35 (Minor version: 35)
OpenFOAM-version: Major 2 Minor 1 Patch 1 (-1 == x / 1)

And I've got the following error message
Code:

../FieldValueExpressionParser.yy(157): error: no instance of overloaded function "Foam::ConcretePluginFunction<DriverType>::evaluate [with DriverType=Foam::FieldValueExpressionDriver]" matches the argument list
            argument types are: (std::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
            object type is: Foam::FieldValuePluginFunction
          theFunction->evaluate<T>(
                      ^
          detected during instantiation of "Foam::autoPtr<T> Foam::FieldValueExpressionDriver::evaluatePluginFunction<T>(const Foam::word &, const parserField::location &, int &) [with T=Foam::pointSphericalTensorField]" at line 5748

compilation aborted for Make/linux64IccDPOpt/FieldValueExpressionParser.C (code 2)
make: *** [Make/linux64IccDPOpt/FieldValueExpressionParser.o] Error 2
Parser library did not compile OK. No sense continuing as everything else depends on it

Would someone please help me on this?

Thank you very much!

gschaider January 30, 2018 20:24

Quote:

Originally Posted by EKW (Post 679825)
Hi all

I am trying to compile swak4Foam on a cluster for openFOAM-2.1.1.

Any reason why you're using a 5 year old version of OpenFOAM?

Quote:

Originally Posted by EKW (Post 679825)
Here are the system configurations

Code:

This is a clean install
No file 'swakConfiguration'. Python etc won't work. See README for details
Try 'ln -s swakConfiguration.automatic swakConfiguration' for automatic configuration. BEWARE: this does not work on some systems
Checking swak4Foam-version and generating file
abort: There is no Mercurial repository here (.hg not found)!
Swak version is 0.3.2
Bison is version 2.4.1
Flex is version 2.5.35 (Minor version: 35)
OpenFOAM-version: Major 2 Minor 1 Patch 1 (-1 == x / 1)


That shouldn't be a problem. The swak-version is quite old. But OK

Quote:

Originally Posted by EKW (Post 679825)
And I've got the following error message
Code:

../FieldValueExpressionParser.yy(157): error: no instance of overloaded function "Foam::ConcretePluginFunction<DriverType>::evaluate [with DriverType=Foam::FieldValueExpressionDriver]" matches the argument list
            argument types are: (std::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
            object type is: Foam::FieldValuePluginFunction
          theFunction->evaluate<T>(
                      ^
          detected during instantiation of "Foam::autoPtr<T> Foam::FieldValueExpressionDriver::evaluatePluginFunction<T>(const Foam::word &, const parserField::location &, int &) [with T=Foam::pointSphericalTensorField]" at line 5748

compilation aborted for Make/linux64IccDPOpt/FieldValueExpressionParser.C (code 2)
make: *** [Make/linux64IccDPOpt/FieldValueExpressionParser.o] Error 2
Parser library did not compile OK. No sense continuing as everything else depends on it

Would someone please help me on this?

Thank you very much!

Which compiler do you use? Because as far as a can see this is a problem of converting variable types

EKW February 1, 2018 18:51

Dear gschaider

Thank you very much for your prompt response! And apologise I cannot reply your post a bit earlier.

Quote:

Which compiler do you use? Because as far as a can see this is a problem of converting variable types
The compiler I was using is "icpc". Any insight?

Thanks again for your help!

EKW

gschaider February 1, 2018 19:50

Quote:

Originally Posted by EKW (Post 680172)
Dear gschaider

Thank you very much for your prompt response! And apologise I cannot reply your post a bit earlier.



The compiler I was using is "icpc". Any insight?

Thanks again for your help!

EKW

Ah. I could have told from the "Icc" in your output.

I'm afraid that might be the problem: I've had people submit patches so that swak compiles with the Intel-compiler (that compiler seems to see some things slightly different than others). Myself I only test the code with Gcc and CLang so I can't tell you how to fix that problem. Sorry

You might try commenting out the relevant lines in FieldValueExpressionParser.yy . That sould "only" break plugin-functions. But I can't tell for sure

EKW February 1, 2018 21:12

Quote:

Originally Posted by gschaider (Post 680176)
Ah. I could have told from the "Icc" in your output.

I'm afraid that might be the problem: I've had people submit patches so that swak compiles with the Intel-compiler (that compiler seems to see some things slightly different than others). Myself I only test the code with Gcc and CLang so I can't tell you how to fix that problem. Sorry

You might try commenting out the relevant lines in FieldValueExpressionParser.yy . That sould "only" break plugin-functions. But I can't tell for sure

Oh! I will give it a try.

Thank you for pointing me to the right direction.

EKW

potentialFoam March 26, 2018 07:54

Dear Foamers,

I face problems installing swak4Foam with OpenFOAM v1606+.
Procedure:

1.) Download from git according to https://openfoamwiki.net/index.php/I...opment_version

Executing:
and
Code:

git checkout branches/develop
2.) Follow installation https://openfoamwiki.net/index.php/C...m/Installation

Code:

./Allwmake > log.make 2>&1
3.) Follow hints from the output in file 'log.make':
Code:

ln -s swakConfiguration.automatic swakConfiguration
and (installing proper bison version...)
Code:

./maintainanceScripts/compileRequirements.sh
4.) Rerun file 'Allwmake' again.

=> The error is strange:

Code:

Make/linux64GccDPInt32Opt/../mybisonNew:20: recipe for target 'Make/linux64GccDPInt32Opt/FieldValueExpressionParser.o' failed
make: *** [Make/linux64GccDPInt32Opt/FieldValueExpressionParser.o] Error 1
Parser library did not compile OK.

Or the full output in 'log.make':
Code:

Previously compiled for OpenFOAM (v1606+)

/home/fds159/feder/OpenFOAM/feder-v1606+/swak4Foam/privateRequirements/bin existing. Prepending to PATH-variable (private version of Bison)

Reading variables from 'swakConfiguration'
theFiles.sh: line 21: [[: 1606+: syntax error: operand expected (error token is "+")
Checking swak4Foam-version and generating file
Swak version is 0.4.2
Bison is version 3.0.4
Flex is version 2.5.37 (Minor version: 37)
OpenFOAM-version: Major 1606 Minor 0 Patch 0 (-1 == x / 0) Fork: openfoamplus
No change to swak4FoamParsers/foamVersion4swak.H
rm -f FieldValueExpressionParser.C FieldValueExpressionParser.tab.hh; mkdir $$; cd $$; [ -n "" ] && sleep 30; bison -ra -v  -d ../FieldValueExpressionParser.yy ; mv *.tab.cc ../Make/linux64GccDPInt32Opt/FieldValueExpressionParser.yy.C ; sed -i.bak "s/position.hh/FieldValueExpressionParser_position.hh/" location.hh ; mv location.hh ../lnInclude/FieldValueExpressionParser_location.hh ; mv stack.hh ../lnInclude/FieldValueExpressionParser_stack.hh ; mv position.hh ../lnInclude/FieldValueExpressionParser_position.hh ; sed -i.bak "s/stack.hh/FieldValueExpressionParser_stack.hh/;s/location.hh/FieldValueExpressionParser_location.hh/" FieldValueExpressionParser.tab.hh ; mv *.hh ../lnInclude ; touch -r ../FieldValueExpressionParser.yy ../lnInclude/FieldValueExpressionParser*.hh ; cd ..; rm -r $$; if [ -z "-O1" ]; then echo -e "\n\nIf compilation of the grammers takes prohibitivly long set SWAK_COMPILE_GRAMMAR_OPTION to something like -O1\n\n" ; fi;  g++ -std=c++0x -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3  -DNoRepository -ftemplate-depth-100 -IMake/linux64GccDPInt32Opt      -I/opt/OpenFOAM/OpenFOAM-v1606+/src/finiteVolume/lnInclude -I/opt/OpenFOAM/OpenFOAM-v1606+/src/surfMesh/lnInclude -I/opt/OpenFOAM/OpenFOAM-v1606+/src/sampling/lnInclude -I/opt/OpenFOAM/OpenFOAM-v1606+/src/fileFormats/lnInclude -I/opt/OpenFOAM/OpenFOAM-v1606+/src/triSurface/lnInclude -I/opt/OpenFOAM/OpenFOAM-v1606+/src/dynamicMesh/lnInclude -I/opt/OpenFOAM/OpenFOAM-v1606+/src/lagrangian/basic/lnInclude -I/opt/OpenFOAM/OpenFOAM-v1606+/src/surfMesh/lnInclude -I/opt/OpenFOAM/OpenFOAM-v1606+/src/meshTools/lnInclude  -IlnInclude -I. -I/opt/OpenFOAM/OpenFOAM-v1606+/src/OpenFOAM/lnInclude -I/opt/OpenFOAM/OpenFOAM-v1606+/src/OSspecific/POSIX/lnInclude  -fPIC -O1 -c Make/linux64GccDPInt32Opt/FieldValueExpressionParser.yy.C -o Make/linux64GccDPInt32Opt/FieldValueExpressionParser.o
In file included from /opt/OpenFOAM/OpenFOAM-v1606+/src/finiteVolume/lnInclude/fvcD2dt2.H:74:0,
                from ../FieldValueExpressionParser.yy:59:
/opt/OpenFOAM/OpenFOAM-v1606+/src/finiteVolume/lnInclude/fvcD2dt2.C: In instantiation of ‘Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::d2dt2(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = Foam::Vector<double>]’:
../FieldValueExpressionParser.yy:1114:13:  required from here
/opt/OpenFOAM/OpenFOAM-v1606+/src/finiteVolume/lnInclude/fvcD2dt2.C:53:20: error: passing ‘const Foam::fv::d2dt2Scheme<Foam::Vector<double> >’ as ‘this’ argument of ‘Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> > Foam::fv::d2dt2Scheme<Type>::fvcD2dt2(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = Foam::Vector<double>]’ discards qualifiers [-fpermissive]
    )().fvcD2dt2(vf);
                    ^
/opt/OpenFOAM/OpenFOAM-v1606+/src/finiteVolume/lnInclude/fvcD2dt2.C: In instantiation of ‘Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::d2dt2(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = double]’:
../FieldValueExpressionParser.yy:2531:21:  required from here
/opt/OpenFOAM/OpenFOAM-v1606+/src/finiteVolume/lnInclude/fvcD2dt2.C:53:20: error: passing ‘const Foam::fv::d2dt2Scheme<double>’ as ‘this’ argument of ‘Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> > Foam::fv::d2dt2Scheme<Type>::fvcD2dt2(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = double]’ discards qualifiers [-fpermissive]
/opt/OpenFOAM/OpenFOAM-v1606+/src/finiteVolume/lnInclude/fvcD2dt2.C: In instantiation of ‘Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::d2dt2(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = Foam::Tensor<double>]’:
../FieldValueExpressionParser.yy:3117:13:  required from here
/opt/OpenFOAM/OpenFOAM-v1606+/src/finiteVolume/lnInclude/fvcD2dt2.C:53:20: error: passing ‘const Foam::fv::d2dt2Scheme<Foam::Tensor<double> >’ as ‘this’ argument of ‘Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> > Foam::fv::d2dt2Scheme<Type>::fvcD2dt2(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = Foam::Tensor<double>]’ discards qualifiers [-fpermissive]
/opt/OpenFOAM/OpenFOAM-v1606+/src/finiteVolume/lnInclude/fvcD2dt2.C: In instantiation of ‘Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::d2dt2(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = Foam::SymmTensor<double>]’:
../FieldValueExpressionParser.yy:3430:13:  required from here
/opt/OpenFOAM/OpenFOAM-v1606+/src/finiteVolume/lnInclude/fvcD2dt2.C:53:20: error: passing ‘const Foam::fv::d2dt2Scheme<Foam::SymmTensor<double> >’ as ‘this’ argument of ‘Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> > Foam::fv::d2dt2Scheme<Type>::fvcD2dt2(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = Foam::SymmTensor<double>]’ discards qualifiers [-fpermissive]
/opt/OpenFOAM/OpenFOAM-v1606+/src/finiteVolume/lnInclude/fvcD2dt2.C: In instantiation of ‘Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::d2dt2(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = Foam::SphericalTensor<double>]’:
../FieldValueExpressionParser.yy:3711:13:  required from here
/opt/OpenFOAM/OpenFOAM-v1606+/src/finiteVolume/lnInclude/fvcD2dt2.C:53:20: error: passing ‘const Foam::fv::d2dt2Scheme<Foam::SphericalTensor<double> >’ as ‘this’ argument of ‘Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> > Foam::fv::d2dt2Scheme<Type>::fvcD2dt2(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = Foam::SphericalTensor<double>]’ discards qualifiers [-fpermissive]
Make/linux64GccDPInt32Opt/../mybisonNew:20: recipe for target 'Make/linux64GccDPInt32Opt/FieldValueExpressionParser.o' failed
make: *** [Make/linux64GccDPInt32Opt/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 occured to 5 other people before and has been solved on the MessageBoard

Unfortunately, I can't find a solution. E. g. using the system bison version (2.7). Do you have an idea?

System: OpenSuse Leap 42.3
Processor: Intel(R) Xeon(R) Gold

gschaider March 26, 2018 18:48

That problem is mentioned in the README. It is a problem that OF 4.0 and 1606+ have: when re-factoring the code one change in d2dt was missed. As nobody except swak4Foam seemed to use that part nobody noticed.

Two solutions:
  • use a newer version of OF+. The bug is fixed there
  • in the swak-sources there is a directory distroPatches. Apply the patch there to 1606+-distribution

Quote:

Originally Posted by potentialFoam (Post 686565)
Dear Foamers,

I face problems installing swak4Foam with OpenFOAM v1606+.
Procedure:

1.) Download from git according to https://openfoamwiki.net/index.php/I...opment_version

Executing:
and
Code:

git checkout branches/develop
2.) Follow installation https://openfoamwiki.net/index.php/C...m/Installation

Code:

./Allwmake > log.make 2>&1
3.) Follow hints from the output in file 'log.make':
Code:

ln -s swakConfiguration.automatic swakConfiguration
and (installing proper bison version...)
Code:

./maintainanceScripts/compileRequirements.sh
4.) Rerun file 'Allwmake' again.

=> The error is strange:

Code:

Make/linux64GccDPInt32Opt/../mybisonNew:20: recipe for target 'Make/linux64GccDPInt32Opt/FieldValueExpressionParser.o' failed
make: *** [Make/linux64GccDPInt32Opt/FieldValueExpressionParser.o] Error 1
Parser library did not compile OK.

Or the full output in 'log.make':
Code:

Previously compiled for OpenFOAM (v1606+)

/home/fds159/feder/OpenFOAM/feder-v1606+/swak4Foam/privateRequirements/bin existing. Prepending to PATH-variable (private version of Bison)

Reading variables from 'swakConfiguration'
theFiles.sh: line 21: [[: 1606+: syntax error: operand expected (error token is "+")
Checking swak4Foam-version and generating file
Swak version is 0.4.2
Bison is version 3.0.4
Flex is version 2.5.37 (Minor version: 37)
OpenFOAM-version: Major 1606 Minor 0 Patch 0 (-1 == x / 0) Fork: openfoamplus
No change to swak4FoamParsers/foamVersion4swak.H
rm -f FieldValueExpressionParser.C FieldValueExpressionParser.tab.hh; mkdir $$; cd $$; [ -n "" ] && sleep 30; bison -ra -v  -d ../FieldValueExpressionParser.yy ; mv *.tab.cc ../Make/linux64GccDPInt32Opt/FieldValueExpressionParser.yy.C ; sed -i.bak "s/position.hh/FieldValueExpressionParser_position.hh/" location.hh ; mv location.hh ../lnInclude/FieldValueExpressionParser_location.hh ; mv stack.hh ../lnInclude/FieldValueExpressionParser_stack.hh ; mv position.hh ../lnInclude/FieldValueExpressionParser_position.hh ; sed -i.bak "s/stack.hh/FieldValueExpressionParser_stack.hh/;s/location.hh/FieldValueExpressionParser_location.hh/" FieldValueExpressionParser.tab.hh ; mv *.hh ../lnInclude ; touch -r ../FieldValueExpressionParser.yy ../lnInclude/FieldValueExpressionParser*.hh ; cd ..; rm -r $$; if [ -z "-O1" ]; then echo -e "\n\nIf compilation of the grammers takes prohibitivly long set SWAK_COMPILE_GRAMMAR_OPTION to something like -O1\n\n" ; fi;  g++ -std=c++0x -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3  -DNoRepository -ftemplate-depth-100 -IMake/linux64GccDPInt32Opt      -I/opt/OpenFOAM/OpenFOAM-v1606+/src/finiteVolume/lnInclude -I/opt/OpenFOAM/OpenFOAM-v1606+/src/surfMesh/lnInclude -I/opt/OpenFOAM/OpenFOAM-v1606+/src/sampling/lnInclude -I/opt/OpenFOAM/OpenFOAM-v1606+/src/fileFormats/lnInclude -I/opt/OpenFOAM/OpenFOAM-v1606+/src/triSurface/lnInclude -I/opt/OpenFOAM/OpenFOAM-v1606+/src/dynamicMesh/lnInclude -I/opt/OpenFOAM/OpenFOAM-v1606+/src/lagrangian/basic/lnInclude -I/opt/OpenFOAM/OpenFOAM-v1606+/src/surfMesh/lnInclude -I/opt/OpenFOAM/OpenFOAM-v1606+/src/meshTools/lnInclude  -IlnInclude -I. -I/opt/OpenFOAM/OpenFOAM-v1606+/src/OpenFOAM/lnInclude -I/opt/OpenFOAM/OpenFOAM-v1606+/src/OSspecific/POSIX/lnInclude  -fPIC -O1 -c Make/linux64GccDPInt32Opt/FieldValueExpressionParser.yy.C -o Make/linux64GccDPInt32Opt/FieldValueExpressionParser.o
In file included from /opt/OpenFOAM/OpenFOAM-v1606+/src/finiteVolume/lnInclude/fvcD2dt2.H:74:0,
                from ../FieldValueExpressionParser.yy:59:
/opt/OpenFOAM/OpenFOAM-v1606+/src/finiteVolume/lnInclude/fvcD2dt2.C: In instantiation of ‘Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::d2dt2(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = Foam::Vector<double>]’:
../FieldValueExpressionParser.yy:1114:13:  required from here
/opt/OpenFOAM/OpenFOAM-v1606+/src/finiteVolume/lnInclude/fvcD2dt2.C:53:20: error: passing ‘const Foam::fv::d2dt2Scheme<Foam::Vector<double> >’ as ‘this’ argument of ‘Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> > Foam::fv::d2dt2Scheme<Type>::fvcD2dt2(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = Foam::Vector<double>]’ discards qualifiers [-fpermissive]
    )().fvcD2dt2(vf);
                    ^
/opt/OpenFOAM/OpenFOAM-v1606+/src/finiteVolume/lnInclude/fvcD2dt2.C: In instantiation of ‘Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::d2dt2(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = double]’:
../FieldValueExpressionParser.yy:2531:21:  required from here
/opt/OpenFOAM/OpenFOAM-v1606+/src/finiteVolume/lnInclude/fvcD2dt2.C:53:20: error: passing ‘const Foam::fv::d2dt2Scheme<double>’ as ‘this’ argument of ‘Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> > Foam::fv::d2dt2Scheme<Type>::fvcD2dt2(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = double]’ discards qualifiers [-fpermissive]
/opt/OpenFOAM/OpenFOAM-v1606+/src/finiteVolume/lnInclude/fvcD2dt2.C: In instantiation of ‘Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::d2dt2(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = Foam::Tensor<double>]’:
../FieldValueExpressionParser.yy:3117:13:  required from here
/opt/OpenFOAM/OpenFOAM-v1606+/src/finiteVolume/lnInclude/fvcD2dt2.C:53:20: error: passing ‘const Foam::fv::d2dt2Scheme<Foam::Tensor<double> >’ as ‘this’ argument of ‘Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> > Foam::fv::d2dt2Scheme<Type>::fvcD2dt2(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = Foam::Tensor<double>]’ discards qualifiers [-fpermissive]
/opt/OpenFOAM/OpenFOAM-v1606+/src/finiteVolume/lnInclude/fvcD2dt2.C: In instantiation of ‘Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::d2dt2(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = Foam::SymmTensor<double>]’:
../FieldValueExpressionParser.yy:3430:13:  required from here
/opt/OpenFOAM/OpenFOAM-v1606+/src/finiteVolume/lnInclude/fvcD2dt2.C:53:20: error: passing ‘const Foam::fv::d2dt2Scheme<Foam::SymmTensor<double> >’ as ‘this’ argument of ‘Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> > Foam::fv::d2dt2Scheme<Type>::fvcD2dt2(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = Foam::SymmTensor<double>]’ discards qualifiers [-fpermissive]
/opt/OpenFOAM/OpenFOAM-v1606+/src/finiteVolume/lnInclude/fvcD2dt2.C: In instantiation of ‘Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::d2dt2(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = Foam::SphericalTensor<double>]’:
../FieldValueExpressionParser.yy:3711:13:  required from here
/opt/OpenFOAM/OpenFOAM-v1606+/src/finiteVolume/lnInclude/fvcD2dt2.C:53:20: error: passing ‘const Foam::fv::d2dt2Scheme<Foam::SphericalTensor<double> >’ as ‘this’ argument of ‘Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> > Foam::fv::d2dt2Scheme<Type>::fvcD2dt2(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = Foam::SphericalTensor<double>]’ discards qualifiers [-fpermissive]
Make/linux64GccDPInt32Opt/../mybisonNew:20: recipe for target 'Make/linux64GccDPInt32Opt/FieldValueExpressionParser.o' failed
make: *** [Make/linux64GccDPInt32Opt/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 occured to 5 other people before and has been solved on the MessageBoard

Unfortunately, I can't find a solution. E. g. using the system bison version (2.7). Do you have an idea?

System: OpenSuse Leap 42.3
Processor: Intel(R) Xeon(R) Gold



All times are GMT -4. The time now is 20:39.