Jump to content

Fftw Library Troubles


Recommended Posts

Samlples/SOP>Houdini: symbol lookup error: /home/madjestic/houdini8.1/dso/SOP_FFTNull.so: undefined symbol: fftw_malloc

Are you linking against the fftw library when compiling? Are you linking against it statically or dynamically? If dynamically, is the fftw .so file somewhere in your $LD_LIBRARY_PATH? These are usually the "ah darn it!" mistakes that I make :)

PS, for what it's worth, it IS definitely possible to use this library in Houdini ... we use it in our ocean SOPs and shadeops

Link to comment
Share on other sites

It's a bit hard to guess what's going on here from the information you've given. Are you using a static or dynamic fftw library ? If you are using a dynamic library you'll need to make sure that the fftw.so (or whatever it's been named) is on your LD_LIBRARY_PATH.

Also using 64 bit could be complicating matters, you may need to compile your own 64 bit version of fftw (assuming it's 64 bit clean). I haven't done any 64 bit development under linux so I'm not up with the details I'm afraid. If it was me I would be trying to compile a small standalone test program that calls some fftw routines and make sure that links and runs properly first.

-Drew

Samples/SOP>houdini

Samlples/SOP>Houdini: symbol lookup error: /home/madjestic/houdini8.1/dso/SOP_FFTNull.so: undefined symbol: fftw_malloc

Link to comment
Share on other sites

Thanks, eloop, I'll try to do this (compiling a standaolne app).

Sorry, I am not sure which fftw I am linking - I install fftw as it is written in the INSTALL file (./configure, make make install), then I simply do a #include<fftw3.h> in the *.C file and compile it (I tried both linking and not lnking the fftw libraries with the hcustom -l... - the same as you do with the HOT compile script...). Actually I'll be quite happy if I can do static linking of fftw - could you give me a hint how to do static linking of fftw librries to my *.C file? Something like #include static <fftw3.h>? Or I must recompile the fftw somehow?...

============

Thank you for your feedback, however either because it

SOP_FFTNull.zip

Link to comment
Share on other sites

Hmm...

I've done a new clean installation of Windows XP (32bit version) and Visual Studio 2003, tried to compile the same code and... I get the same error - undefined symbol... I guess I have problems with dynamic linking.

I am not a programmer (in true sense) and googling for static linking didn't help much, at least it is not clear to me yet how to perform static linking with fftw3.h - Can somebody give a small example, or a pair of lines of code of static linking?

Thanks

Hmm...

I've done a new clean installation of Windows XP (32bit version) and Visual Studio 2003, tried to compile the same code and... I get the same error - undefined symbol... I guess I have problems with dynamic linking.

I am not a programmer (in true sense) and googling for static linking didn't help much, at least it is not clear to me yet how to perform static linking with fftw3.h - Can somebody give a small example, or a pair of lines of code of static linking?

Thanks

PS. I am not actually sure that I've installed fftw correctly - I followed the instructions and it seemes pretty straightforward, but you can never be sure - is there a way to test whether it was installed correctly? I ran bench.exe and it seemed to work - on the other hand it may not use dynamic linking so it might run independently from what I did with the installation...

Link to comment
Share on other sites

For building the win32 version I would recommend grabbing one of the dynamically linked win32 binary distributions of fftw (fftw.org) and just link against that. (I managed to find a statically linked distribution a while back and I've been using that for building the distributions, less work for users to install, but I can't find where I got it from now). Make sure the fftw3.dll is on your executable path. See

http://www.fftw.org/install/windows.html

Sorry I can't be of more help with the 64 bit version. From the website it looks like you can make 64 bit clean versions of fftw. There are lots of platform specific gotcha's when it comes to dynamic vs static linking. Note that the SOP plugin has to be dynamically linked to make it loadable under houdini, but you can have it such that the fftw is linked statically to it. I notice you are using a .a file so that has been made to be statically linked against (.so -> dynamic library). Things are more complicated under windows in that you link against ".lib" filesw for both static and dynamic cases.... Google will be you friend here.

.... I did manage to get your example linking under 32 bit linux, using the static libraries that I use for building HOT distributions. I changed all occurrences of fftw_ to fftwf_ so that you're using float instead of double precision. Then running up hscript brings the SOP in as expected without any errors. I think the win32 binary distributions of fftw that are on the web site bundle in all the routines for the different precisions together into one library, but when you build fftw from source it only builds one at a time (see configure options, web docs etc).

Note, I mostly use the Makefiles for building the HOT these days. They should be up to date. I use CYGWIN under windows to get a unix like environment.

If you are getting into diagnosing problems with linking dumpbin.exe (win32) and ldd (linux) are your friends. You will be a true programmer if you keep hammering away at this stuff for long enough :-)

-Drew

Hmm...

I've done a new clean installation of Windows XP (32bit version) and Visual Studio 2003, tried to compile the same code and... I get the same error - undefined symbol... I guess I have problems with dynamic linking.

I am not a programmer (in true sense) and googling for static linking didn't help much, at least it is not clear to me yet how to perform static linking with fftw3.h - Can somebody give a small example, or a pair of lines of code of static linking?

Thanks

PS. I am not actually sure that I've installed fftw correctly - I followed the instructions and it seemes pretty straightforward, but you can never be sure - is there a way to test whether it was installed correctly? I ran bench.exe and it seemed to work - on the other hand it may not use dynamic linking so it might run independently from what I did with the installation...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...