Opened 11 years ago

Closed 11 years ago

#39805 closed defect (fixed)

libcerf: compile error on 10.6

Reported by: mojca (Mojca Miklavec) Owned by: mojca (Mojca Miklavec)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: jmroot (Joshua Root), j.wuttke@…
Port: libcerf

Description

libcerf fails to compile on 10.6 buildbot with

w_of_z.c:84:40: error: imaginary constants are a GCC extension
w_of_z.c:176:43: error: imaginary constants are a GCC extension
w_of_z.c:180:59: error: imaginary constants are a GCC extension
w_of_z.c:225:45: error: imaginary constants are a GCC extension

https://build.macports.org/builders/buildports-snowleopard-x86_64/builds/18815

It seems that this is either gcc 4.2's fault:

or a problem with combining -pedantic and -Werror

There is no hurry to fix this (deadline would be the release of gnuplot months ahead) and simply declaring in the portfile that it doesn't support 10.6 (or that it needs a different compiler) should be ok as well.

Change History (2)

comment:1 Changed 11 years ago by mojca (Mojca Miklavec)

I'm just confirming that the following patch works:

--- configure
+++ configure
@@ -11432,7 +11432,7 @@ if test "x$ac_cv_prog_cc_c99" != xno; then :
 fi
 
 
-AM_CFLAGS="-pedantic -Wall -Werror"
+AM_CFLAGS="-pedantic -Wall"
 
 ac_config_headers="$ac_config_headers config.h"
  # to avoid endless -D options
--- configure.ac
+++configure.ac
@@ -31,7 +31,7 @@ AM_INIT_AUTOMAKE([foreign]) # don't insert GNU standard text files
 LT_INIT([disable-static])
 
 AC_PROG_CC_C99
-AC_SUBST(AM_CFLAGS,"-pedantic -Wall -Werror")
+AC_SUBST(AM_CFLAGS,"-pedantic -Wall")
 AC_CONFIG_HEADERS([config.h]) # to avoid endless -D options
 AC_HEADER_STDC

Unless other MacPorters disagree, I can simply patch the configure script in Portfile (configure.ac may not be patched, else build process complains about missing aclocal). I don't see any urge to patch the upstream sources, but I leave that to others to discuss.

(I'm not claiming yet that this leads to correct calculations. Just that it compiles.)

Last edited 11 years ago by mojca (Mojca Miklavec) (previous) (diff)

comment:2 Changed 11 years ago by mojca (Mojca Miklavec)

Resolution: fixed
Status: newclosed

Fixed in r108342, the buildbot is happy now (https://build.macports.org/builders/buildports-snowleopard-x86_64/builds/18883).

I removed -Werror unconditionally and in configure only. If anyone objects, feel free to comment or commit.

Note: See TracTickets for help on using tickets.