pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/41350: sysutils/coreutils - undefined __builtin_isfinite when linking seq.o

>Number:         41350
>Category:       pkg
>Synopsis:       sysutils/coreutils - undefined __builtin_isfinite when linking 
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 04 23:35:00 +0000 2009
>Originator:     Heath Caldwell
>Release:        pkgsrc-2009Q1
California State Polytechnic University, Pomona
SunOS niblet 5.10 Generic_137138-09 i86pc i386 i86pc
seq.c: In function `scan_arg':
seq.c:154: warning: implicit declaration of function `__builtin_isfinite'
mv -f .deps/seq.Tpo .deps/seq.Po
gcc -std=gnu99  -O -I/usr/pkg/include  -L/usr/pkg/lib -Wl,-R/usr/pkg/lib 
-Wl,-z,ignore -o seq seq.o ../lib/libco
reutils.a /usr/pkg/lib/ /usr/pkg/lib/ -lc -R/usr/pkg/lib 
../lib/libcoreutils.a -lm -lnsl -l
Undefined                       first referenced
 symbol                             in file
__builtin_isfinite                  seq.o
ld: fatal: Symbol referencing errors. No output written to seq
collect2: ld returned 1 exit status

seq.c has the following in it:

/* Roll our own isfinite rather than using <math.h>, so that we don't
   have to worry about linking -lm just for isfinite.  */
#ifndef isfinite
# define isfinite(x) ((x) * 0 == 0)

but for some reason they didn't remove the math.h include.  The following patch 
fixes the problem (it compiles fine with the include removed):

--- src/seq.c.orig  Mon May  4 16:07:31 2009
+++ src/seq.c       Mon May  4 16:08:05 2009
@@ -20,7 +20,6 @@
 #include <getopt.h>
 #include <stdio.h>
 #include <sys/types.h>
-#include <math.h>
 #include <float.h>

 #include "system.h"

Home | Main Index | Thread Index | Old Index