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

Unable to load lib file: "undefined symbol"

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 1 Post By wyldckat
  • 1 Post By dancfd
  • 2 Post By ancolli

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 25, 2010, 10:50
Default Unable to load lib file: "undefined symbol"
  #1
Member
 
Join Date: May 2009
Posts: 54
Rep Power: 17
gfilip is on a distinguished road
Hello everyone,

I am trying to add a new dynamicFvMesh type in 1.6.x. I have compiled the source with wmake libso, with no errors and the .so file is placed inside the $FOAM_USER_LIBBIN directory.

I have added the library into my controlDict, but upon execution of the solver (pimpleDyMFoam), I receive the following warning and error:

Code:
--> FOAM Warning : 
    From function dlLibraryTable::open(const fileName& functionLibName)
    in file db/dlLibraryTable/dlLibraryTable.C at line 79
    could not load /home/greg/OpenFOAM/greg-1.6.x/lib/linuxGccDPOpt/libmyVivFvMesh.so: undefined symbol: _ZTVN4Foam22mySinkTrimMotionFvMeshE
Create mesh for time = 0

Selecting dynamicFvMesh mySinkTrimMotionFvMesh


--> FOAM FATAL ERROR: 
Unknown dynamicFvMesh type mySinkTrimMotionFvMesh
I have attempted this with both 1.5.x and 1.6.x, and with both, I obtain the same warning and error. Any ideas?


Thanks,


-Greg
gfilip is offline   Reply With Quote

Old   March 25, 2010, 19:14
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Greg,

I don't have experience in building additional libraries for OpenFOAM, but I have dealt with a lot of missing symbols when trying to cross-compile OpenFOAM in Linux to run in Windows.

If you said on which code you based your new dynamicFvMesh, it would be a bit more easier for me to estimate where exactly you haven't defined the class "Foam::mySinkTrimMotionFvMesh", which dlLibraryTable complains about. That should be something like:
Code:
namespace Foam
{
class mySinkTrimMotionFvMesh : public dynamicFvMesh
{
And so forth in the H file (not sure about the public dynamicFvMesh bit), and in the C part:
Code:
Foam::mySinkTrimMotionFvMesh( variables_necessary_here )
{
At the very least, the library should be properly loaded now, but will likely croak somewhere else Like I said, with an example library to base myself on, this is what I can estimate.

Best regards,
Bruno

PS: shouldn't you have posted this question on this (OpenFOAM Programming and Development) part of the OpenFOAM forum?
calf.Z likes this.
wyldckat is offline   Reply With Quote

Old   March 31, 2010, 11:51
Default
  #3
Member
 
Join Date: May 2009
Posts: 54
Rep Power: 17
gfilip is on a distinguished road
Hi Bruno,

Thank you for your help. I managed to resolve my issue, and you are right, I should have posted in the programming section of the forum. Sorry about that.


-Greg
gfilip is offline   Reply With Quote

Old   August 29, 2010, 12:05
Default
  #4
Senior Member
 
Daniel
Join Date: Jul 2009
Location: Montreal, Canada
Posts: 156
Rep Power: 17
dancfd is on a distinguished road
Hi Greg,

How did you resolve your issue? I am receiving a similar error when I run blockMesh and paraFoam:

Code:
--> FOAM Warning : 
    From function dlLibraryTable::open(const fileName& functionLibName)
    in file db/dlLibraryTable/dlLibraryTable.C at line 78
    could not load /home/dan/OpenFOAM/dan-1.7.0/lib/linux64GccDPOpt/libfvMotionNewSolvers.so: undefined symbol: _ZTIN4Foam17motionDiffusivityE
Thank you,

Dan
Mahmoud Abbaszadeh likes this.
dancfd is offline   Reply With Quote

Old   August 30, 2010, 05:40
Default
  #5
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by dancfd View Post
Hi Greg,

How did you resolve your issue? I am receiving a similar error when I run blockMesh and paraFoam:

Code:
--> FOAM Warning : 
    From function dlLibraryTable::open(const fileName& functionLibName)
    in file db/dlLibraryTable/dlLibraryTable.C at line 78
    could not load /home/dan/OpenFOAM/dan-1.7.0/lib/linux64GccDPOpt/libfvMotionNewSolvers.so: undefined symbol: _ZTIN4Foam17motionDiffusivityE
Thank you,

Dan
It's only a warning, so you should be fine (the solver will hopefully provide the missing symbol). If it bothers you go to system/controlDict and comment out the libs-entry for running these utilities
gschaider is offline   Reply With Quote

Old   August 31, 2010, 22:52
Default
  #6
Senior Member
 
Daniel
Join Date: Jul 2009
Location: Montreal, Canada
Posts: 156
Rep Power: 17
dancfd is on a distinguished road
Thank you, Bernhard!
dancfd is offline   Reply With Quote

Old   January 11, 2019, 11:40
Default
  #7
Senior Member
 
Alejandro
Join Date: Jan 2014
Location: Argentina
Posts: 128
Rep Power: 12
ancolli is on a distinguished road
I know that is a really old post... I am having a similar problem. With paraview 4.4 is just giving a warning, not loading the library, that is ok, i can continue...

Code:
--> FOAM Warning : 
    From function dlLibraryTable::open(const fileName& functionLibName)
    in file db/dlLibraryTable/dlLibraryTable.C at line 124
    could not load libregionCoupledSolidFluid.so:...
but with newer versions it is crashing, giving me the following error:

Code:
I/O    : uncollated
/opt/paraviewopenfoam56/lib/paraview: symbol lookup error: /home/nicolas/OpenFOAM/nicolas-dev/platforms/linux64GccDPInt32Opt/lib/libregionCoupledSolidFluid.so: undefined symbol: _ZN4Foam22temperatureCoupledBaseC2ERKNS_7fvPatchERKNS_10dictionaryE
Do you know how should I proceed to solve the error?
ancolli is offline   Reply With Quote

Old   January 11, 2019, 12:20
Default
  #8
Senior Member
 
Alejandro
Join Date: Jan 2014
Location: Argentina
Posts: 128
Rep Power: 12
ancolli is on a distinguished road
Solved. It was just a missing library that i found by doing:

Code:
grep "_ZN4Foam22temperatureCoupledBaseC2ERKNS_7fvPatchERKNS_10dictionaryE" $FOAM_LIBBIN/*.so
Thanks to this post: ParaFoam or Praview segmentation fault only when I have a lib linked in controlDict
wyldckat and crubio.abujas like this.
ancolli is offline   Reply With Quote

Old   May 26, 2022, 08:48
Default
  #9
Member
 
Mahmoud
Join Date: Nov 2020
Location: United Kingdom
Posts: 43
Rep Power: 6
Mahmoud Abbaszadeh is on a distinguished road
Quote:
Originally Posted by gschaider View Post
It's only a warning, so you should be fine (the solver will hopefully provide the missing symbol). If it bothers you go to system/controlDict and comment out the libs-entry for running these utilities
Hi,

this did not work for me
Mahmoud Abbaszadeh is offline   Reply With Quote

Reply


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
[Gmsh] Compiling gmshFoam with OpenFOAM-1.5 BlGene OpenFOAM Meshing & Mesh Conversion 10 August 6, 2009 05:26
[OpenFOAM] ParaView 33 canbt open OpenFoam file hariya03 ParaView 7 September 25, 2008 18:33
gcc and executable file from Mac to Linux simone Marras Main CFD Forum 0 April 8, 2007 16:49
Results saving in CFD hawk Main CFD Forum 16 July 21, 2005 21:51
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 16:16


All times are GMT -4. The time now is 19:17.