jvgomez/fast_methods

fftw_init_threads problem

rechardchen123 opened this issue · 3 comments

Hi, guys,
Thanks for providing this useful repo for fast marching. Unfortunately, when I compile the code, there are some mistakes as follows:

CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

-- Examples are being built and installed.
OpenCV Found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/chenjiusi/Documents/fast_methods/build
Consolidate compiler generated dependencies of target fast_methods
[ 40%] Built target fast_methods
Consolidate compiler generated dependencies of target fm_benchmark
Consolidate compiler generated dependencies of target full_example
Consolidate compiler generated dependencies of target test_fm
[ 60%] Linking CXX executable full_example
[ 60%] Linking CXX executable test_fm
[ 70%] Linking CXX executable fm_benchmark
/usr/bin/ld: CMakeFiles/test_fm.dir/test_fm.cpp.o: in function _GLOBAL__sub_I_main': test_fm.cpp:(.text.startup+0x3f): undefined reference to fftw_init_threads'
collect2: error: ld returned 1 exit status
make[2]: *** [examples/CMakeFiles/test_fm.dir/build.make:174: examples/test_fm] Error 1
/usr/bin/ld: CMakeFiles/full_example.dir/full_example.cpp.o: in function _GLOBAL__sub_I_main': full_example.cpp:(.text.startup+0x3f): undefined reference to fftw_init_threads'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/Makefile2:209: examples/CMakeFiles/test_fm.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** [examples/CMakeFiles/full_example.dir/build.make:174: examples/full_example] Error 1
make[1]: *** [CMakeFiles/Makefile2:183: examples/CMakeFiles/full_example.dir/all] Error 2
/usr/bin/ld: CMakeFiles/fm_benchmark.dir/src/benchmark/fm_benchmark.cpp.o: in function _GLOBAL__sub_I_main': fm_benchmark.cpp:(.text.startup+0x3f): undefined reference to fftw_init_threads'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/fm_benchmark.dir/build.make:174: fm_benchmark] Error 1
make[1]: *** [CMakeFiles/Makefile2:131: CMakeFiles/fm_benchmark.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Hey, sorry to hear the problems. We haven't maintained the library for a while, and this seems definitely a new issue.
Is https://stackoverflow.com/questions/60450095/undefined-reference-to-fftw-init-threads-while-installing-phash-library helping somehow?

Hey, sorry to hear the problems. We haven't maintained the library for a while, and this seems definitely a new issue. Is https://stackoverflow.com/questions/60450095/undefined-reference-to-fftw-init-threads-while-installing-phash-library helping somehow?

Hi, Author,
I have fixed this problem. I cannot locate this problem and I guess that is the CImg package compatible problem. I use the simplest way to comment on the 'fftw-init-threads' in the header file 'CImg.h'. The compilation is successful and all examples run ok. I suppose that any other persons may be interested in these questions and reply to them. Thanks again for your providing this package.

That is great to hear! Would you mind putting up a pull request? So that other people know exactly what to do. Thank you!