CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   symbol lookup error (http://www.cfd-online.com/Forums/openfoam-programming-development/92455-symbol-lookup-error.html)

mirko September 14, 2011 16:04

symbol lookup error
 
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

marupio September 14, 2011 16:35

Whenever I get weird, inconsistent errors like that, I try recompiling OpenFOAM. That's my shot in the dark.

mbeaudoin September 14, 2011 17:09

Quote:

Originally Posted by mirko (Post 324153)

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

mirko September 14, 2011 17:33

I was wondering what the `U' meant :-) I should have pursued it further.

Mirko

mirko September 15, 2011 13:46

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

sharonyue June 24, 2013 20:00

Quote:

Originally Posted by mirko (Post 324280)
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?

Hisham November 28, 2013 08:37

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

ziemowitzima October 28, 2014 12:18

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


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