[Insight-developers] FFTW not working
gang song
songgang97 at gmail.com
Tue Apr 19 16:44:07 EDT 2011
Hi Kent,
Thanks for the update. I saw ITK master branch already merged your
patch now. Now it compiled successfully on my system.
I got another question about FFTW library. When I am compiling our
registration program linking ITK, I got this error:
Linking CXX executable ANTS
/usr/bin/ld: cannot find -lfftw3
collect2: ld returned 1 exit status
make[2]: *** [ANTS] Error 1
make[1]: *** [CMakeFiles/ANTS.dir/all] Error 2
make: *** [all] Error 2
The corresponding CMakeLists.txt seg is :
add_executable(ANTS ANTS.cxx ${UI_SOURCES})
target_link_libraries(ANTS ${ITK_LIBRARIES} )
Is it possible that -lfftw3 has not been set in ${ITK_LIBRARIES} ?
Thanks
-Gang
On Tue, Apr 19, 2011 at 10:39 AM, Williams, Norman K
<norman-k-williams at uiowa.edu> wrote:
> I'm doing a build right now to see if I can duplicate the problem.
>
> There seems to be a problem with respect to where the FFTW header files
> are being searched for; the place the files are being installed --
> ${CMAKE_BINARY_DIR}/fftw/include -- isn't on the include path.
>
> I'm testing a fix for this, but since it involves changing compiler flags,
> it's triggered a complete rebuild of ITK.
>
> If you want to try it yourself, this is what is involved.
>
> diff --git a/CMake/itkExternal_FFTW.cmake b/CMake/itkExternal_FFTW.cmake
> index 96f93ee..7c48f0b 100644
> --- a/CMake/itkExternal_FFTW.cmake
> +++ b/CMake/itkExternal_FFTW.cmake
> @@ -85,6 +85,7 @@ else(USE_SYSTEM_FFTW)
> )
> endif(USE_FFTWD)
> link_directories(${ITK_BINARY_DIR}/fftw/lib)
> + include_directories(${ITK_BINARY_DIR}/fftw/include)
> # backwards compatibility
> set(FFTW_INCLUDE_PATH ${ITK_BINARY_DIR}/fftw/include)
> #
>
>
> On 4/18/11 6:23 PM, "gang song" <songgang97 at gmail.com> wrote:
>
>
>>Hi,
>>
>>I could not compile today's ITK with FFTW with these CMake options:
>>
>>
>> BUILD_DOCUMENTATION OFF
>> BUILD_EXAMPLES OFF
>> BUILD_SHARED_LIBS OFF
>> BUILD_TESTING ON
>> CMAKE_BUILD_TYPE Release
>> DART_TESTING_TIMEOUT 1500
>> ITKV3_COMPATIBILITY OFF
>> ITK_BUILD_ALL_MODULES ON
>>
>>USE_FFTWD ON
>>USE_FFTWF ON
>>USE_SYSTEM_FFTW OFF
>>
>>The OS is Linux (CentOS). No fftw library has been installed in the
>>system path.
>>
>>ITK did download fftw in the first step and compiled successfully
>>
>>[ 0%] Built target fftwd
>>[ 1%] Built target fftwf
>>
>>
>>But then it came to this error -- seems that many FFTW related
>>variables are broken:
>>
>>
>>[ 59%] Building CXX object
>>Modules/Filtering/FFT/src/CMakeFiles/ITK-FFT.dir/itkFFTWGlobalConfiguratio
>>n.cxx.o
>>In file included from
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:18:
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/include/itkFFTWGlob
>>alConfiguration.h:30:19:
>>error: fftw3.h: No such file or directory
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:
>>In static member function Œstatic int
>>itk::FFTWGlobalConfiguration::GetPlanRigorValue(const std::string&)¹:
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:44:
>>error: ŒFFTW_ESTIMATE¹ was not declared in this scope
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:48:
>>error: ŒFFTW_MEASURE¹ was not declared in this scope
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:52:
>>error: ŒFFTW_PATIENT¹ was not declared in this scope
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:56:
>>error: ŒFFTW_EXHAUSTIVE¹ was not declared in this scope
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:
>>In static member function Œstatic std::string
>>itk::FFTWGlobalConfiguration::GetPlanRigorName(const int&)¹:
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:67:
>>error: ŒFFTW_ESTIMATE¹ was not declared in this scope
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:69:
>>error: ŒFFTW_MEASURE¹ was not declared in this scope
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:71:
>>error: ŒFFTW_PATIENT¹ was not declared in this scope
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:73:
>>error: ŒFFTW_EXHAUSTIVE¹ was not declared in this scope
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:
>>In constructor Œitk::FFTWGlobalConfiguration::FFTWGlobalConfiguration()¹:
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:147:
>>error: ŒFFTW_ESTIMATE¹ was not declared in this scope
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:165:
>>error: Œfftwf_init_threads¹ was not declared in this scope
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:171:
>>error: Œfftw_init_threads¹ was not declared in this scope
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:231:
>>error: Œfftwf_import_system_wisdom¹ was not declared in this scope
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:235:
>>error: Œfftw_import_system_wisdom¹ was not declared in this scope
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:
>>In destructor Œvirtual
>>itk::FFTWGlobalConfiguration::~FFTWGlobalConfiguration()¹:
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:266:
>>error: Œfftwf_cleanup_threads¹ was not declared in this scope
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:267:
>>error: Œfftwf_cleanup¹ was not declared in this scope
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:270:
>>error: Œfftw_cleanup_threads¹ was not declared in this scope
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:271:
>>error: Œfftw_cleanup¹ was not declared in this scope
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:
>>In static member function Œstatic bool
>>itk::FFTWGlobalConfiguration::ImportWisdomFileFloat(const
>>std::string&)¹:
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:343:
>>error: Œfftwf_import_wisdom_from_file¹ was not declared in this scope
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:
>>In static member function Œstatic bool
>>itk::FFTWGlobalConfiguration::ImportWisdomFileDouble(const
>>std::string&)¹:
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:374:
>>error: Œfftw_import_wisdom_from_file¹ was not declared in this scope
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:
>>In static member function Œstatic bool
>>itk::FFTWGlobalConfiguration::ExportWisdomFileFloat(const
>>std::string&)¹:
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:411:
>>error: Œfftwf_export_wisdom_to_file¹ was not declared in this scope
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:
>>In static member function Œstatic bool
>>itk::FFTWGlobalConfiguration::ExportWisdomFileDouble(const
>>std::string&)¹:
>>/home/songgang/project/ITKv4/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalCo
>>nfiguration.cxx:442:
>>error: Œfftw_export_wisdom_to_file¹ was not declared in this scope
>>make[2]: ***
>>[Modules/Filtering/FFT/src/CMakeFiles/ITK-FFT.dir/itkFFTWGlobalConfigurati
>>on.cxx.o]
>>Error 1
>>make[1]: *** [Modules/Filtering/FFT/src/CMakeFiles/ITK-FFT.dir/all] Error
>>2
>>make: *** [all] Error 2
>>
>>
>>
>>Thanks for any suggestion
>>
>>-Gang
>>_______________________________________________
>>Powered by www.kitware.com
>>
>>Visit other Kitware open-source projects at
>>http://www.kitware.com/opensource/opensource.html
>>
>>Kitware offers ITK Training Courses, for more information visit:
>>http://kitware.com/products/protraining.html
>>
>>Please keep messages on-topic and check the ITK FAQ at:
>>http://www.itk.org/Wiki/ITK_FAQ
>>
>>Follow this link to subscribe/unsubscribe:
>>http://www.itk.org/mailman/listinfo/insight-developers
>
>
>
> ________________________________
> Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you.
> ________________________________
>
More information about the Insight-developers
mailing list