CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

symbol lookup error

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   September 14, 2011, 16:04
Default symbol lookup error
  #1
Senior Member
 
Mirko Vukovic
Join Date: Mar 2009
Posts: 159
Rep Power: 8
mirko is on a distinguished road
Hello,

I am developing a boundary condition based on turbulentTemperatureCoupledBaffle and compiling with
Code:
wmake libso
The code compiles, but when I run it, I immediately get the following error:
Code:
multiRegionRadSimpleSolver: symbol lookup error: /opt/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64Gcc45DPOpt/lib/libcoupledDerivedFvPatchFields.so: undefined symbol: 
_ZN4Foam9NamedEnumINS_22temperatureCoupledBase11KMethodTypeELi4EE5namesE
But, when I list the symbols in the library, this symbol is present:
Code:
 nm  /opt/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64Gcc45DPOpt/lib/libcoupledDerivedFvPatchFields.so | grep _ZN4Foam9NamedEnumINS_22temperatureCoupledBase11KMethodTypeELi4EE5namesE
                 U _ZN4Foam9NamedEnumINS_22temperatureCoupledBase11KMethodTypeELi4EE5namesE
Any thoughts on what could be going on here?

Thank you,

Mirko
mirko is offline   Reply With Quote

Old   September 14, 2011, 16:35
Default
  #2
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 397
Rep Power: 12
marupio is on a distinguished road
Whenever I get weird, inconsistent errors like that, I try recompiling OpenFOAM. That's my shot in the dark.
marupio is offline   Reply With Quote

Old   September 14, 2011, 17:09
Default
  #3
Senior Member
 
Martin Beaudoin
Join Date: Mar 2009
Posts: 330
Rep Power: 13
mbeaudoin will become famous soon enough
Quote:
Originally Posted by mirko View Post

But, when I list the symbols in the library, this symbol is present:
Code:
 nm  /opt/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64Gcc45DPOpt/lib/libcoupledDerivedFvPatchFields.so | grep _ZN4Foam9NamedEnumINS_22temperatureCoupledBase11KMethodTypeELi4EE5namesE
                 U _ZN4Foam9NamedEnumINS_22temperatureCoupledBase11KMethodTypeELi4EE5namesE
Your symbol might be present, but it is still undefined in that library.
The capital letter U in front of the symbol stands for Undefined...

'man nm' is your friend here.

Martin
mbeaudoin is offline   Reply With Quote

Old   September 14, 2011, 17:33
Default
  #4
Senior Member
 
Mirko Vukovic
Join Date: Mar 2009
Posts: 159
Rep Power: 8
mirko is on a distinguished road
I was wondering what the `U' meant :-) I should have pursued it further.

Mirko
mirko is offline   Reply With Quote

Old   September 15, 2011, 13:46
Default
  #5
Senior Member
 
Mirko Vukovic
Join Date: Mar 2009
Posts: 159
Rep Power: 8
mirko is on a distinguished road
I think I understand what went wrong: I was overriding an OpenFOAM library with my own incomplete library.

I am adding a boundary condition derived from compressible::turbulentTemperatureCoupledBaffle. In Make/files, I specified as the destination $FOAM_USER_LIBBIN/libcompressibleTurbulenceModel.

Presumably, this prevented the $FOAM_LIBBIN/libcompressibleTurbulenceModel from linking.

Mirko
mirko is offline   Reply With Quote

Old   June 24, 2013, 20:00
Default
  #6
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Torino, Italy
Posts: 674
Rep Power: 8
sharonyue is on a distinguished road
Quote:
Originally Posted by mirko View Post
I think I understand what went wrong: I was overriding an OpenFOAM library with my own incomplete library.

I am adding a boundary condition derived from compressible::turbulentTemperatureCoupledBaffle. In Make/files, I specified as the destination $FOAM_USER_LIBBIN/libcompressibleTurbulenceModel.

Presumably, this prevented the $FOAM_LIBBIN/libcompressibleTurbulenceModel from linking.

Mirko
Dear Mirko,

If it prevented the lib from linking, how to relink it with your own lib?
sharonyue is offline   Reply With Quote

Old   November 28, 2013, 08:37
Default
  #7
Senior Member
 
Hisham's Avatar
 
Hisham El Safti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 247
Blog Entries: 10
Rep Power: 8
Hisham is on a distinguished road
Dear all,

I got a similar error like that today and it went away after fixing an error in the code. The error was forgetting to add the class name before the function name for some reimplemented virtual functions:

void className::functionName()

instead of just:

void functionName()


Hisham
Hisham is offline   Reply With Quote

Old   October 28, 2014, 12:18
Default
  #8
Senior Member
 
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 129
Rep Power: 8
ziemowitzima is on a distinguished road
Dear Mirko,
I now that it was in 2009...
but I have similar problem,
but even more strange...

I developed new BC as well,
but im my case everything run well on one processor, but If I want to run in parallel I got the same error as u had.

running decomposeParDic:

dlopen error : /home/user/OpenFOAM/user-2.3.0/platforms/linux64GccDPOpt/lib/customlibcompressibleTurbulenceModel.so: undefined symbol: _ZN4Foam9NamedEnumINS_22temperatureCoupledBase11KM ethodTypeELi4EE5namesE

any idea ?

thank you
MM
ziemowitzima is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 09:31
OpenFOAM install on Ubuntu Natty 11.04 bkubicek OpenFOAM 13 May 26, 2011 05:48
How to install CGNS under windows xp? lzgwhy Main CFD Forum 1 January 11, 2011 19:44
Installation of Netgen in SuSE Linux 92 edvardsenpriv Open Source Meshers: Gmsh, Netgen, CGNS, ... 23 January 16, 2009 07:12
user defined function cfduser CFX 0 April 29, 2006 10:58


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