ports/186998: [patch] math/fftw3 port fails during configure on i386 with clang

Don Lewis truckman at FreeBSD.org
Mon Feb 24 06:10:00 UTC 2014


>Number:         186998
>Category:       ports
>Synopsis:       [patch] math/fftw3 port fails during configure on i386 with clang
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 24 06:10:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Don Lewis
>Release:        FreeBSD 11.0-CURRENT i386
>Organization:
FreeBSD project
>Environment:
System: FreeBSD scratch.catspoiler.org 11.0-CURRENT FreeBSD 11.0-CURRENT #70 r262340M: Sat Feb 22 15:58:39 PST 2014     dl at scratch.catspoiler.org:/usr/obj/usr/src/sys/GENERICSMB  i386

ports revision 345674

clang version 3.4

>Description:

When attempting to build the math/fftw3 port, it fails during the configure
step:

checking for gcc... cc
checking whether the C compiler works... no
configure: error: in `/usr/ports/math/fftw3/work/fftw-3.3.3':
configure: error: C compiler cannot create executables
See `config.log' for more details
===>  Script "configure" failed unexpectedly.
Please report the problem to bf at FreeBSD.org [maintainer] and attach the
"/usr/ports/math/fftw3/work/fftw-3.3.3/config.log" including the output of
the failure of your make command. Also, it might be a good idea to provide
an overview of all packages installed on your system (e.g. a
/usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/math/fftw3
*** Error code 1

Stop.
make: stopped in /usr/ports/math/fftw3


The following snippet of config.log shows that the cause of the problem is
that clang rejects the -malign-double command line option:

configure:4046: checking whether the C compiler works
configure:4068: cc -O2 -pipe -march=athlon64 -O3 -ffast-math -fstrict-aliasing -efomit-frame-pointer -malign-double   conftest.c  >&5
cc: error: unknown argument: '-malign-double'
configure:4072: $? = 1
configure:4110: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "fftw"
| #define PACKAGE_TARNAME "fftw"
| #define PACKAGE_VERSION "3.3.3"
| #define PACKAGE_STRING "fftw 3.3.3"
| #define PACKAGE_BUGREPORT "fftw at fftw.org"
| #define PACKAGE_URL ""
| #define PACKAGE "fftw"
| #define VERSION "3.3.3"
| #define FFTW_ENABLE_ALLOCA 1
| #define HAVE_SSE2 1
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:4115: error: in `/usr/ports/math/fftw3/work/fftw-3.3.3':
configure:4118: error: C compiler cannot create executables
See `config.log' for more details


>How-To-Repeat:

Attempt to build the port on an i386 with clang version 3.4.

>Fix:

The following Makefile patch fixes the problem for me.  It is untested
on a machine with gcc.

Index: Makefile
===================================================================
--- Makefile	(revision 345674)
+++ Makefile	(working copy)
@@ -62,7 +62,10 @@
 CFLAGS+=	-fomit-frame-pointer
 .  endif
 .  if ${ARCH} == "i386"
+_COMPILER_VERSION!=     ${CC} --version
+.    if !${_COMPILER_VERSION:Mclang}
 CFLAGS+=	-malign-double
+.    endif
 .  endif
 WITHOUT_NO_STRICT_ALIASING=	yes
 .endif # end OPTIMIZED_CFLAGS

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list