CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Compilation with Debug switch fails

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 8, 2020, 16:59
Default Compilation with Debug switch fails
  #1
New Member
 
Mustafa
Join Date: Jun 2015
Location: Aachen
Posts: 26
Rep Power: 10
stamufa is on a distinguished road
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?
stamufa is offline   Reply With Quote

Old   June 18, 2020, 10:44
Default
  #2
New Member
 
Anik Mazumder
Join Date: May 2017
Posts: 9
Rep Power: 8
anikm is on a distinguished road
Have you found any solution? I am also stuck at this problem
anikm is offline   Reply With Quote

Old   June 21, 2020, 10:27
Default
  #3
New Member
 
Join Date: Oct 2014
Posts: 5
Rep Power: 11
prartcor is on a distinguished road
same problem here.
does anyone know what the solution is?
prartcor is offline   Reply With Quote

Old   June 21, 2020, 10:34
Default
  #4
New Member
 
Anik Mazumder
Join Date: May 2017
Posts: 9
Rep Power: 8
anikm is on a distinguished road
No, I have not found anything yet. Kindly share if you find any solution
anikm is offline   Reply With Quote

Old   June 21, 2020, 10:50
Default
  #5
New Member
 
Mustafa
Join Date: Jun 2015
Location: Aachen
Posts: 26
Rep Power: 10
stamufa is on a distinguished road
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
stamufa is offline   Reply With Quote

Old   June 21, 2020, 11:09
Default
  #6
New Member
 
Anik Mazumder
Join Date: May 2017
Posts: 9
Rep Power: 8
anikm is on a distinguished road
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
anikm is offline   Reply With Quote

Old   June 21, 2020, 11:11
Default
  #7
New Member
 
Mustafa
Join Date: Jun 2015
Location: Aachen
Posts: 26
Rep Power: 10
stamufa is on a distinguished road
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
stamufa is offline   Reply With Quote

Old   June 21, 2020, 11:21
Default
  #8
New Member
 
Anik Mazumder
Join Date: May 2017
Posts: 9
Rep Power: 8
anikm is on a distinguished road
Thanks a lot Mustafa, I was looking in the wrong location. After changing the sortToc to sortedToc, it works fine
anikm is offline   Reply With Quote

Old   June 22, 2020, 07:39
Default
  #9
New Member
 
Anik Mazumder
Join Date: May 2017
Posts: 9
Rep Power: 8
anikm is on a distinguished road
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?
anikm is offline   Reply With Quote

Old   June 22, 2020, 09:43
Default
  #10
New Member
 
Mustafa
Join Date: Jun 2015
Location: Aachen
Posts: 26
Rep Power: 10
stamufa is on a distinguished road
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
stamufa is offline   Reply With Quote

Old   June 22, 2020, 10:11
Default
  #11
New Member
 
Anik Mazumder
Join Date: May 2017
Posts: 9
Rep Power: 8
anikm is on a distinguished road
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
anikm is offline   Reply With Quote

Reply

Tags
debugswitch, openfoam 1912


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[General] Extracting ParaView Data into Python Arrays Jeffzda ParaView 30 November 6, 2023 21:00
Finding the corresponding debug switch Tobi OpenFOAM Programming & Development 8 October 14, 2020 09:23
Recursive output of Foam::word in gdb print command chengdi OpenFOAM Programming & Development 1 July 19, 2017 20:19
[swak4Foam] segmentation faults when using the debug switch "ExpressionResult" Astrodan OpenFOAM Running, Solving & CFD 1 February 21, 2016 16:29
Modified interFoam compilation fails voingiappone OpenFOAM Programming & Development 6 October 1, 2013 03:47


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