Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 May 2012 16:04:28 -0700 (PDT)
From:      Don Lewis <truckman@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        gnome@FreeBSD.org
Subject:   ports/167985: [patch] comms/spandsp-devel port build fails on FreeBSD 10
Message-ID:  <201205162304.q4GN4SST014183@mousie.catspoiler.org>
Resent-Message-ID: <201205162320.q4GNK2mY007406@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         167985
>Category:       ports
>Synopsis:       [patch] comms/spandsp-devel port build fails on FreeBSD 10
>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:   Wed May 16 23:20:02 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Don Lewis
>Release:        FreeBSD 10.0-CURRENT i386
>Organization:
FreeBSD project
>Environment:
System: System: FreeBSD scratch.catspoiler.org 10.0-CURRENT FreeBSD 10.0-CURRENT #6: Tue May 15 14:19:58 PDT 2012 dl@scratch.catspoiler.org:/usr/obj/usr/src/sys/GENERIC SMB i386


>Description:

The port build fails here:

libtool: compile:  cc -DHAVE_CONFIG_H -I. -I. -I. -I.. -I/usr/local/include -I/usr/local/include/libxml2 -DNDEBUG -std=gnu99 -ffast-math -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -O2 -pipe -fno-strict-aliasing -MT awgn.lo -MD -MP -MF .deps/awgn.Tpo -c awgn.c  -fPIC -DPIC -o .libs/awgn.o
awgn.c: In function 'awgn_init_dbov':
awgn.c:111: error: 'cpowl' undeclared (first use in this function)
awgn.c:111: error: (Each undeclared identifier is reported only once
awgn.c:111: error: for each function it appears in.)
awgn.c:111: error: 'cpow' undeclared (first use in this function)
awgn.c:111: error: 'cpowf' undeclared (first use in this function)
awgn.c:111: error: 'powl' undeclared (first use in this function)
awgn.c: In function 'awgn':
awgn.c:167: error: 'clogl' undeclared (first use in this function)
awgn.c:167: error: 'clog' undeclared (first use in this function)
awgn.c:167: error: 'clogf' undeclared (first use in this function)
awgn.c:167: error: 'logl' undeclared (first use in this function)
gmake[2]: *** [awgn.lo] Error 1

The port builds on FreeBSD 8, but only because the above errors are warnings.

The problem is that this port brings in <tgmath.h> which redefines pow()
and log() in terms of the above functions, but these functions are not
implemented in FreeBSD.

>How-To-Repeat:

Attempt to build the port on FreeBSD 10-CURRENT.

>Fix:

This port does not appear to really need to use <tgmath.h> as it already
passes the correct types to pow() and log(). 

One possible fix would be to remove the check for this header from
configure.ac and regenerate configure.

I worked around this problem by creating a config.cache file that tells
configure that we don't have <tgmath.h>.  This is the patch that I made
to my local copy of the port:

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/comms/spandsp-devel/Makefile,v
retrieving revision 1.27
diff -u -r1.27 Makefile
--- Makefile	29 Dec 2011 23:25:39 -0000	1.27
+++ Makefile	16 May 2012 22:45:19 -0000
@@ -24,7 +24,8 @@
 
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	CPPFLAGS="-I${LOCALBASE}/include" \
-		LDFLAGS="-L${LOCALBASE}/lib"
+		LDFLAGS="-L${LOCALBASE}/lib" \
+		-C
 
 USE_LDCONFIG=	yes
 
--- /dev/null	2012-05-16 15:46:33.000000000 -0700
+++ files/patch-config.cache	2012-05-16 15:42:26.000000000 -0700
@@ -0,0 +1,4 @@
+--- /dev/null	2012-05-16 15:41:15.000000000 -0700
++++ config.cache	2012-05-16 15:40:51.000000000 -0700
+@@ -0,0 +1 @@
++ac_cv_header_tgmath_h=no
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205162304.q4GN4SST014183>