Open yurivict opened 11 months ago
Please check the file config.log
to find specific errors that prevent the configure script from detecting the optional extra packages.
for example:
scons: Configure: checking for FFTW ...
.sconf_temp/conftest_0c46a2a96952db7f43919c6fc31987be_0.c <-
|
| #include <fftw3.h>
| int main(int argc,char* argv[]) {
| fftwf_complex *in;
| fftwf_plan p;
| in = (fftwf_complex*) fftwf_malloc(sizeof(fftwf_complex) * 10);
| p = fftwf_plan_dft_1d(10, in, in, FFTW_FORWARD, FFTW_ESTIMATE);
| fftwf_destroy_plan(p);
| fftwf_free(in);
| return 0;
| }
|
cc -o .sconf_temp/conftest_0c46a2a96952db7f43919c6fc31987be_0.o -c -O2 -DNO_BLAS -I/usr/include/cblas .sconf_temp/conftest_0c46a2a96952db7f43919c6fc31987be_0.c
.sconf_temp/conftest_0c46a2a96952db7f43919c6fc31987be_0.c:2:14: fatal error: 'fftw3.h' file not found
#include <fftw3.h>
^~~~~~~~~
1 error generated.
It fails to find fftw3.h
despite its path (-isystem /usr/local/include
) being in the CXXFLAGS and CFLAGS environment variables.
SCons does not inherit the environment. You can specify parameters to configure as follows:
./configure CFLAGS=$CFLAGS CXXFLAGS=$CXXFLAGS
Run scons --help
to see other options.
Configure still fails to find FFTW with ./configure CFLAGS=$CFLAGS CXXFLAGS=$CXXFLAGS
:
scons: Configure: checking for FFTW ...
.sconf_temp/conftest_0c46a2a96952db7f43919c6fc31987be_0.c <-
|
| #include <fftw3.h>
| int main(int argc,char* argv[]) {
| fftwf_complex *in;
| fftwf_plan p;
| in = (fftwf_complex*) fftwf_malloc(sizeof(fftwf_complex) * 10);
| p = fftwf_plan_dft_1d(10, in, in, FFTW_FORWARD, FFTW_ESTIMATE);
| fftwf_destroy_plan(p);
| fftwf_free(in);
| return 0;
| }
|
cc -o .sconf_temp/conftest_0c46a2a96952db7f43919c6fc31987be_0.o -c -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -DNO_BLAS -I/usr/include/cblas .sconf_temp/conftest_0c46a2a96952db7f43919c6fc31987be_0.c
cc -o .sconf_temp/sfconftest_0c46a2a96952db7f43919c6fc31987be_0_25260cce507de1f1d4e4fc265dc8e16f .sconf_temp/conftest_0c46a2a96952db7f43919c6fc31987be_0.o -lm
ld: error: undefined symbol: fftwf_malloc
>>> referenced by conftest_0c46a2a96952db7f43919c6fc31987be_0.c
>>> .sconf_temp/conftest_0c46a2a96952db7f43919c6fc31987be_0.o:(main)
ld: error: undefined symbol: fftwf_plan_dft_1d
>>> referenced by conftest_0c46a2a96952db7f43919c6fc31987be_0.c
>>> .sconf_temp/conftest_0c46a2a96952db7f43919c6fc31987be_0.o:(main)
ld: error: undefined symbol: fftwf_destroy_plan
>>> referenced by conftest_0c46a2a96952db7f43919c6fc31987be_0.c
>>> .sconf_temp/conftest_0c46a2a96952db7f43919c6fc31987be_0.o:(main)
ld: error: undefined symbol: fftwf_free
>>> referenced by conftest_0c46a2a96952db7f43919c6fc31987be_0.c
>>> .sconf_temp/conftest_0c46a2a96952db7f43919c6fc31987be_0.o:(main)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
.sconf_temp/conftest_0c46a2a96952db7f43919c6fc31987be_1.c <-
pkg-config does return the correct link flags:
pkg-config --libs fftw3
-L/usr/local/lib -lfftw3
but they don't appear in the above link line which leads to the missing symbols problem.
The required argument -lfftw3
does not appear in the link line.
It's not necessary to compile a snippet of code using FFTW. pkg-config returns proper flags, and the cmake script returns correct flags as well.
:bug: Bug report
Description of the bug
All these packages are installed and are easily discoverable.
Include and lib paths are set correctly in CFLAGS, CXXFLAGS, LDFLAGS, which is a convention.
I see that you wrote 2600+ lines in framework/configure.py to detect some of these packages and this code fails in SCons. SCons is an anachronism, I recommend that you should use cmake. With cmake finding all these packages would have been done correctly with fewer than 100 lines of cmake code.
To Reproduce Run configure.
Revision: d729968 FreeBSD 13.2