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] swak4Foam 0.4.2 with foam-extend-4.1 Installation Issue (https://www.cfd-online.com/Forums/openfoam-community-contributions/217076-swak4foam-0-4-2-foam-extend-4-1-installation-issue.html)

treem22 April 29, 2019 10:54

swak4Foam 0.4.2 with foam-extend-4.1 Installation Issue
 
1 Attachment(s)
I'm attempting to install swak4Foam 0.4.2 with foam-extend-4.1 and am running into compilation errors. I'm attempting install on the following linux release:

Code:

LSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: Scientific
Description:    Scientific Linux release 7.6 (Nitrogen)
Release:        7.6
Codename:      Nitrogen

I following the instructions on the wiki to install foam-extend-4.1, which was required to get me working with solids4foam. Everything seems in order with both foam-extend-4.1 and solids4foam, I just can't seem to seamlessly add swak4Foam on top of everything.

A log.make file is attached from me attempting to run ./Allwmake within the /ThirdParty/rpmBuild/BUILD/swak4Foam-0.4.2 directory.

It appears I just missed a small issue: https://www.cfd-online.com/Forums/op...omilation.html. Maybe this is the reason the log.make file is reporting that I actually have swak4Foam-0.4.1? I don't care between these two versions. I just want something that works.

Any help is most appreciated!

wyldckat April 29, 2019 20:41

Quick answer: Looks like the wrong swak4Foam version was checked out... try:
Code:

cd $WM_THIRD_PARTY_DIR
cd rpmBuild/BUILD/swak4Foam-0.4.2
./Allwclean
hg update --clean .
hg checkout version_0.4.2_v2.x
./Allwmake > log.make 2>&1
./Allwmake > log.make.2nd  2>&1

I doubt very much that swak4Foam 0.4.1 will work with foam-extend 4.1.

And this is assuming that Mercurial is installed and is what you're using...

treem22 April 29, 2019 23:23

2 Attachment(s)
wyldckat,

Can't thank you enough for your ever-present, prompt responses.

I am not able to use hg. I'm not system admin, and it's not installed on my system. So, I was using svn. Digging a bit deeping on sourceforge, I learned that svn only allows me up to version 0.4.1. So, without the ability to clone into the repo directly through hg, I downloaded the latest commit from sourceforge via a .zip file (https://sourceforge.net/p/openfoam-e.../0.4.2/~/tree/).

I blew away my old swak4foam-0.4.2 directory and replaced it with the unzipped version of this zip file. I then renamed that directory to swak4foam-0.4.2_v2.x. From here I ran an ./Allwclean, and then proceeded with an ./Allwmake. I tried to soft link swakConfiguration.automatic to see if I could get lucky, but from the log.make file it doesn't appear that it worked.

From the rest of the log.make and log.make.2nd files, it appears everything should be in order, correct? If so, all that's left is to test out one of the examples.

Thanks again!

wyldckat April 30, 2019 19:07

Quick answer: You're welcome, nice that you went with the ZIP package and that everything is looking good!

The second log file tells us that everything is (mostly) just fine... it's just that the Python based features will not work, but that's rarely used anyway ;)

If by any chance you do need Python support to use with swak4Foam... then we might have to do some custom builds of Python or you will have to ask your administrator to install a complete Python installation... although Python is likely accessible with a module load command... try running:
Code:

module avail
to get a list of available modules... perhaps Python and Mercurial were in the list...

sphani4391 January 21, 2020 23:07

wyldckat,


Thanks a lot for this. I'm new to Ubuntu and wanted to know what the characters 2>&1 mean in the command:
./Allwmake > log.make 2>&1
I know that > log.make writes the terminal output to log.make file but what's the utility of writing 2>&1 after that?

Светлана January 21, 2020 23:38

I believe it redirects stderr to stdout. This way log.make contains both the standard output and the error messages.

stderr is 2 and stdout is 1.

Please see for more information and context:
Wikipedia - Redirection (computing)

Bana May 9, 2022 08:05

Hello All,

I have difficulty compiling swak4foam on foam-extend-4.1-20200408. I have tried both mercurial package installation and also from swak4foam repository.

I am facing errors like these:

PHP Code:

./RawFoamDictionaryParser.yyIn function ‘parserRawDict::RawFoamDictionaryParser::symbol_type parserRawDict::yylex(Foam::RawFoamDictionaryParserDriver&):
../
RawFoamDictionaryParser.yy:455:21error‘FATALERROR’ is not a member of ‘Foam::token’ 

PHP Code:

repositories/SurfacesRepository.CAt global scope:
repositories/SurfacesRepository.C:44:9error‘Foam::surfaceWriter’ is not a template
   44 
typedef surfaceWriter<scalarscalarSurfaceWriter

PHP Code:

repositories/MeshesRepository.CIn member function ‘Foam::scalar Foam::MeshesRepository::setTime(const Foam::word&, Foam::scalarFoam::label):
repositories/MeshesRepository.C:302:59errorno matching function for call to ‘Foam::HashTable<const Foam::regIOobject*>::HashTable(Foam::HashTable<Foam::regIOobject*>)
  302 
|         regIOTable content(mesh.lookupClass<regIOobject>()); 

PHP Code:

plugins/CommonPluginFunction.C:198:26error‘stream’ was not declared in this scopedid you mean ‘std::io_errc::stream’?
  
198 |             return label(stream().tellg()); 

PHP Code:

CommonValueExpressionDriver.CIn member function ‘void Foam::CommonValueExpressionDriver::readPluginLibraries(const Foam::dictionary&):
CommonValueExpressionDriver.C:212:78errorcannot call member function ‘bool Foam::dlLibraryTable::open(const Foam::fileName&, bool)’ without object
  212 
|             dlLibraryTable::open("libswak"+pluginNames[i]+"FunctionPlugin.so"); 

Is there a way to get rid of these errors?
What should I try?


Regards,
Mohammadreza


All times are GMT -4. The time now is 05:08.