Hi,
debian/patches/hardening passes LDFLAGS to the feature-detection link
checks in setup.py as a single argument:
self.linker_flags = [os.environ.get("LDFLAGS")]
With Debian's default LDFLAGS ("-Wl,-z,relro") that happens to work,
because it is a single flag. As soon as LDFLAGS contains more than one
flag, the linker gets them as one bogus option, every check fails, and
the build stops with a misleading error. In Ubuntu:
ld.bfd: unrecognized option '-Bsymbolic-functions -Wl'
collect2: error: ld returned 1 exit status
error: Could not find the FFTW header 'fftw3.h'
The same would happen in Debian with any extra flag in LDFLAGS (for
example DEB_LDFLAGS_MAINT_APPEND or a local hardening setting). When
LDFLAGS is unset it also passes None to the linker call.
The attached updated patch splits the variable with shlex:
self.linker_flags = shlex.split(os.environ.get("LDFLAGS", ""))
With it, pyfftw builds in Ubuntu and the test suite passes (1720 passed,
86 skipped), with single, double and long double support detected. With
Debian's LDFLAGS the behaviour is unchanged.
Regards,
Sebastien