Due to the need for a binary shared library this is not packaged as a jar, but need some installation work. This installation guide is based on Fedora Core 5, Fedora 7 and Redhat WS4, but should work on other Linux flavours.
Licence This interface is Free Software and is released under the GNU Public Licence.
Requirements
- Sun JDK 1.5 or 1.6. It was written under 1.5 and uses some 1.5 features so it will not work on older versions.
- FFTW3.1 on newer. On Fedora this is available from Fedora Extra as two packages being currently fftw-3 and fftw-devel-3. Only the first is needed for a binary install, but I suggest you install both to allow rebuilds.
Note: Fedora 7 Fedora Extra has been merged into the main Fedora repository, and the "3" has been dropped, so:
yum install fftw fftw-devel
will do the trick, alternatively install from Package Manager (pirut).
Alternatively download and install FFTW from source. The prebuilt binary we build on Fedora 7 using gcc 4.1.2-12 and should work on Linux system with at least this gcc level.
Binary install
- Download tar.gz file to directory within CLASSPATH, and unpack with "tar zxvf jfftw.tar.gz"
- jfftw directory contains java and class file. Class files were created with Java 1.6, if you use Java 1.5, do "javac *.java".
- From jfftw/c directory copy the libJFFTW.so library to
/usr/java/jdk1.6.0/jre/lib/i386/
(or equivalent for your java kit).
Alternatively copy libJFFTW.so to somewhere convenient, for example /usr/local/lib or $HOME/lib if you don't have root access. Then set env variable LD_LIBRARY_PATH to the directory so in bash speak
"export LD_LIBRARY_PATH=/usr/local/lib"
- Download and try a test program, if it fails to find the sharable library make sure you have the LD_LIBRARY_PATH set correctly, is the most usual problem.
Source install
If you don't have a gcc4.1 (or higher), or the above binary install failed the you need to build the libJFFTW.so manually.
- unpack as above and if needed "javac *.java" to build the class files.
- Make sure you have the fftw-devel installed
- In the jfftw/c directory edit the Makefile and set the JAVAKIT variable to point to the location of your Java Kit. This WILL vary on different machines. The default of "/usr/java/default" is correct for a installation of the rpm from Sun but not for a JPackage installation where it is located at "/usr/lib/jvm/jdk-1.5.0_11". Others will vary.
- In jfftw/c directory type
"make cleanall"
"make"You should get no errors!!, and it will make a libJFFTW.so library.
Most common errors are missing "fftw3.h" (fftw-devel-3 not installed), and missing "jni.h" (you have not set JAVAKIT correctly in the Makefile).
- You should now have a working libJFFTW.so to install as above.
This is a very preliminary install, please let me know about successes as well as failures!!!
Reported issues on non-Redhat/Fedora system
The following installation issues have been reported to me
- Ubuntu 64 bit edition need -fPIC flag on gcc, so in
Makefile set,
CFLAG=-Wall -fPIC
Non Linux
- MacOSX, should be OK, but not tested by me, I can't actually get FFTW to work at the moment, but have not tried very hard!
- Windows, you need to make a DLL in place of the shared .so. I've been told that the source is OK, but I don't know, (or really wish to know) the magic commands to make a working DLL. If somebody tells me I'll pass on the information.
The tars.gz