pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

cmake pkg path



I'm failing to see why cmake can't find fftw:

-- Checking for module 'fftw3f'
--   Package 'fftw3f', required by 'virtual:world', not found
-- pkg-config could not detect fftw3f, trying generic detection
-- Looking for fftwf_plan_r2r_1d in /usr/pkg/lib/libfftw3f.so
-- Looking for fftwf_plan_r2r_1d in /usr/pkg/lib/libfftw3f.so - not found
CMake Error at cmake/FindFFTW.cmake:101 (message):
  Could not find fftwf_plan_r2r_1d in /usr/pkg/lib/libfftw3f.so, take a look
  at the error message in
  /tmp/pkgsrc/biology/gromacs2k/work.x86_64/gromacs-2018.3/CMakeFiles/CMakeError.log
  to find out what went wrong.  If you are using a static lib (.a) make sure
  you have specified all dependencies of fftw3f in FFTWF_LIBRARY by hand
  (e.g.  -DFFTWF_LIBRARY='/path/to/libfftw3f.so;/path/to/libm.so') !


# find /tmp/pkgsrc/biology -name \*.pc
/tmp/pkgsrc/biology/gromacs2k/work.x86_64/.buildlink/lib/pkgconfig/fftw3.pc

and not fftw3f, so fair enough that pkg-config didn't find it. (My fftw
package was built with options fftw-fortran.)

But:

# ls -l /usr/pkg/lib/libfftw3f.so*
lrwxr-xr-x  1 root  wheel       18 Sep  3 13:50 /usr/pkg/lib/libfftw3f.so -> libfftw3f.so.3.5.6
lrwxr-xr-x  1 root  wheel       18 Sep  3 13:50 /usr/pkg/lib/libfftw3f.so.3 -> libfftw3f.so.3.5.6
-rwxr-xr-x  1 root  wheel  1126696 Sep  3 13:50 /usr/pkg/lib/libfftw3f.so.3.5.6
# nm -g /usr/pkg/lib/libfftw3f.so | grep r2r_1d
00000000000e47bc T fftwf_plan_r2r_1d
00000000000e2fb8 T sfftw_plan_r2r_1d_
00000000000e2f97 T sfftw_plan_r2r_1d__

and stranger is the log file:

Linking C executable cmTC_06dea
/usr/pkg/bin/cmake -E cmake_link_script CMakeFiles/cmTC_06dea.dir/link.txt --verbose=1
/tmp/pkgsrc/biology/gromacs2k/work.x86_64/.cwrapper/bin/gcc -O2 -D_FORTIFY_SOURCE=2 -I/usr/pkg/include -Wno-unknown-pragmas  -DCHECK_FUNCTION_EXISTS=fftwf_plan_r2r_1d  -L/usr/pkg/lib -Wl,-R/usr/pkg/lib  CMakeFiles/cmTC_06dea.dir/CheckFunctionExists.c.o  -o cmTC_06dea -Wl,-rpath,/usr/pkg/lib /usr/pkg/lib/libfftw3f.so -lm 
ld: cannot find -lfftw3f
*** Error code 1

It looks correct - how can ld not see it? Mystical wrappers?


Cheers,

Patrick


Home | Main Index | Thread Index | Old Index