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)

potentialFoam March 27, 2018 04:56

Thanks a lot!

I tried with version 1712 - and it works. Very nice tool!

Elham December 20, 2018 23:10

FieldValueExpressionParser
 
1 Attachment(s)
Hi,


I have an installed version of OpenFoam-2.3.0 on supercomputer. I have the following error while tried to install swak4Foam




Code:

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
Swak version is 0.4.1
Bison is version 2.7.12-4996
Flex is version 2.5.37 (Minor version: 37)
OpenFOAM-version: Major 2 Minor 3 Patch 0 (-1 == x / 0) Fork: openfoam
No change to swak4FoamParsers/foamVersion4swak.H
SOURCE=FieldValueExpressionParser.yy ; rm -f Make/crayxcGccDPOpt/FieldValueExpressionParser.C Make/crayxcGccDPOpt/FieldValueExpressionParser.tab.hh; mkdir $$; cd $$; [ -n "" ] && sleep 30; bison -ra -v  -d ../$SOURCE ; mv *.tab.cc ../Make/crayxcGccDPOpt/FieldValueExpressionParser.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 ../$SOURCE ../lnInclude/FieldValueExpressionParser*.hh ; cd ..; rm -r $$; if [ -z "" ]; then echo -e "\n\nIf compilation of the grammers takes prohibitivly long set SWAK_COMPILE_GRAMMAR_OPTION to something like -O1\n\n" ; fi;  CC -Dcrayxc -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wno-unused-local-typedefs -O3  -DNoRepository -ftemplate-depth-100 -IMake/crayxcGccDPOpt      -I/group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/finiteVolume/lnInclude -I/group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/surfMesh/lnInclude -I/group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/sampling/lnInclude -I/group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/fileFormats/lnInclude -I/group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/triSurface/lnInclude -I/group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/dynamicMesh/lnInclude -I/group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/lagrangian/basic/lnInclude -I/group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/surfMesh/lnInclude -I/group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/meshTools/lnInclude  -IlnInclude -I. -I/group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude -I/group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/OSspecific/POSIX/lnInclude  -fPIC  -c Make/crayxcGccDPOpt/FieldValueExpressionParser.C -o Make/crayxcGccDPOpt/FieldValueExpressionParser.o


If compilation of the grammers takes prohibitivly long set SWAK_COMPILE_GRAMMAR_OPTION to something like -O1


In file included from /group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/DimensionedField.H:342:0,
                from /group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/GeometricField.H:44,
                from /group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/GeometricScalarField.H:38,
                from /group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/GeometricFields.H:34,
                from /group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/finiteVolume/lnInclude/volFields.H:37,
                from ../FieldValueExpressionParser.yy:47:

....


FieldValueExpressionParser.tab.cc: In member function 'parserField::FieldValueExpressionParser::token_number_type parserField::FieldValueExpressionParser::yytranslate_(int)':
FieldValueExpressionParser.tab.cc:16827:24: warning: use of old-style cast [-Wold-style-cast]
FieldValueExpressionParser.dep:644: recipe for target 'Make/crayxcGccDPOpt/FieldValueExpressionParser.o' failed
make: *** [Make/crayxcGccDPOpt/FieldValueExpressionParser.o] Error 1
Parser library did not compile OK. No sense continuing as everything else depends on it


The log file is attached. Thanks in advance for any help.


Regards,


Elham

gschaider December 21, 2018 05:57

Quote:

Originally Posted by Elham (Post 719782)
Hi,


I have an installed version of OpenFoam-2.3.0 on supercomputer. I have the following error while tried to install swak4Foam




Code:

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
Swak version is 0.4.1
Bison is version 2.7.12-4996
Flex is version 2.5.37 (Minor version: 37)
OpenFOAM-version: Major 2 Minor 3 Patch 0 (-1 == x / 0) Fork: openfoam
No change to swak4FoamParsers/foamVersion4swak.H
SOURCE=FieldValueExpressionParser.yy ; rm -f Make/crayxcGccDPOpt/FieldValueExpressionParser.C Make/crayxcGccDPOpt/FieldValueExpressionParser.tab.hh; mkdir $$; cd $$; [ -n "" ] && sleep 30; bison -ra -v  -d ../$SOURCE ; mv *.tab.cc ../Make/crayxcGccDPOpt/FieldValueExpressionParser.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 ../$SOURCE ../lnInclude/FieldValueExpressionParser*.hh ; cd ..; rm -r $$; if [ -z "" ]; then echo -e "\n\nIf compilation of the grammers takes prohibitivly long set SWAK_COMPILE_GRAMMAR_OPTION to something like -O1\n\n" ; fi;  CC -Dcrayxc -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wno-unused-local-typedefs -O3  -DNoRepository -ftemplate-depth-100 -IMake/crayxcGccDPOpt      -I/group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/finiteVolume/lnInclude -I/group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/surfMesh/lnInclude -I/group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/sampling/lnInclude -I/group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/fileFormats/lnInclude -I/group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/triSurface/lnInclude -I/group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/dynamicMesh/lnInclude -I/group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/lagrangian/basic/lnInclude -I/group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/surfMesh/lnInclude -I/group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/meshTools/lnInclude  -IlnInclude -I. -I/group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude -I/group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/OSspecific/POSIX/lnInclude  -fPIC  -c Make/crayxcGccDPOpt/FieldValueExpressionParser.C -o Make/crayxcGccDPOpt/FieldValueExpressionParser.o


If compilation of the grammers takes prohibitivly long set SWAK_COMPILE_GRAMMAR_OPTION to something like -O1


In file included from /group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/DimensionedField.H:342:0,
                from /group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/GeometricField.H:44,
                from /group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/GeometricScalarField.H:38,
                from /group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/GeometricFields.H:34,
                from /group/director2080/emohammadi/OpenFOAM/OpenFOAM-2.3.0/src/finiteVolume/lnInclude/volFields.H:37,
                from ../FieldValueExpressionParser.yy:47:

....


FieldValueExpressionParser.tab.cc: In member function 'parserField::FieldValueExpressionParser::token_number_type parserField::FieldValueExpressionParser::yytranslate_(int)':
FieldValueExpressionParser.tab.cc:16827:24: warning: use of old-style cast [-Wold-style-cast]
FieldValueExpressionParser.dep:644: recipe for target 'Make/crayxcGccDPOpt/FieldValueExpressionParser.o' failed
make: *** [Make/crayxcGccDPOpt/FieldValueExpressionParser.o] Error 1
Parser library did not compile OK. No sense continuing as everything else depends on it

The log file is attached. Thanks in advance for any help.


Regards,


Elham


I think the problem is that around the time of 2.3 the behaviour of "a & b" with a and b being symmetrical tensors changed. Your OpenFOAM-version says that the result is a general tensor while swak4Foam assumes that it will be a symmetrical tensors. The quickest solution would be to remove the offending rule from the grammar and hope that you never need it. Go to FieldValueExpressionParser.yy and line 3162 in that. The rule starts with a line starting with a pipe symbol ("|"). Remove the rule that the line is in (just all the lines until the next rule). In my experience 93.5% of all applications of swak4Foam don't involve tensor arithmetics so you might be fine

Elham December 24, 2018 21:51

1 Attachment(s)
Quote:

Originally Posted by gschaider (Post 719810)
I think the problem is that around the time of 2.3 the behaviour of "a & b" with a and b being symmetrical tensors changed. Your OpenFOAM-version says that the result is a general tensor while swak4Foam assumes that it will be a symmetrical tensors. The quickest solution would be to remove the offending rule from the grammar and hope that you never need it. Go to FieldValueExpressionParser.yy and line 3162 in that. The rule starts with a line starting with a pipe symbol ("|"). Remove the rule that the line is in (just all the lines until the next rule). In my experience 93.5% of all applications of swak4Foam don't involve tensor arithmetics so you might be fine

Dear Bernhard,


I have deleted the rule and try to compil;e but still have the same error. I have attached the FieldValueExpressionParser.yy file. I am wondering if I should remove some more rules since the other rules around are similar to the one that I removed.



Thanks for your attention.


Elham

gschaider December 25, 2018 14:47

Quote:

Originally Posted by Elham (Post 720057)
Dear Bernhard,


I have deleted the rule and try to compil;e but still have the same error. I have attached the FieldValueExpressionParser.yy file. I am wondering if I should remove some more rules since the other rules around are similar to the one that I removed.



Thanks for your attention.


Elham


No. The other rules should be fine.


Before trying anything else do ./Allwclean and recompile. Maybe the intermediate file from the grammar was not correctly produced/written


Anyway: check the log if it is really exactly the same error


BTW: the current develop-branch in the repository compiles with 2.3. But it uses the necessary workarounds

gschaider December 25, 2018 14:53

Quote:

Originally Posted by gschaider (Post 720101)
No. The other rules should be fine.


Before trying anything else do ./Allwclean and recompile. Maybe the intermediate file from the grammar was not correctly produced/written


Anyway: check the log if it is really exactly the same error


BTW: the current develop-branch in the repository compiles with 2.3. But it uses the necessary workarounds


Just checked my sources. The workaround is needed in 2 other places. So maybe ypur error message was similar but not the same (because it stumbled on those cases). Check the line in the error messages (look for the string "error:". Near that is the actual places it happened)

divyesh May 17, 2020 11:24

Code:

g++ -std=c++11 -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 -Wno-attributes -O3  -DNoRepository -ftemplate-depth-100 -IMake/linux64GccDPInt32Opt      -I/opt/openfoam7/src/finiteVolume/lnInclude -I/opt/openfoam7/src/surfMesh/lnInclude -I/opt/openfoam7/src/sampling/lnInclude -I/opt/openfoam7/src/fileFormats/lnInclude -I/opt/openfoam7/src/triSurface/lnInclude -I/opt/openfoam7/src/dynamicMesh/lnInclude -I/opt/openfoam7/src/lagrangian/basic/lnInclude -I/opt/openfoam7/src/surfMesh/lnInclude -I/opt/openfoam7/src/meshTools/lnInclude -I../filesThatAreOnlyInSomeDistributions/OutputFilerDropin/ -IlnInclude -I. -I/opt/openfoam7/src/OpenFOAM/lnInclude -I/opt/openfoam7/src/OSspecific/POSIX/lnInclude  -fPIC -c entryToExpression/dimensionedScalarEntryToExpression.C -o Make/linux64GccDPInt32Opt/entryToExpression/dimensionedScalarEntryToExpression.o
entryToExpression/dimensionedScalarEntryToExpression.C: In member function ‘virtual Foam::string Foam::dimensionedScalarEntryToExpression::toExpr(const Foam::entry&)’:
entryToExpression/dimensionedScalarEntryToExpression.C:65:27: error: binding reference of type ‘Foam::Istream&’ to ‘const Foam::Istream’ discards qualifiers
    dimensionedScalar val(pe);
                          ^~
In file included from /opt/openfoam7/src/OpenFOAM/lnInclude/dimensionedType.H:344:0,
                from /opt/openfoam7/src/OpenFOAM/lnInclude/dimensionedScalar.H:38,
                from entryToExpression/dimensionedScalarEntryToExpression.C:36:
/opt/openfoam7/src/OpenFOAM/lnInclude/dimensionedType.C:124:1: note:  initializing argument 1 of ‘Foam::dimensioned<Type>::dimensioned(Foam::Istream&) [with Type = double]’
 Foam::dimensioned<Type>::dimensioned
 ^~~~
/opt/openfoam7/wmake/rules/General/transform:25: recipe for target 'Make/linux64GccDPInt32Opt/entryToExpression/dimensionedScalarEntryToExpression.o' failed
make: *** [Make/linux64GccDPInt32Opt/entryToExpression/dimensionedScalarEntryToExpression.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


I am trying to install swak4foam in openFOAMv7. Getting above error, can anyone help me?


Thanks in Advance

gschaider May 17, 2020 18:51

Quote:

Originally Posted by divyesh (Post 770855)
Code:

g++ -std=c++11 -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 -Wno-attributes -O3  -DNoRepository -ftemplate-depth-100 -IMake/linux64GccDPInt32Opt      -I/opt/openfoam7/src/finiteVolume/lnInclude -I/opt/openfoam7/src/surfMesh/lnInclude -I/opt/openfoam7/src/sampling/lnInclude -I/opt/openfoam7/src/fileFormats/lnInclude -I/opt/openfoam7/src/triSurface/lnInclude -I/opt/openfoam7/src/dynamicMesh/lnInclude -I/opt/openfoam7/src/lagrangian/basic/lnInclude -I/opt/openfoam7/src/surfMesh/lnInclude -I/opt/openfoam7/src/meshTools/lnInclude -I../filesThatAreOnlyInSomeDistributions/OutputFilerDropin/ -IlnInclude -I. -I/opt/openfoam7/src/OpenFOAM/lnInclude -I/opt/openfoam7/src/OSspecific/POSIX/lnInclude  -fPIC -c entryToExpression/dimensionedScalarEntryToExpression.C -o Make/linux64GccDPInt32Opt/entryToExpression/dimensionedScalarEntryToExpression.o
entryToExpression/dimensionedScalarEntryToExpression.C: In member function ‘virtual Foam::string Foam::dimensionedScalarEntryToExpression::toExpr(const Foam::entry&)’:
entryToExpression/dimensionedScalarEntryToExpression.C:65:27: error: binding reference of type ‘Foam::Istream&’ to ‘const Foam::Istream’ discards qualifiers
    dimensionedScalar val(pe);
                          ^~
In file included from /opt/openfoam7/src/OpenFOAM/lnInclude/dimensionedType.H:344:0,
                from /opt/openfoam7/src/OpenFOAM/lnInclude/dimensionedScalar.H:38,
                from entryToExpression/dimensionedScalarEntryToExpression.C:36:
/opt/openfoam7/src/OpenFOAM/lnInclude/dimensionedType.C:124:1: note:  initializing argument 1 of ‘Foam::dimensioned<Type>::dimensioned(Foam::Istream&) [with Type = double]’
 Foam::dimensioned<Type>::dimensioned
 ^~~~
/opt/openfoam7/wmake/rules/General/transform:25: recipe for target 'Make/linux64GccDPInt32Opt/entryToExpression/dimensionedScalarEntryToExpression.o' failed
make: *** [Make/linux64GccDPInt32Opt/entryToExpression/dimensionedScalarEntryToExpression.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

I am trying to install swak4foam in openFOAMv7. Getting above error, can anyone help me?


Thanks in Advance


Which version of the sources is this? Currently only the development version supports OF7

PositronCascade May 23, 2020 19:09

Hello divyesh, maybe you can try like the way I explained here? It worked for me.



Quote:

Originally Posted by divyesh (Post 770855)
Code:

g++ -std=c++11 -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 -Wno-attributes -O3  -DNoRepository -ftemplate-depth-100 -IMake/linux64GccDPInt32Opt      -I/opt/openfoam7/src/finiteVolume/lnInclude -I/opt/openfoam7/src/surfMesh/lnInclude -I/opt/openfoam7/src/sampling/lnInclude -I/opt/openfoam7/src/fileFormats/lnInclude -I/opt/openfoam7/src/triSurface/lnInclude -I/opt/openfoam7/src/dynamicMesh/lnInclude -I/opt/openfoam7/src/lagrangian/basic/lnInclude -I/opt/openfoam7/src/surfMesh/lnInclude -I/opt/openfoam7/src/meshTools/lnInclude -I../filesThatAreOnlyInSomeDistributions/OutputFilerDropin/ -IlnInclude -I. -I/opt/openfoam7/src/OpenFOAM/lnInclude -I/opt/openfoam7/src/OSspecific/POSIX/lnInclude  -fPIC -c entryToExpression/dimensionedScalarEntryToExpression.C -o Make/linux64GccDPInt32Opt/entryToExpression/dimensionedScalarEntryToExpression.o
entryToExpression/dimensionedScalarEntryToExpression.C: In member function ‘virtual Foam::string Foam::dimensionedScalarEntryToExpression::toExpr(const Foam::entry&)’:
entryToExpression/dimensionedScalarEntryToExpression.C:65:27: error: binding reference of type ‘Foam::Istream&’ to ‘const Foam::Istream’ discards qualifiers
    dimensionedScalar val(pe);
                          ^~
In file included from /opt/openfoam7/src/OpenFOAM/lnInclude/dimensionedType.H:344:0,
                from /opt/openfoam7/src/OpenFOAM/lnInclude/dimensionedScalar.H:38,
                from entryToExpression/dimensionedScalarEntryToExpression.C:36:
/opt/openfoam7/src/OpenFOAM/lnInclude/dimensionedType.C:124:1: note:  initializing argument 1 of ‘Foam::dimensioned<Type>::dimensioned(Foam::Istream&) [with Type = double]’
 Foam::dimensioned<Type>::dimensioned
 ^~~~
/opt/openfoam7/wmake/rules/General/transform:25: recipe for target 'Make/linux64GccDPInt32Opt/entryToExpression/dimensionedScalarEntryToExpression.o' failed
make: *** [Make/linux64GccDPInt32Opt/entryToExpression/dimensionedScalarEntryToExpression.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


I am trying to install swak4foam in openFOAMv7. Getting above error, can anyone help me?


Thanks in Advance


ksripathy June 19, 2020 15:56

OpenFOAM v1912 Ubuntu 20.04
 
Hi,
i am facing trouble in compiling swak4Foam for OpenFOAM v1912. I have tried the default, develop and p1912 branches in the mercurial repository with no success. One of the error messays state that:

Quote:

This swak4Foam-version is only used for the 2.x-versions of OpenFOAM. For lower versions there is a special branch
which is quite strange since OpenFOAM v1912 is the latest version. Also, these are the remaining error messages:

Quote:

lnInclude/MeshInterpolationOrder.H:70:25: error: ‘order’ in ‘class Foam::meshToMesh’ does not name a type
70 | typedef meshToMesh::order value;
| ^~~~~
lnInclude/MeshInterpolationOrder.H:76:28: error: ‘value’ was not declared in this scope
76 | static const NamedEnum<value, 3> names;
| ^~~~~
lnInclude/MeshInterpolationOrder.H:76:36: error: template argument 1 is invalid
76 | static const NamedEnum<value, 3> names;
| ^
lnInclude/MeshInterpolationOrder.H:81:21: error: ‘order’ in ‘class Foam::meshToMesh’ does not name a type
81 | typedef meshToMesh::order meshToMeshOrder;
| ^~~~~
In file included from lnInclude/CommonValueExpressionDriver.H:67,
from helpers/swakExprString.C:35:
lnInclude/MeshesRepository.H:71:15: error: ‘meshToMeshOrder’ was not declared in this scope; did you mean ‘meshToMesh’?
71 | HashTable<meshToMeshOrder> interpolationOrder_;
| ^~~~~~~~~~~~~~~
| meshToMesh
lnInclude/MeshesRepository.H:71:30: error: template argument 1 is invalid
71 | HashTable<meshToMeshOrder> interpolationOrder_;
| ^
lnInclude/MeshesRepository.H:139:9: error: ‘meshToMeshOrder’ has not been declared
139 | meshToMeshOrder val
| ^~~~~~~~~~~~~~~
lnInclude/MeshesRepository.H:143:5: error: ‘meshToMeshOrder’ does not name a type; did you mean ‘meshToMesh’?
143 | meshToMeshOrder getInterpolationOrder(
| ^~~~~~~~~~~~~~~
| meshToMesh
In file included from helpers/swakExprString.C:35:
lnInclude/CommonValueExpressionDriver.H:711:9: error: ‘meshToMeshOrder’ has not been declared
711 | meshToMeshOrder theOrder=
| ^~~~~~~~~~~~~~~
lnInclude/CommonValueExpressionDriver.H:715:21: error: ‘INTERPOLATE’ is not a member of ‘Foam::meshToMesh’
715 | meshToMesh::INTERPOLATE
| ^~~~~~~~~~~
In file included from lnInclude/CommonValueExpressionDriver.H:844,
from helpers/swakExprString.C:35:
lnInclude/CommonValueExpressionDriverI.H: In member function ‘bool Foam::CommonValueExpressionDriver::updateSet(Foam: :autoPtr<T>&, const Foam::word&, Foam::CommonValueExpressionDriver::SetOrigin) const’:
lnInclude/CommonValueExpressionDriverI.H:321:32: error: ‘class Foam::IOobject’ has no member named ‘headerOk’
321 | header.headerOk()
| ^~~~~~~~
lnInclude/CommonValueExpressionDriverI.H:335:43: error: ‘class Foam::IOobject’ has no member named ‘filePath’
335 | << header.filePath()
| ^~~~~~~~
lnInclude/CommonValueExpressionDriverI.H: At global scope:
lnInclude/CommonValueExpressionDriverI.H:921:9: error: ‘meshToMeshOrder’ has not been declared
921 | meshToMeshOrder theOrder
| ^~~~~~~~~~~~~~~
lnInclude/CommonValueExpressionDriverI.H: In member function ‘Foam::tmp<T> Foam::CommonValueExpressionDriver::interpolateFore ignField(const Foam::word&, const Foam::word&, int) const’:
lnInclude/CommonValueExpressionDriverI.H:993:30: error: ‘const class Foam::meshToMesh’ has no member named ‘interpolate’
993 | return interpolation.interpolate(
|

And, the compilation stops at:

Quote:

make: *** [/home/ksripathy/OpenFOAM/OpenFOAM-v1912/wmake/rules/General/transform:35: Make/linux64GccDPInt32Opt/helpers/swakExprString.o] Error 1
Parser library did not compile OK. No sense continuing as everything else depends on it
This is the complete build log. Any guidance to resolve this issue is very much appreciated. Thank you.

Best wishes,
Kiran Sripathy.

Yuke September 23, 2020 01:33

Installation Errors of develop version on of7
 
1 Attachment(s)
Dear Sir/Madam,


This is Yuke. I've installed OpenFOAM 7 on my computer (Ubuntu 20.04.1 LTS). When I was installing swak4FOAM, an error keeps coming after wclean several times. I haven't found any solutions from the Internet. Please help me fix this.



I followed the installation instruction, as
in Folder: ~/OpenFOAM/yuke-7/

1) hg clone http://hg.code.sf.net/p/openfoam-extend/swak4Foam swak4Foam
2) cd swak4Foam && hg update develop
3) ./Allwmake > log.make 2>&1
4) ./Allwmake > log.make 2>&1
The attached is what was written in log.make profile.
The first several lines of log profile is
"
Current OpenFOAM version is 7.
Previously compiled for OpenFOAM (7)
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
Swak version is 20xx.yy.0
hg info: 58b9a1dfa14c (develop) tip
No 'bear' installed
Bison: /usr/bin/bison
Flex: /usr/bin/flex
Bison at /usr/bin/bison is version 3.5.1 (Major 3 Minor 5)
Flex is version 2.6.4 (Minor version: 4)
OpenFOAM-version: Major 7 Minor 0 Patch -1 (-1 == x / 98) Fork: org
No change to swak4FoamParsers/foamVersion4swak.H

Please include the output above when reporting a problem in the compilation. It helps diagnosing the problem

"
Last several lines are
"
wmake funkySetAreaFields
OpenFOAM.org version 7
OpenFOAM.org version 7
make[1]: Entering directory '/home/yuke/OpenFOAM/yuke-7/swak4Foam/Utilities/funkySetAreaFields'
OpenFOAM.org version 7
g++ -std=c++11 -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 -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -IMake/linux64GccDPInt32Opt -I/opt/openfoam7/src/finiteVolume/lnInclude -I/opt/openfoam7/src/finiteArea/lnInclude -I/opt/openfoam7/src/meshTools/lnInclude -I/opt/openfoam7/src/sampling/lnInclude -I../../Libraries/swakFiniteArea/lnInclude/ -I../../Libraries/swak4FoamParsers/lnInclude/ -IlnInclude -I. -I/opt/openfoam7/src/OpenFOAM/lnInclude -I/opt/openfoam7/src/OSspecific/POSIX/lnInclude -fPIC -c funkySetAreaFields.C -o Make/linux64GccDPInt32Opt/funkySetAreaFields.o
funkySetAreaFields.C:39:10: fatal error: faCFD.H: No such file or directory
39 | #include "faCFD.H"
| ^~~~~~~~~
compilation terminated.
make[1]: *** [/opt/openfoam7/wmake/rules/General/transform:26: Make/linux64GccDPInt32Opt/funkySetAreaFields.o] Error 1
make[1]: Leaving directory '/home/yuke/OpenFOAM/yuke-7/swak4Foam/Utilities/funkySetAreaFields'
make: *** [/opt/openfoam7/wmake/makefiles/apps:39: funkySetAreaFields] Error 2


If you want to use swakCoded-function object or compile software based on swak set the environment variable SWAK4FOAM_SRC to /home/yuke/OpenFOAM/yuke-7/swak4Foam/Libraries (most people will be fine without setting that variable)
"
Thanks in advance.
Best, Yuke

gschaider September 24, 2020 16:35

Quote:

Originally Posted by Yuke (Post 783514)
Dear Sir/Madam,


This is Yuke. I've installed OpenFOAM 7 on my computer (Ubuntu 20.04.1 LTS). When I was installing swak4FOAM, an error keeps coming after wclean several times. I haven't found any solutions from the Internet. Please help me fix this.



I followed the installation instruction, as
in Folder: ~/OpenFOAM/yuke-7/

1) hg clone http://hg.code.sf.net/p/openfoam-extend/swak4Foam swak4Foam
2) cd swak4Foam && hg update develop
3) ./Allwmake > log.make 2>&1
4) ./Allwmake > log.make 2>&1
The attached is what was written in log.make profile.
The first several lines of log profile is
"
Current OpenFOAM version is 7.
Previously compiled for OpenFOAM (7)
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
Swak version is 20xx.yy.0
hg info: 58b9a1dfa14c (develop) tip
No 'bear' installed
Bison: /usr/bin/bison
Flex: /usr/bin/flex
Bison at /usr/bin/bison is version 3.5.1 (Major 3 Minor 5)
Flex is version 2.6.4 (Minor version: 4)
OpenFOAM-version: Major 7 Minor 0 Patch -1 (-1 == x / 98) Fork: org
No change to swak4FoamParsers/foamVersion4swak.H

Please include the output above when reporting a problem in the compilation. It helps diagnosing the problem

"
Last several lines are
"
wmake funkySetAreaFields
OpenFOAM.org version 7
OpenFOAM.org version 7
make[1]: Entering directory '/home/yuke/OpenFOAM/yuke-7/swak4Foam/Utilities/funkySetAreaFields'
OpenFOAM.org version 7
g++ -std=c++11 -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 -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -IMake/linux64GccDPInt32Opt -I/opt/openfoam7/src/finiteVolume/lnInclude -I/opt/openfoam7/src/finiteArea/lnInclude -I/opt/openfoam7/src/meshTools/lnInclude -I/opt/openfoam7/src/sampling/lnInclude -I../../Libraries/swakFiniteArea/lnInclude/ -I../../Libraries/swak4FoamParsers/lnInclude/ -IlnInclude -I. -I/opt/openfoam7/src/OpenFOAM/lnInclude -I/opt/openfoam7/src/OSspecific/POSIX/lnInclude -fPIC -c funkySetAreaFields.C -o Make/linux64GccDPInt32Opt/funkySetAreaFields.o
funkySetAreaFields.C:39:10: fatal error: faCFD.H: No such file or directory
39 | #include "faCFD.H"
| ^~~~~~~~~
compilation terminated.
make[1]: *** [/opt/openfoam7/wmake/rules/General/transform:26: Make/linux64GccDPInt32Opt/funkySetAreaFields.o] Error 1
make[1]: Leaving directory '/home/yuke/OpenFOAM/yuke-7/swak4Foam/Utilities/funkySetAreaFields'
make: *** [/opt/openfoam7/wmake/makefiles/apps:39: funkySetAreaFields] Error 2


If you want to use swakCoded-function object or compile software based on swak set the environment variable SWAK4FOAM_SRC to /home/yuke/OpenFOAM/yuke-7/swak4Foam/Libraries (most people will be fine without setting that variable)
"
Thanks in advance.
Best, Yuke


I think the only problem is that funkySetAreaField should not compile on your machine: it needs the finiteArea-stuff which only foam-extend and the ESI release have.


So there is a problem in the compilation script that I have to fix (so that it doesn't try to compile the utility on OpenFOAM from CFD-direct)


If there are no other problems then you should be fine

ksripathy October 3, 2020 10:27

Quote:

Originally Posted by ksripathy (Post 775217)
Hi,
i am facing trouble in compiling swak4Foam for OpenFOAM v1912. I have tried the default, develop and p1912 branches in the mercurial repository with no success. One of the error messays state that:



which is quite strange since OpenFOAM v1912 is the latest version. Also, these are the remaining error messages:




And, the compilation stops at:



This is the complete build log. Any guidance to resolve this issue is very much appreciated. Thank you.

Best wishes,
Kiran Sripathy.

Hi,
Just wanted to remind that I am still facing this issue. I also tried compiling swak4FOAM for other versions of OpenFOAM - v1906, v2006, but the same issue persists. My operating system is ubuntu 20.04. swak4FOAM was running fine with OpenFOAM v1906 when I was using ubuntu 18.04 on my PC. Also, I didnt face any issues when I installed swak4FOAM and OpenFOAM v1906 last year on my university's cluster which has CentOS. Do I need to take extra precautions when I am compiling swak4FOAM on ubuntu 20.04? Or are there some other issues with my setup?
Best wishes,
Kiran Sripathy.

Vincy_ January 11, 2021 09:15

Install swak4Foam in OpenFOAM-v2012
 
log.make:
Some scripts require a binary 'python' to be installed
It doesn't matter if this is Python 2 or 3
This problem is caused by Linux distros that install 'python2' and/or 'python3' but no python
On such distros usually a packages exists that links 'python' to one of those


It's the latest version: OpenFOAM-v2012, and I install the swak4Foam development version, getting above error, can anyone help me?

Thanks in Advance

gschaider January 11, 2021 11:08

Quote:

Originally Posted by Vincy_ (Post 793028)
log.make:
Some scripts require a binary 'python' to be installed
It doesn't matter if this is Python 2 or 3
This problem is caused by Linux distros that install 'python2' and/or 'python3' but no python
On such distros usually a packages exists that links 'python' to one of those


It's the latest version: OpenFOAM-v2012, and I install the swak4Foam development version, getting above error, can anyone help me?

Thanks in Advance


The problem is not swak4Foam. The problem is your distro: usually Linux-distros have an executable "python" that points to either "python2" or "python3". The scripts in swak are written in such a way that they work with both of them.
Ubuntu has decided in its newest version that there is no "python". Only "python2" and/or "python3"
To fix that it has to be made sure that "python" points to one of the two. The ways to do that is
  1. install a package that does that (I hear Ubuntu 20.04 has such a package
  2. set a symbolic link in a directory in PATH that points to either python2 or 3
It depends on your Linux-distro and whether you have admin rights which is the past way

dewey August 31, 2021 18:28

Quote:

Originally Posted by Vincy_ (Post 793028)
log.make:
Some scripts require a binary 'python' to be installed
It doesn't matter if this is Python 2 or 3
This problem is caused by Linux distros that install 'python2' and/or 'python3' but no python
On such distros usually a packages exists that links 'python' to one of those


It's the latest version: OpenFOAM-v2012, and I install the swak4Foam development version, getting above error, can anyone help me?

Thanks in Advance


Could you solve it?

divyathokala01@gmail.com December 26, 2021 13:13

some scripts require binary python to be installed error while compiling swak4foam
 
please kindly help to resolve following error

chinni@LAPTOP-105VVDC2:~/OpenFOAM/OpenFOAM-v2012/applications/swak4Foam$ openfoam2012
Traceback (most recent call last):
File "/usr/lib/command-not-found", line 28, in <module>
from CommandNotFound import CommandNotFound
File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 19, in <module>
from CommandNotFound.db.db import SqliteDatabase
File "/usr/lib/python3/dist-packages/CommandNotFound/db/db.py", line 5, in <module>
import apt_pkg
ImportError: /home/chinni/OpenFOAM/OpenFOAM-v2012/ThirdParty/platforms/linux64/gcc-6.3.0/lib64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /lib/x86_64-linux-gnu/libapt-pkg.so.6.0)
chinni@LAPTOP-105VVDC2:~/OpenFOAM/OpenFOAM-v2012/applications/swak4Foam$ ./AllwmakeAll

This script is rather crude. If it doesn't work try the steps by hand. And be sure to run it from the root of the swak-installation (as ./maintainanceScripts/compileRequirements.sh). Otherwise it probably won't work

bison-3.4.tar.gz already downloaded
Untarring bison-sources
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking whether make supports nested variables... no
checking whether make supports nested variables... (cached) no
checking whether make supports the include directive... no
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/chinni/OpenFOAM/OpenFOAM-v2012/applications/swak4Foam/privateRequirements/compilation/bison-3.4':
configure: error: C compiler cannot create executables
See `config.log' for more details
./maintainanceScripts/compileRequirements.sh: line 31: make: command not found
./maintainanceScripts/compileRequirements.sh: line 31: make: command not found

Bison not compiled. Check output

lua-5.3.5.tar.gz already downloaded
Untarring lua-sources
sed: can't read bak: No such file or directory
sed: can't read bak: No such file or directory
sed: can't read bak: No such file or directory
./maintainanceScripts/compileRequirements.sh: line 66: make: command not found
./maintainanceScripts/compileRequirements.sh: line 68: make: command not found
If there were problems during compilation install the readline-devel package (name may be different on platforms)

Lua not compiled. Check output


Add /home/chinni/OpenFOAM/OpenFOAM-v2012/applications/swak4Foam/privateRequirements/bin to PATH-variable. The ./Allwmake-script will use this directory automatically

Some scripts require a binary 'python' to be installed
It doesn't matter if this is Python 2 or 3
This problem is caused by Linux distros that install 'python2' and/or 'python3' but no python
On such distros usually a packages exists that links 'python' to one of those

divyathokala01@gmail.com January 7, 2022 00:54

Swak4Foam stopped compiling
 
I am using OpenFOAM v-2106. I am encountering the following problem while compiling swak4Foam. can anyone help me in doing it.



This script is rather crude. If it doesn't work try the steps by hand. And be sure to run it from the root of the swak-installation (as ./maintainanceScripts/compileRequirements.sh). Otherwise it probably won't work

Bison already installed/compiled
Bison successfully compiled
Lua already installed/compiled
Lua successfully compiled

Add /usr/lib/openfoam/openfoam2106/applications/swak4Foam/privateRequirements/bin to PATH-variable. The ./Allwmake-script will use this directory automatically

Current OpenFOAM version is v2106.
Previously compiled for OpenFOAM (v2106)

/usr/lib/openfoam/openfoam2106/applications/swak4Foam/privateRequirements/bin existing. Prepending to PATH-variable (private version of Bison)

Reading variables from 'swakConfiguration'
Looking for Python 2
Looking for Python 3
Found Python 3.8
Configuring Python 3.8
Using python3.8 at /usr/bin/python3.8-config for python3
Using our own Lua at /usr/lib/openfoam/openfoam2106/applications/swak4Foam/privateRequirements
Checking swak4Foam-version and generating file
Swak version is 202x.yy.0
hg info: ea7680cdcf8b (develop) tip
No 'bear' installed
Bison: /usr/lib/openfoam/openfoam2106/applications/swak4Foam/privateRequirements/bin/bison
Flex: /usr/bin/flex
Bison at /usr/lib/openfoam/openfoam2106/applications/swak4Foam/privateRequirements/bin/bison is version 3.4 (Major 3 Minor 4)
Flex is version 2.6.4 (Minor version: 4)
OpenFOAM-version: Major 2106 Minor 0 Patch 0 (-1 == x / 0) Fork: com
No change to swak4FoamParsers/foamVersion4swak.H

Please include the output above when reporting a problem in the compilation. It helps diagnosing the problem


wmake libso swak4FoamParsers
/usr/lib/openfoam/openfoam2106/build/linux64GccDPInt32Opt/applications/swak4Foam/Libraries/swak4FoamParsers/options:69: /usr/lib/openfoam/openfoam2106/build/linux64GccDPInt32Opt/applications/swak4Foam/Libraries/swak4FoamParsers/../myflex: No such file or directory
make: *** No rule to make target '/usr/lib/openfoam/openfoam2106/build/linux64GccDPInt32Opt/applications/swak4Foam/Libraries/swak4FoamParsers/../myflex'. Stop.
/usr/lib/openfoam/openfoam2106/build/linux64GccDPInt32Opt/applications/swak4Foam/Libraries/swak4FoamParsers/options:69: /usr/lib/openfoam/openfoam2106/build/linux64GccDPInt32Opt/applications/swak4Foam/Libraries/swak4FoamParsers/../myflex: No such file or directory
make: *** No rule to make target '/usr/lib/openfoam/openfoam2106/build/linux64GccDPInt32Opt/applications/swak4Foam/Libraries/swak4FoamParsers/../myflex'. Stop.
wmake error: file '/usr/lib/openfoam/openfoam2106/build/linux64GccDPInt32Opt/applications/swak4Foam/Libraries/swak4FoamParsers/sourceFiles' could not be created in /usr/lib/openfoam/openfoam2106/applications/swak4Foam/Libraries/swak4FoamParsers
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

night-hawk January 8, 2022 07:51

You are trying to write in /usr/lib/openfoam which is not writable without root.


Try this

mkdir -p $FOAM_RUN


then execute Allwmake script

taizi January 18, 2022 07:53

Quote:

Originally Posted by dewey (Post 811370)
Could you solve it?

you can run code in Ubuntu-20.04LTS:
sudo apt-get install python-is-python3


All times are GMT -4. The time now is 18:02.