|
[Sponsors] |
March 29, 2013, 07:22 |
error libswakPythonIntegration
|
#1 |
Senior Member
Eelco van Vliet
Join Date: Mar 2009
Location: The Netherlands
Posts: 124
Rep Power: 19 |
Hi All,
I just installed OF 2.2.0 and the latest swak4foam version from the tar ball Swak4Foam_2.x_release_0.2.3 Compilation went like a charm, and swak4foam seems to ok except for one issue: when using the libswakPythonIntegration.so library I got an message Code:
--> FOAM Warning : From function dlOpen(const fileName&, const bool) in file POSIX.C at line 1179 dlopen error : /home/eelco/OpenFOAM/eelco-2.2.x/platforms/linux64GccDPOpt/lib/libswakPythonIntegration.so: undefined symbol: PyFunction_Type --> FOAM Warning : From function dlLibraryTable::open(const fileName&, const bool) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99 could not load "libswakPythonIntegration.so" I have set the environment variables Code:
export SWAK4FOAM_SRC="$WM_PROJECT_SITE_DIR/swak4foam/Swak4Foam_2.x_release_0.2.3/Libraries" export SWAK_PYTHON_INCLUDE="-I/usr/include/python2.7" export SWAK_PYTHON_LINK="-L/usr/lib/python2.7 -lpython2.7 Any idea what could be wrong? Any hints appreciated! Regards Eelco |
|
April 5, 2013, 13:59 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
One more thing: is you system 64 bit and maybe you want to link to "/usr/lib64/python2.7" (but your milage may vary). Another possibility. Do grep PyFunction_Type /usr/lib/python2.7/*.so and if additional libraries pop up try adding them to SWAK_PYTHON_LINK
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
April 19, 2013, 11:36 |
Link swak4foam 0.2.3
|
#3 |
New Member
Becker
Join Date: Apr 2012
Posts: 3
Rep Power: 14 |
The links on http://openfoamwiki.net/index.php/Co...am#Downloading do not work at the moment.
Can you post a link for swak4foam 0.2.3 (for OF 2.2.0) ? |
|
April 19, 2013, 15:17 |
|
#4 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Sorry for being sarcastic, but people keep asking for this on almost a daily basis when the solution is looking straight in their eye
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
September 11, 2013, 18:16 |
|
#5 | |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21 |
I got the same error if I forgot to add -lpython2.7 (or actually -lpython2.6 in my case) to SWAK_PYTHON_LINK. But I guess you can drop the -L/usr/lib/python2.7 because the libpython2.7.so.* files are stored in /usr/lib (or /usr/lib on a 64bit machine) which is used automatically.
Quote:
|
||
October 20, 2013, 07:18 |
|
#6 |
Member
Join Date: Mar 2009
Posts: 90
Rep Power: 17 |
Code:
--> FOAM Warning : From function dlOpen(const fileName&, const bool) in file POSIX.C at line 1179 dlopen error : libsimpleSwakFunctionObjects.so: cannot open shared object file: No such file or directory --> FOAM Warning : From function dlLibraryTable::open(const fileName&, const bool) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99 could not load "libsimpleSwakFunctionObjects.so" --> FOAM Warning : From function dlOpen(const fileName&, const bool) in file POSIX.C at line 1179 dlopen error : libswakFunctionObjects.so: cannot open shared object file: No such file or directory --> FOAM Warning : From function dlLibraryTable::open(const fileName&, const bool) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99 could not load "libswakFunctionObjects.so" --> FOAM Warning : From function dlOpen(const fileName&, const bool) in file POSIX.C at line 1179 dlopen error : libswakPythonIntegration.so: cannot open shared object file: No such file or directory --> FOAM Warning : From function dlLibraryTable::open(const fileName&, const bool) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99 could not load "libswakPythonIntegration.so" 1.) these files are actually in /root/OpenFOAM/root-2.2.x. Is there a way to control where they are placed? I would like to have everything together in /usr/local/OpenFOAM 2.) How can I get openfoam to see the .so files? I believe I have the environment variables from the first post correctly set... Code:
$SWAK_PYTHON_LINK bash: /usr/lib/python2.7: Is a directory $SWAK_PYTHON_INCLUDE bash: /usr/include/python2.7: Is a directory $SWAK4FOAM_SRC bash: /usr/local/OpenFOAM/swak4Foam_2.x/Libraries: Is a directory I don't even know if that's correct, but I tried using the following line from the first post, but $WM_PROJECT_SITE_DIR does not exist, and I don't see it defined in OpenFOAM/etc/bash_rc or anywhere else. Code:
export SWAK4FOAM_SRC="$WM_PROJECT_SITE_DIR/swak4foam/Swak4Foam_2.x_release_0.2.3/Libraries" |
|
October 20, 2013, 07:39 |
|
#7 | ||||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Quote:
Quote:
Quote:
Start from the beginning: create a swakConfiguration file that reflects your setup (from the examples in the sources). Recompile swak as yourself (not root) and the python-integration should work
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|||||
October 24, 2013, 06:06 |
|
#8 | |
Member
Join Date: Mar 2009
Posts: 90
Rep Power: 17 |
Quote:
|
||
October 24, 2013, 06:49 |
|
#9 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
The thing is that as soon as people start compiling their own copy of swak because "I need this feature from the development version" they might experience problems (because they might get libraries from different swak-versions). But if you're sure that people will not do this look into the maintainanceScripts (but you've been warned)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
|
|