|
[Sponsors] |
June 8, 2020, 17:59 |
Compilation with Debug switch fails
|
#1 |
New Member
Mustafa
Join Date: Jun 2015
Location: Aachen
Posts: 26
Rep Power: 11 |
I have a working Opt build of OpenFOAM 19.12 on my WSL2 (Ubuntu 18.04). I tried compiling a version with the debug switch on and I get the following error message during the build:
Code:
expressions/exprResult/exprResultGlobals.C:206:58: error: ‘const class Foam::HashTable<Foam::expressions::exprResultGlobals::Table>’ has no member named ‘sortToc’; did you mean ‘sortedToc’? << "Known global scopes: " << variables_.sortToc() << nl; ^~~~~~~ /opt/OpenFOAM/OpenFOAM-v1912/wmake/rules/General/transform:34: recipe for target '/opt/OpenFOAM/OpenFOAM-v1912/build/linux64Gcc63DPInt32Debug/src/OpenFOAM/expressions/exprResult/exprResultGlobals.o' failed make: *** [/opt/OpenFOAM/OpenFOAM-v1912/build/linux64Gcc63DPInt32Debug/src/OpenFOAM/expressions/exprResult/exprResultGlobals.o] Error 1 Anyone with a similar issue/ known bug? |
|
June 18, 2020, 11:44 |
|
#2 |
New Member
Anik Mazumder
Join Date: May 2017
Posts: 9
Rep Power: 9 |
Have you found any solution? I am also stuck at this problem
|
|
June 21, 2020, 11:27 |
|
#3 |
New Member
Join Date: Oct 2014
Posts: 5
Rep Power: 12 |
same problem here.
does anyone know what the solution is? |
|
June 21, 2020, 11:34 |
|
#4 |
New Member
Anik Mazumder
Join Date: May 2017
Posts: 9
Rep Power: 9 |
No, I have not found anything yet. Kindly share if you find any solution
|
|
June 21, 2020, 11:50 |
|
#5 |
New Member
Mustafa
Join Date: Jun 2015
Location: Aachen
Posts: 26
Rep Power: 11 |
Solved it! Just change sortToc to sortedToc in the file where the problem arises. I have root access to my OpenFOAM installation so this worked. You could try a local compile on your home folder if you have the source code and no write access on /opt
|
|
June 21, 2020, 12:09 |
|
#6 |
New Member
Anik Mazumder
Join Date: May 2017
Posts: 9
Rep Power: 9 |
Can you kindly elaborate? I cannot find /OpenFOAM/OpenFOAM-v1912/build/linux64Gcc63DPInt32Debug/src/OpenFOAM/expressions/exprResult/exprResultGlobal.C where I am supposed to make the changes?
Or am I reading this wrong? Where should I make this change? I will be really grateful if you can help |
|
June 21, 2020, 12:11 |
|
#7 |
New Member
Mustafa
Join Date: Jun 2015
Location: Aachen
Posts: 26
Rep Power: 11 |
No - you need to find where sortToc is in the source code. Navigate to $FOAM_SRC and grep -r "sortToc". There should be one file in the result, change it there
|
|
June 21, 2020, 12:21 |
|
#8 |
New Member
Anik Mazumder
Join Date: May 2017
Posts: 9
Rep Power: 9 |
Thanks a lot Mustafa, I was looking in the wrong location. After changing the sortToc to sortedToc, it works fine
|
|
June 22, 2020, 08:39 |
|
#9 |
New Member
Anik Mazumder
Join Date: May 2017
Posts: 9
Rep Power: 9 |
After solving the previous error, Now I am stuck with a new build error which I am pasting here. This occur both in Debug and Opt mode. However, in Opt mode it does not give any trouble.
In Debug mode after compiling when I tried to test "blockMesh", it said blockMesh command is unknown. /home/anik/OpenFOAM/OpenFOAM-v1912/wmake/scripts/wrap-lemon: line 259: m4: command not found m4 stage failed on expressions/fields/fieldExprLemonParser.lyy-m4 Retaining intermediate: /home/anik/OpenFOAM/OpenFOAM-v1912/build/linux64Gcc63DPInt32Debug/src/OpenFOAM/expressions/ fields/fieldExprLemonParser.lyy /home/anik/OpenFOAM/OpenFOAM-v1912/wmake/rules/General/transform:34: recipe for target '/home/anik/OpenFOAM/OpenFOAM-v1912/ build/linux64Gcc63DPInt32Debug/src/OpenFOAM/expressions/fields/fieldExprLemonParser.o' failed make: *** [/home/anik/OpenFOAM/OpenFOAM-v1912/build/linux64Gcc63DPInt32Debug/src/OpenFOAM/expressions/fields/ fieldExprLemonParser.o] Error 1 Can you kindly help me? |
|
June 22, 2020, 10:43 |
|
#10 |
New Member
Mustafa
Join Date: Jun 2015
Location: Aachen
Posts: 26
Rep Power: 11 |
Yes, I can — but you‘ll have to start actually reading the error messages instead of just posting them here
It says there that the command m4 wasn’t found. You just need to do a sudo apt-install m4 to get rid of that |
|
June 22, 2020, 11:11 |
|
#11 |
New Member
Anik Mazumder
Join Date: May 2017
Posts: 9
Rep Power: 9 |
Thank you very much. I actually read it and understood that something related to m4 is the issue. But I did not know that i can do sudo apt install.
Will be more careful next time |
|
Tags |
debugswitch, openfoam 1912 |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[General] Extracting ParaView Data into Python Arrays | Jeffzda | ParaView | 30 | November 6, 2023 22:00 |
Finding the corresponding debug switch | Tobi | OpenFOAM Programming & Development | 8 | October 14, 2020 10:23 |
Recursive output of Foam::word in gdb print command | chengdi | OpenFOAM Programming & Development | 1 | July 19, 2017 21:19 |
[swak4Foam] segmentation faults when using the debug switch "ExpressionResult" | Astrodan | OpenFOAM Running, Solving & CFD | 1 | February 21, 2016 17:29 |
Modified interFoam compilation fails | voingiappone | OpenFOAM Programming & Development | 6 | October 1, 2013 04:47 |