|
[Sponsors] |
April 12, 2012, 13:10 |
|
#61 |
Member
Join Date: Feb 2012
Posts: 35
Rep Power: 14 |
Thank you, Bruno! It worked finally!
Now I just have to understand well how to manage the debugging in a proper way...but, anyway, the most difficult part hope to have left behind. Bye for now! Matteo |
|
April 28, 2012, 17:56 |
|
#62 |
Member
Santiago
Join Date: Dec 2009
Posts: 85
Rep Power: 16 |
Bruno you may know the answer to my problem:
I have OF-1.6-ext in my system after installing it using the Synaptic manager so I guess this is a precompiled version. Now, I need to use Eclipse for debugging of some of my applications and for that reason I need to have OF-1.6-ext in debug mode. At least that is what I understood from the tutorial. So it seems to me that I need to recompile OF-1.6-ext. Is it possible to do this using the installed version that I mentioned before?? When I run my case form eclipse I see the progress of the simulation but I cannot see any of the variable or insert any breakpoints and for what I understand that is due to the fact that my version of OF is not compiled in debug mode... Any suggestions will be appreciated. Thanks |
|
April 28, 2012, 18:11 |
|
#63 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi Santiago,
Whether you like it or not, you better install 1.6-ext from source and then switch to debug mode. I'm advising you this because I suspect that the packages supplied in deb format don't fully provide everything necessary for building it in debug mode Good luck! Bruno
__________________
|
|
April 28, 2012, 22:57 |
|
#64 |
Member
Santiago
Join Date: Dec 2009
Posts: 85
Rep Power: 16 |
Thanks Bruno. I will try that. Where can I download the sources to build 1.6-ext.? I just want to make sure that I have the correct source files before I try to build this. Thanks
|
|
April 29, 2012, 06:53 |
|
#65 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi Santiago,
I wish you very good luck... the instructions I know of, but never have used myself, are these: http://www.extend-project.de/user-fo...n-openfoam#276 Best regards, Bruno
__________________
|
|
May 9, 2012, 13:11 |
|
#66 |
Senior Member
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 19 |
Hi, I just got Eclipse mostly working on my mac and I think it is very helpful.
There were a couple of things that I had to do to get it working on my macbook though because eclipse was having problems finding wclean/wmake. Instructions to fix it can be found here, but basically what you have to do is: 1. (Note: I'm using the binary version of OpenFOAM 1.6-ext on my mac) Make a shell script called eclipse.sh that sources the bashrc script and then starts eclipse. Something like this (the locations of the .dmg file and bashrc are specific to my system): Code:
#!/bin/sh hdiutil mount ~/OpenFOAM-1.6-ext-swak-Feb4.dmg source ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc logger "`dirname \"$0\"`/eclipse" exec "`dirname \"$0\"`/eclipse" $@ 3. Edit the file /Applications/eclipse/Eclipse.app/Contents/Info.plist and underneath "CFBundleExecutable" replace "eclipse" with "eclipse.sh" 4. Now you can just launch eclipse from the Finder the normal way. So, now on to my problem : My solvers compile without any problem and eclipse can find all of the included files, but I'm getting a lot of flags warning of problems like "Type 'scalar' could not be resolved" and "Symbol 'runTime' could not be resolved". An example of what I mean is in the screen shot that I attached. This is more of an annoyance since the compile still works but is there a way to fix these things? |
|
June 1, 2012, 06:55 |
|
#67 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
hi all,
i set up my eclipse for development. I did everything mentioned in the wiki but there is still one problem: If I have a library and added a header-file of an other library there is the message Code:
unresolved inclusion I can compile the library without a error and everything works very fine but at least I wanna have a code without a underlined line Hope that you understand my question. tobi FIXED Last edited by Tobi; June 1, 2012 at 08:00. |
|
June 1, 2012, 08:15 |
|
#68 |
Senior Member
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 21 |
__________________
~roman |
|
June 1, 2012, 09:28 |
|
#69 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Well,
I looked into the project folders in eclipse. There is the folder called lnInclude with all included links. I saw that my include file was not correct written and one of the c++ project I renamed from "common" to "libCommon". So the path was wrong to. After delete it and recreate the link everything works fine. Tobi |
|
June 2, 2012, 11:39 |
|
#70 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
hi,
well i have a question to you! I imported icoFoam but eclipse do not know what the functions are! Included /src/OpenFOAM/lnInclude and /src/finiteVolume/lnInclude What do i wrong? Do I use OF in Debugversion? for that Tobi Last edited by Tobi; June 2, 2012 at 12:10. |
|
June 2, 2012, 18:47 |
|
#71 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi Tobi,
By what I can read from the error message on the picture you attached, you forgot to configure the project to use wmake instead of make. Best regards, Bruno
__________________
|
|
June 2, 2012, 18:55 |
|
#72 | |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Quote:
The only thing is the underlinded funktions like .time() or so on. Eclipse don't know those functions so i thought there is a lnInclude folder missing? |
||
July 10, 2012, 05:59 |
Symbols in header files cannot be resolved
|
#73 |
Senior Member
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18 |
Hi Tobi
Did you succeed with this annoying include problem? With Ubuntu 10.04 everything was fine. Now I switched to Ununtu 12.04 and Eclipse Indigo and I face the same problem you did before. With a clean install of Eclipse and OF-2.1.x all symbols in header files cannot be resolved. However, compilation works fluently. Any solution? Thanks and best wishes Fabian |
|
July 30, 2012, 06:28 |
GDB version used
|
#75 |
New Member
Victor
Join Date: Jul 2012
Location: Moscow
Posts: 2
Rep Power: 0 |
Does anybody use GDB-7.x ?
Or GBD-6.8 is the right version only? |
|
August 1, 2012, 07:43 |
About lnInclude and #includes
|
#76 | |
New Member
Ivo
Join Date: Feb 2012
Posts: 26
Rep Power: 14 |
Quote:
Something I noticed to be missing on the OpenFOAM-Eclipse-wiki is that you should also include any lnInclude directories in the Make/options file (just to make sure that each _real_ header file is actually found, not just those in src/finiteVolume/lnInclude and src/OpenFOAM/lnInclude. For instance, if you're using interFoam, you want to include OpenFOAM/OpenFOAM-2.1.0/src/transportModels/incompressible/lnInclude OpenFOAM/OpenFOAM-2.1.0/src/transportModels/interfaceProperties/lnInclude OpenFOAM/OpenFOAM-2.1.0/src/turbulenceModels/incompressible/turbulenceModel (perhaps obvious, I'm mentioning it anyway ) Now I have another problem; I followed the OF-into-Eclipse wiki but it doesn't compile my interFoam-like solver in Eclipse Juno (latest version as of now). Instead, it gives me some error messages about 'Invoking autoreconf in build directory' and so on, but I couldn't figure out how to disable autoreconf - it seems to be an integral part of the IDE. Apparently, it stops when it encounters the autoconf errors and doesn't even start with invoking wmake. |
||
October 23, 2012, 12:35 |
Underlined classes and methods?
|
#77 |
Member
Kasra
Join Date: Jun 2010
Location: USA
Posts: 44
Rep Power: 16 |
Hi all,
I did include the other lninclude directories as in the Make/options of the solver (e.g. simpleFoam) in Path and Symbols but I still get underlined functions and "Symbol ... could not be resolved" when I hover mouse on a function like runtime. I can compile and build the project with no problem though. |
|
November 7, 2012, 08:23 |
|
#79 |
New Member
Alessandro Mogavero
Join Date: Nov 2012
Location: Glasgow
Posts: 15
Rep Power: 14 |
Hi all,
I am trying to manage openFoam source code with eclipse. Following the guide provided on this web site and this tread finally I got it work for the run configuration. It worked also for the debug mode, but I was able just to stop in the main function without getting any information on the variables. Moreover I was not able to go foreword. Then reading this tread again I understood that there is a bug in gdb 7x with eclipse, so I downgraded it to the version 6.8. Now I've actually got some information on the variables, but I've soon got the following error: Code:
BFD: /lib/x86_64-linux-gnu/libm.so.6: invalid relocation type 37 BFD: BFD (GNU Binutils) 2.18.50.20080226 assertion fail /build/buildd/gdb-6.8/bfd/elf64-x86-64.c:278 BFD: /lib/x86_64-linux-gnu/libm.so.6: invalid relocation type 37 BFD: BFD (GNU Binutils) 2.18.50.20080226 assertion fail /build/buildd/gdb-6.8/bfd/elf64-x86-64.c:278 BFD: /lib/x86_64-linux-gnu/libm.so.6: invalid relocation type 37 BFD: BFD (GNU Binutils) 2.18.50.20080226 assertion fail /build/buildd/gdb-6.8/bfd/elf64-x86-64.c:278 BFD: /lib/x86_64-linux-gnu/libm.so.6: invalid relocation type 37 BFD: BFD (GNU Binutils) 2.18.50.20080226 assertion fail /build/buildd/gdb-6.8/bfd/elf64-x86-64.c:278 BFD: /lib/x86_64-linux-gnu/libm.so.6: invalid relocation type 37 BFD: BFD (GNU Binutils) 2.18.50.20080226 assertion fail /build/buildd/gdb-6.8/bfd/elf64-x86-64.c:278 BFD: /lib/x86_64-linux-gnu/libm.so.6: invalid relocation type 37 BFD: BFD (GNU Binutils) 2.18.50.20080226 assertion fail /build/buildd/gdb-6.8/bfd/elf64-x86-64.c:278 BFD: /lib/x86_64-linux-gnu/libm.so.6: invalid relocation type 37 BFD: BFD (GNU Binutils) 2.18.50.20080226 assertion fail /build/buildd/gdb-6.8/bfd/elf64-x86-64.c:278 BFD: /lib/x86_64-linux-gnu/libm.so.6: invalid relocation type 37 BFD: BFD (GNU Binutils) 2.18.50.20080226 assertion fail /build/buildd/gdb-6.8/bfd/elf64-x86-64.c:278 BFD: /lib/x86_64-linux-gnu/libm.so.6: invalid relocation type 37 BFD: BFD (GNU Binutils) 2.18.50.20080226 assertion fail /build/buildd/gdb-6.8/bfd/elf64-x86-64.c:278 BFD: /lib/x86_64-linux-gnu/libm.so.6: invalid relocation type 37 BFD: BFD (GNU Binutils) 2.18.50.20080226 assertion fail /build/buildd/gdb-6.8/bfd/elf64-x86-64.c:278 BFD: /lib/x86_64-linux-gnu/libm.so.6: invalid relocation type 37 BFD: BFD (GNU Binutils) 2.18.50.20080226 assertion fail /build/buildd/gdb-6.8/bfd/elf64-x86-64.c:278 BFD: /lib/x86_64-linux-gnu/libm.so.6: invalid relocation type 37 BFD: BFD (GNU Binutils) 2.18.50.20080226 assertion fail /build/buildd/gdb-6.8/bfd/elf64-x86-64.c:278 BFD: /lib/x86_64-linux-gnu/libc.so.6: invalid relocation type 37 BFD: BFD (GNU Binutils) 2.18.50.20080226 assertion fail /build/buildd/gdb-6.8/bfd/elf64-x86-64.c:278 BFD: /lib/x86_64-linux-gnu/libc.so.6: invalid relocation type 37 BFD: BFD (GNU Binutils) 2.18.50.20080226 assertion fail /build/buildd/gdb-6.8/bfd/elf64-x86-64.c:278 BFD: /lib/x86_64-linux-gnu/libc.so.6: invalid relocation type 37 BFD: BFD (GNU Binutils) 2.18.50.20080226 assertion fail /build/buildd/gdb-6.8/bfd/elf64-x86-64.c:278 BFD: /lib/x86_64-linux-gnu/libc.so.6: invalid relocation type 37 BFD: BFD (GNU Binutils) 2.18.50.20080226 assertion fail /build/buildd/gdb-6.8/bfd/elf64-x86-64.c:278 BFD: /lib/x86_64-linux-gnu/libc.so.6: invalid relocation type 37 BFD: BFD (GNU Binutils) 2.18.50.20080226 assertion fail /build/buildd/gdb-6.8/bfd/elf64-x86-64.c:278 [Thread debugging using libthread_db enabled] [New Thread 0x7f55bd0ed740 (LWP 4854)] [Switching to Thread 0x7f55bd0ed740 (LWP 4854)] Cannot access memory at address 0x4008000000000000 Single stepping until exit from function main, Invalid binary operation on numbers. which has no line number information. Of course I build the source in Debug mode. Thank you for any suggestion |
|
November 7, 2012, 10:25 |
|
#80 |
New Member
Alessandro Mogavero
Join Date: Nov 2012
Location: Glasgow
Posts: 15
Rep Power: 14 |
Updating...
I tried to debug a simple Hello world program with gdb 6.8 and I've got the same error, then I switched back to gdb 7.x and the Hello world program worked very well! Thus I believe that it is not an issue of gdb, but may be an issue related with how wmake build openFoam. Indeed I built the Hello world program using the default builder of Eclipse. I guess that gdb miss some files due to the fact that wmake place them in some unrecognised folder. Anyone can give me a feedback about this? |
|
|
|