7

I try to compile a program (OpenFP) using cygwin. The program depends on a package FFTW3 which I've compiled and installed succesfully. However when I launch ./configure for the main program I get an error:

No package 'fftw3' found configure:6138: error: Package requirements ("fftw3") were not met: No package 'fftw3' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables FFTW3_CFLAGS and FFTW3_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.

pkg-config --list-all doesn't find fftw3 library but /usr/local/lib/pckconfig contains required .pc file. Ok, from that file fftw3.pc i copied LIBS and CFLAGS parameters into FFTW3_CFLAGS and FFTW3_LIBS evironment variables as the error message above prompted. However I'm still getting the same error.

What's wrong?

P.S. Setting variables the same way in MinGW solved the problem (I have not installed pkg-config in MinGW), but compilation of the project failed due to the lack of some linux-specific headers in MinGW)

Andrey Sboev
  • 7,454
  • 1
  • 20
  • 37

1 Answers1

5

You should add /usr/local/lib/pckconfig to your PKG_CONFIG_PATH:

$ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig

This tells pkg-config to look in an additional location, besides its standard path.

Community
  • 1
  • 1
Some programmer dude
  • 400,186
  • 35
  • 402
  • 621
  • 3
    Thanks for your answher. I had to mention that I tried to do so but with no effect. However I solved the problem changing this variable to native windows path!!! i.e `export PKG_CONFIG_PATH=c:\\cygwin\\usr\\local\\lib\\pkgconfig` – Andrey Sboev Nov 29 '11 at 07:53
  • @Andrey It's empty for me "C:\cygwin64\usr\local\lib\NOTHINGisHERE"; But 'cygcheck -c' shows pkg-config is installed! – Dr.jacky Feb 21 '17 at 08:44
  • @AndreySboev, For me the native Windows path in PKG_CONFIG_PATH does not work. For example, /usr/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig works, but C:\\Cygwin64\\usr\\x86_64-w64-mingw32\\sys-root\\mingw\\lib\\pkgconfig does not work. I use pkg-config 1.6.3 (C:\Cygwin64\bin\pkgconf.exe). I wrote also in https://stackoverflow.com/a/66037850/4807875 about it. – Alexander Samoylov Feb 04 '21 at 01:02