Opened 11 years ago
Closed 4 years ago
#397 closed enhancement (outdated)
FFTW misses import library
Reported by: | jmalik | Owned by: | |
---|---|---|---|
Priority: | major | Component: | Package |
Version: | Keywords: | fftw | |
Cc: |
Description
In the 64 bit packages, fftw does not include the import library. It was included in the 32bit tree.
This is necessary for packages built with vc compiler and linking to fftw.
Attachments (1)
Change History (8)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
work in progress...
The following snippet generates the def and lib file. I did not test yet the resulting .lib
call "C:\OSGeo4W64\bin\o4w_env.bat" set pf=%ProgramFiles(x86)% if "%pf%"=="" set pf=%ProgramFiles% call "%pf%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" amd64
set FFTW_DLL=%OSGEO4W_ROOT%\bin\libfftw3-3.dll set FFTW_IMPORTLIB=%~dp0\fftw3.lib set FFTW_DEF=%~dp0\fftw3.def
for /F "delims=" %%i in ("%FFTW_DLL%") do set FFTW_BASENAME=%%~nxi echo LIBRARY %FFTW_BASENAME% > %FFTW_DEF% echo EXPORTS >> %FFTW_DEF%
for /f "usebackq tokens=4,* delims=_ " %%i in (dumpbin /exports "%FFTW_DLL%"
) do (
if %%i==fftw echo %%i_%%j >> %FFTW_DEF% if %%i==dfftw echo %%i_%%j >> %FFTW_DEF% if %%i==DFFTW echo %%i_%%j >> %FFTW_DEF% )
lib /machine:x64 /def:%FFTW_DEF% /out:%FFTW_IMPORTLIB%
by , 11 years ago
Attachment: | fftw_generate_importlib.bat added |
---|
follow-up: 5 comment:4 by , 11 years ago
Jef,
Before going any further : chances are that the 32bit package has been generated from the prebuilt binaries distributed by the FFTW crew here : http://www.fftw.org/install/windows.html Whatever, this can be a helpful start point for the OSGeo4W 64 bit package.
Those binaries already comes with .def files (but not the .lib ones). These simplifies the process, as only
lib /machine:x64 /def:%FFTW_DEF% /out:%FFTW_IMPORTLIB%
needs to be called to generate the import lib.
Also :
- their DEF file is quite different from the one generated with the attached script. there are symbols that are not output by dumpbin, and the other way around (some symbols output by dumpbin do not end in the def file). I am not so much confident about the VLC recipe I applied.
- they include in their build all possible precision flavors (float/double/long double). I would be a client for both float and double
- [major] your build depends on msys, since the dll require something called libwinpthread-1.dll. there is at least a missing dependency in the setup.hint, since I don't have that on my installation. the 32bit build was not requiring that (statically integrated?), and the fftw upstream build does not require that either.
Do you have an opinion ?
comment:5 by , 11 years ago
Replying to jmalik:
Do you have an opinion ?
Well, fftw was included for GRASS. Not sure if the above binaries were available, when I did GRASS or if I ran into problems using them. All I know is that it apparently works for GRASS. Still I don't have a clue what it does or what GRASS specifically needs it for. Does GRASS work with those DLLs or would it need a rebuild?
comment:6 by , 11 years ago
For the moment I identified that the fftw dll is required by
apps\grass\grass-6.4.3\lib\libgrass_gmath.6.4.3.dll
which is in turn required at least by
apps\grass\grass-6.4.3\bin\i.fft.exe
I tested by replacing the DLL with the one available on FFTW site, and executing the grass FFT algorithm via Sextante : it works and generates a valid fft-transformed raster (well 2 actually, real and imaginary part).
So it is possible to use the binaries from the FFTW site without rebuilding GRASS.
comment:7 by , 4 years ago
Resolution: | → outdated |
---|---|
Status: | new → closed |
Not sure how the 32bit fftw package was built. But the build recipe for the 64bit built is in
x86_64/release/fftw/fftw-3.3.3-1-src.tar.bz2
. Note that it's built with MinGW - as GRASS is currently it's only dependant. Could you try if https://wiki.videolan.org/GenerateLibFromDll also helps to building a working 64bit.lib
from the fftw DLL?