- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Getting a linker error trying to find the fftw2x library. I have pre-built the library using the makefile in $MKL_ROOT/interfaces
make libintel64 compiler=gnu PRECISION=MKL_SINGLE INSTALL_DIR=../../lib/intel64/
I can see the .a file in a listing with all the other MKL library files:
-rwxrwxrwx 1 root root 120102 Dec 22 13:38 libfftw2xc_single_gnu.a*
-rwxrwxrwx 1 root root 83014 Dec 22 13:38 libfftw2xc_single_intel.a*
I am then using cmake to build my program. Within CMakeLists.txt
find_package(MKL CONFIG REQUIRED)
set(MKL_LIBS fftw2xc_single_gnu)
target_link_libraries(app PUBLIC ${MKL_LIBS})
The output of cmake includes these:
-- MKL_ARCH: None, set to ` intel64` by default
-- MKL_ROOT /opt/intel/oneapi/mkl/2022.1.0
-- MKL_LINK: static
-- MKL_INTERFACE_FULL: None, set to ` intel_ilp64` by default
-- MKL_THREADING: None, set to ` intel_thread` by default
-- MKL_MPI: None, set to ` intelmpi` by default
-- Found MKL: intelmpi
-- Found MKL: /opt/intel/oneapi/mkl/2022.1.0
-- Found MKL: /usr/lib/x86_64-linux-gnu/libmkl_intel_ilp64.a
-- Found MKL: /usr/lib/x86_64-linux-gnu/libmkl_core.a
-- Found MKL: /usr/lib/x86_64-linux-gnu/libmkl_intel_thread.a
-- Found MKL: /opt/intel/oneapi/compiler/latest/linux/compiler/lib/intel64/libiomp5.so
cmake also creates a link.txt file with the following as part of the linker command line:
/usr/bin/c++ <bunch of other stuff> -lfftw2xc_single_gnu -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core
However when I try to make the target it compiles fine but fails to link:
/usr/bin/ld: cannot find -lfftw2xc_single_gnu
collect2: error: ld returned 1 exit status
- Tags:
- FFTW
- MKL linker
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bruce,
Thanks for reaching out to us.
Could you please provide us with a sample reproducer to reproduce the error that you are getting to have a quick check from our end?
Regards,
Vidya.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Our source code is too complicated to share easily (multiple repositories as submodules, multiple levels of cmake, etc). It will take me some time to try to make a simplified example that exhibits this problem.
Can you just answer these two simple questions?
1) How do you link the FFTW2XC library? As I mentioned above I built the library using the makefile in
/opt/intel/oneapi/mkl/2022.1.0/interfaces/fftw2xc
and I installed it in the same directory as all the other MKL libraries are found.
2) I am still getting a link error
undefined reference to 'vcCISI'
on linux when I had no such error on Windows compiling under Visual Studio.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bruce,
Could you please confirm if you were able to locate the libfftw2xc_single_gnu.a file in your system?
Also, try checking with the sample CMakeLists.txt file provided here https://www.intel.com/content/www/us/en/develop/documentation/onemkl-linux-developer-guide/top/getting-started/cmake-config-for-onemkl.html
Regarding the 2nd issue
Is it possible to provide us with the sample reproducer to reproduce the undefined reference to 'vcCISI' error that you are getting?
Regards,
Vidya.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bruce,
As we haven't heard back from you, could you please provide us with an update regarding the issue?
Regards,
Vidya.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bruce,
As we haven't heard back from you, we are closing this thread. Please post a new question if you need any additional assistance from Intel as this thread will longer be monitored.
Regards,
Vidya.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page