Using nvcc I created an object file from my project with the following bash script:
nvcc -Xcompiler -std=c99 -dc src/interface.cu src/functions.cu
nvcc -dlink interface.o functions.o -o obj/link.o
In my obj folder I get a link.o file. I need to link this file to my Ada project using gprbuild. I can compile an Ada-Cuda project perfectly if I don't use the separate compilation mode of nvcc. But now, as I need the separate compilation mode, I have to find a way to link link.o with the rest of the project. This is the .gpr file:
project Test is
for Languages use ("Ada");
for Source_Dirs use ("src");
for Object_Dir use "obj";
for Exec_Dir use ".";
for Main use ("main.adb");
for Create_Missing_Dirs use "True";
package Linker is
for Default_Switches("Ada") use (
"-L/usr/local/cuda/lib64",
"-lcuda",
"-lcudart",
"-lcudadevrt",
"-lstdc++",
"-lm");
for Leading_Switches("Ada") use (
"link.o" -- Doesn't work
);
end Linker;
end Test;
This is the error I get
Bind
[gprbind] main.bexch
[Ada] main.ali
Link
[link] main.adb
/usr/local/opt/gnat-19.1-x86_64/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.1/ld: main.o: in function `_ada_main':
main.adb:(.text+0x5): undefined reference to `bind_say_hello'
/usr/local/opt/gnat-19.1-x86_64/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.1/ld: link.o: in function `__cudaRegisterLinkedBinary_45_tmpxft_0000404a_00000000_11_interface_cpp1_ii_f804fc64':
link.stub:(.text+0x50): undefined reference to `__fatbinwrap_45_tmpxft_0000404a_00000000_11_interface_cpp1_ii_f804fc64'
/usr/local/opt/gnat-19.1-x86_64/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.1/ld: link.o: in function `__cudaRegisterLinkedBinary_45_tmpxft_0000404a_00000000_13_functions_cpp1_ii_e57d67fc':
link.stub:(.text+0x96): undefined reference to `__fatbinwrap_45_tmpxft_0000404a_00000000_13_functions_cpp1_ii_e57d67fc'
collect2: error: ld returned 1 exit status
gprbuild: link of main.adb failed
gprbuild: failed command was: /usr/local/opt/gnat-19.1-x86_64/bin/gcc main.o link.o b__main.o -L/usr/local/cuda/lib64 -lcuda -lcudart -lcudadevrt -lstdc++ -lm -L/home/cir_eti/Documents/test/multi_cu_file/obj/ -L/home/cir_eti/Documents/test/multi_cu_file/obj/ -L/usr/local/opt/gnat-19.1-x86_64/lib/gcc/x86_64-pc-linux-gnu/7.3.1/adalib/ -static-libgcc /usr/local/opt/gnat-19.1-x86_64/lib/gcc/x86_64-pc-linux-gnu/7.3.1/adalib/libgnat.a -ldl -Wl,-rpath-link,/usr/local/opt/gnat-19.1-x86_64/lib/gcc/x86_64-pc-linux-gnu/7.3.1//adalib -Wl,-z,origin,-rpath,/usr/local/cuda/lib64:$ORIGIN/obj:/usr/local/opt/gnat-19.1-x86_64/lib/gcc/x86_64-pc-linux-gnu/7.3.1/adalib -o /home/cir_eti/Documents/test/multi_cu_file//main
I'm doing an interface to a DLL and the interface they give is via a C header-file, I have an autogenerated package from the spec; I'm adding the post-conditions and, in the private portion of the package, I put this Linker_Options pragma which instructs the linker to interface with the DLL. -- IIUC, you could use this to address your problem.
Package import_example is
Bad_Return : Exception;
SUCCESS : constant := 20007;
NOT_INITIALIZED : constant := 20008;
ERROR : constant := 20009;
INVALID : constant := 20010;
Function Return_Report (Name : String; Value : unsigned ) return String is
(Name & " should not return" & unsigned'Image(Value) & '.') with Inline;
function item_1 return unsigned -- some_c_header.h:249
with Import => True,
Convention => C,
External_Name => "item_1",
Post => item_1'Result in
SUCCESS | NOT_INITIALIZED | ERROR | INVALID
or else raise Bad_Return with
Return_Report("item_1", item_1'Result)
;
function wait return unsigned -- some_c_header.h:250
with Import => True,
Convention => C,
External_Name => "wait",
Post => wait'Result in
SUCCESS | NOT_INITIALIZED | ERROR
or else raise Bad_Return with
Return_Report("wait", wait'Result)
;
Private
Pragma Linker_Options( "-lsmcex" );
End import_example;
Related
I was doing an assignment in rpc. When i run the command "make -f Makefile.add" it throws me the following errors:
cc -g -o add_client add_clnt.o add_client.o add_xdr.o -lnsl
/usr/bin/ld: add_clnt.o: in function `add_1':
/home/mridu/rpc/add_clnt.c:18: undefined reference to `xdr_int'
/usr/bin/ld: /home/mridu/rpc/add_clnt.c:18: undefined reference to `xdr_int'
/usr/bin/ld: add_client.o: in function `add_prog_1':
/home/mridu/rpc/add_client.c:18: undefined reference to `clnt_create'
/usr/bin/ld: /home/mridu/rpc/add_client.c:20: undefined reference to `clnt_pcreateerror'
/usr/bin/ld: /home/mridu/rpc/add_client.c:27: undefined reference to `clnt_perror'
/usr/bin/ld: add_xdr.o: in function `xdr_numbers':
/home/mridu/rpc/add_xdr.c:13: undefined reference to `xdr_int'
/usr/bin/ld: /home/mridu/rpc/add_xdr.c:15: undefined reference to `xdr_int'
collect2: error: ld returned 1 exit status
make: *** [Makefile.add:41: add_client] Error 1
The following code is the code in the Makefile.add:
# This is a template Makefile generated by rpcgen
# Parameters
CLIENT = add_client
SERVER = add_server
SOURCES_CLNT.c =
SOURCES_CLNT.h =
SOURCES_SVC.c =
SOURCES_SVC.h =
SOURCES.x = add.x
TARGETS_SVC.c = add_svc.c add_server.c add_xdr.c
TARGETS_CLNT.c = add_clnt.c add_client.c add_xdr.c
TARGETS = add.h add_xdr.c add_clnt.c add_svc.c add_client.c add_server.c
OBJECTS_CLNT = $(SOURCES_CLNT.c:%.c=%.o) $(TARGETS_CLNT.c:%.c=%.o)
OBJECTS_SVC = $(SOURCES_SVC.c:%.c=%.o) $(TARGETS_SVC.c:%.c=%.o)
# Compiler flags
CFLAGS += -g
LDLIBS += -lnsl
LIBS+= -ltirrp
QMAKE_CXXFLAGS+= -ltirpc
RPCGENFLAGS =
# Targets
all : $(CLIENT) $(SERVER)
$(TARGETS) : $(SOURCES.x)
rpcgen $(RPCGENFLAGS) $(SOURCES.x)
$(OBJECTS_CLNT) : $(SOURCES_CLNT.c) $(SOURCES_CLNT.h) $(TARGETS_CLNT.c)
$(OBJECTS_SVC) : $(SOURCES_SVC.c) $(SOURCES_SVC.h) $(TARGETS_SVC.c)
$(CLIENT) : $(OBJECTS_CLNT)
$(LINK.c) -o $(CLIENT) $(OBJECTS_CLNT) $(LDLIBS)
$(SERVER) : $(OBJECTS_SVC)
$(LINK.c) -o $(SERVER) $(OBJECTS_SVC) $(LDLIBS)
clean:
$(RM) core $(TARGETS) $(OBJECTS_CLNT) $(OBJECTS_SVC) $(CLIENT) $(SERVER)
The following is the code from the add.x file:
struct numbers{
int num1;
int num2;
};
program ADD_PROG{
version ADD_VER{
int ADD( numbers )=1;
}=1;
}=0x23456789;
I tried adding the compiler flags:
LIBS+= -ltirrp
QMAKE_CXXFLAGS+= -ltirpc
But it still doesn't work. Help me solve the issue!!
I'm trying to compile a Fortran program that uses the PLASMA libraries. Compilation fails with undefined reference to `__plasma_MOD_plasma_init'. Inside plasma.h (which i assume plasma.mod is the interface for), plasma_init is defined with one argument whereas it is called with two in the Fortran program. When removing the second argument though, i get Error: Missing actual argument for argument ‘info’ at (1). I haven't been able to make sense of this, so hopefully someone here can.
I'm using PLASMA 2.8.0 and gcc 6.3.0 20170516.
Here's the makefile. I tried including the pkgconfig which contains plasma.pc because i thought the function's implementation was missing.
#LIB_ROOT = path to the lib
INCLUDE_PLASMA := $(LIB_ROOT)/plasma_2.8.0/include
LIB_PLASMA := $(LIB_ROOT)/plasma_2.8.0/lib/pkgconfig
example: example.f90
gfortran -o example example.f90 -I$(INCLUDE_PLASMA) -L$(LIB_PLASMA)
Here's the minimal Fortran code :
program example
use plasma
implicit none
integer :: a = 1
integer :: info = 1
call plasma_init(a, info)
end program
In plasma.h, plasma_init is defined as:
int PLASMA_Init(int cores);
I solved my issue by correctly linking to the required libraries, here's the new makefile:
PLASMA_BUILD = [some directories]/plasma-installer_2.8.0/build
LIB_PLASMA := $(PLASMA_BUILD)/plasma_2.8.0/lib # contains libplasma.a, libcoreblas.a and libcoreblasqw.a
LIB_QUARK := $(PLASMA_BUILD)/plasma_2.8.0/quark # contains libquark.a
LIB_LAPACK := $(PLASMA_BUILD)/lapack-3.6.0 # contains liblapack.a and liblapacke.a
PLASMA_INTERFACE = $(PLASMA_BUILD)/plasma_2.8.0/control # contains plasma.mod
example: example.f90
gfortran -o example example.f90 -lpthread \
-L$(LIB_PLASMA) -lplasma -lcoreblas -lcoreblasqw \
-L$(LIB_QUARK) -lquark \
-L$(LIB_LAPACK) -llapacke -llapack \
-I$(PLASMA_INTERFACE)
I am trying to wrap around a C library with Go. The library is built with CMake and produces a static library file. I added the #cgo stuff at the beginning of the .go file with the proper CFLAGS and LDFLAGS, however, I keep getting undefined reference errors when running go build memorymodule.go.
Here is my code:
package main
/*
#cgo CFLAGS: -IMemoryModule
#cgo LDFLAGS: MemoryModule/build/MemoryModule.a
#include "MemoryModule/MemoryModule.h"
*/
import "C"
import (
"fmt"
"io/ioutil"
"os"
"unsafe"
)
const SIZE int = 1024
func end(msg string) {
fmt.Println(msg)
os.Exit(1)
}
func check(err error, msg string) {
if err != nil {
end(msg)
}
}
func main() {
bin, err := ioutil.ReadFile(os.Args[0])
check(err, "error reading file")
// Convert the args passed to this program into a C array of C strings
var cArgs []*C.char
for _, goString := range os.Args {
cArgs = append(cArgs, C.CString(goString))
}
// Load the reconstructed binary from memory
handle := C.MemoryLoadLibraryEx(
unsafe.Pointer(&bin[0]), // void *data
(C.size_t)(len(bin)), // size_t
(*[0]byte)(C.MemoryDefaultAlloc), // Alloc func ptr
(*[0]byte)(C.MemoryDefaultFree), // Free func ptr
(*[0]byte)(C.MemoryDefaultLoadLibrary), // loadLibrary func ptr
(*[0]byte)(C.MemoryDefaultGetProcAddress), // getProcAddress func ptr
(*[0]byte)(C.MemoryDefaultFreeLibrary), // freeLibrary func ptr
unsafe.Pointer(&cArgs[0]), // void *userdata
)
// Execute binary
C.MemoryCallEntryPoint(handle)
// Cleanup
C.MemoryFreeLibrary(handle)
}
Here is the results from the go build ... with -x to help with debugging:
cd /home/wlaw/go-memory-module
i686-w64-mingw32-gcc -I . -m32 -mthreads -fmessage-length=0 -fdebug-prefix-map=$WORK=/tmp/go-build -gno-record-gcc-switches -o $WORK/command-line-arguments/_obj/_cgo_.o $WORK/command-line-arguments/_obj/_cgo_main.o $WORK/command-line-arguments/_obj/_cgo_export.o $WORK/command-line-arguments/_obj/memorymodule.cgo2.o -g -O2 MemoryModule/build/MemoryModule.a
# command-line-arguments
/tmp/go-build590803163/command-line-arguments/_obj/_cgo_main.o:_cgo_main.c:(.data+0x0): undefined reference to `MemoryDefaultLoadLibrary'
/tmp/go-build590803163/command-line-arguments/_obj/_cgo_main.o:_cgo_main.c:(.data+0x4): undefined reference to `MemoryDefaultGetProcAddress'
/tmp/go-build590803163/command-line-arguments/_obj/_cgo_main.o:_cgo_main.c:(.data+0x8): undefined reference to `MemoryDefaultFreeLibrary'
/tmp/go-build590803163/command-line-arguments/_obj/_cgo_main.o:_cgo_main.c:(.data+0xc): undefined reference to `MemoryDefaultFree'
/tmp/go-build590803163/command-line-arguments/_obj/_cgo_main.o:_cgo_main.c:(.data+0x10): undefined reference to `MemoryDefaultAlloc'
/tmp/go-build590803163/command-line-arguments/_obj/memorymodule.cgo2.o: In function `cgo_50ced23471ff_Cfunc_MemoryCallEntryPoint':
/tmp/go-build/command-line-arguments/_obj/cgo-gcc-prolog:40: undefined reference to `MemoryCallEntryPoint'
/tmp/go-build590803163/command-line-arguments/_obj/memorymodule.cgo2.o: In function `cgo_50ced23471ff_Cfunc_MemoryLoadLibraryEx':
/tmp/go-build/command-line-arguments/_obj/cgo-gcc-prolog:76: undefined reference to `MemoryLoadLibraryEx'
/tmp/go-build590803163/command-line-arguments/_obj/memorymodule.cgo2.o: In function `cgo_50ced23471ff_Cfunc_MemoryFreeLibrary':
/tmp/go-build/command-line-arguments/_obj/cgo-gcc-prolog:54: undefined reference to `MemoryFreeLibrary'
collect2: error: ld returned 1 exit status
Makefile:9: recipe for target 'all' failed
make: *** [all] Error 2
Whats interesting is if I compile the MemoryModule dependency using make instead of CMake (by editing my Makefile) such that it produces an object file instead of a static library file, and modify my source code to link with that instead, I get no problems:
package main
/*
#cgo CFLAGS: -IMemoryModule
#cgo LDFLAGS: MemoryModule/MemoryModule.o
#include "MemoryModule/MemoryModule.h"
*/
import "C"
...
My Makefile for reference:
ifneq ("$(shell which i686-w64-mingw32-gcc)","")
compiler = i686-w64-mingw32-gcc
else
compiler = i586-mingw32msvc-gcc
endif
# Build the dependencies first (subdirs), then move onto the meat and potatoes.
all: MemoryModule
CC=$(compiler) CGO_ENABLED=1 GOOS=windows GOARCH=386 go build -x memorymodule.go
# Dependency build.
SUBDIRS = MemoryModule
subdirs: $(SUBDIRS)
$(SUBDIRS):
$(MAKE) -C $#
# Override default subdir build behavior (make) with cmake.
MemoryModule:
[ "`ls -A MemoryModule`" ] || git submodule update --init
# $(MAKE) -C $#
cmake -HMemoryModule -BMemoryModule/build
cmake --build MemoryModule/build --target MemoryModule
# Clean targed.
CLEANDIRS = $(SUBDIRS:%=clean-%)
clean: $(CLEANDIRS)
rm -f memorymodule.exe
$(CLEANDIRS):
$(MAKE) -C $(#:clean-%=%) clean
test:
$(MAKE) -C tests test
.PHONY: subdirs $(INSTALLDIRS) $(SUBDIRS) clean test
Any help would be appreciated!
Git project here: https://github.com/wheelerlaw/go-memory-module
Update:
Okay, so I stumbled across this SO question. So if I change my go build command to:
GOOS="windows" GOARCH="amd64" CGO_ENABLED="1" CC="x86_64-w64-mingw32-gcc" go build -x
from:
GOOS="windows" GOARCH="386" CGO_ENABLED="1" CC="i686-w64-mingw32-gcc" go build -x
... it works. So it looks like an incompatibility between the different archs. I'm going to download a 32 bit version of Go to see if that helps.
But what I don't understand is that the program compiles just fine even with the mis-matched archs when I compile C library into an object instead of a static library. Any ideas?
I'm using GCC (CygWin) cross-compiling targeting an Arm7 processor. the problem is none of the standard library functions are available for my program. as I understand it, libc.a is the library i should be using. strangely, this file has been copied to the application source directory.
I would've thought if I did the following, I should be able to use these functions:
have included (enclosed in <>) string.h and stdlib.h in my LCD.c file
mention libc.a to the linker
During make, here's what it says:
$ make
.compiling
..linking
arm-elf-ld -v -Map main.map -nostartfiles -T simple.cmd -o main.out start.o ivt.
o main.o libc.a LCD.o
GNU ld version 2.14 20030612
LCD.o(.text+0x75c): In function `LCD_DispSmallDigits':
: undefined reference to `strlen'
LCD.o(.text+0x22d4): In function `LCD_DispSelMsgAt':
: undefined reference to `malloc'
LCD.o(.text+0x22e0): In function `LCD_DispSelMsgAt':
: undefined reference to `strcpy'
LCD.o(.text+0x2308): In function `LCD_DispSelMsgAt':
: undefined reference to `free'
LCD.o(.text+0x2358): In function `LCD_DispNumMsgAt':
: undefined reference to `malloc'
LCD.o(.text+0x2368): In function `LCD_DispNumMsgAt':
: undefined reference to `sprintf'
LCD.o(.text+0x2384): In function `LCD_DispNumMsgAt':
: undefined reference to `free'
the code I'm using is quite mundane:
void LCD_DispSelMsgAt(int iRow, int iCol, int bSelected, char* s)
{
int i;
char* sBuffer = (char*) malloc(100);
strcpy(sBuffer, s);
if (bSelected)
for (i=0; i<strlen(sBuffer); i++)
if ((*(sBuffer + i)>='a') && (*(sBuffer + i)<='z'))
*(sBuffer + i) = (*(sBuffer + i)) - 0x20;
LCD_DispMsgAt(iRow, iCol, sBuffer);
free(sBuffer);
}
how can I get access to those standard routines?
thank you!
PS: it seems to me I'm having quite a "general" problem so what I'm about to say is not central to this question but i'll mention it anyway...
I noticed something that specifically relates to strlen( ). the prototype for strlen( ) has the parameter as "const char* s". it seems then it works fine with:
i = strlen("abc")
but not in the code sample routine shown above. that wouldn't be a very helpful library routine that can't be used as strlen(char* s).
reply to #n.m.:
adding /gnude/arm-elf/lib/libc.a to the linker command line introduced a "thousand" errors.
$ make
..linking
arm-elf-ld -v -Map main.map -nostartfiles -T LinkerScript.cmd -L /gnude/arm-elf/
lib -o main.out start.o ivt.o main.o LCD.o /gnude/arm-elf/lib/libc.a
GNU ld version 2.14 20030612
/gnude/arm-elf/lib/libc.a(syscalls.o)(.text+0x714): In function `_sbrk':
: undefined reference to `end'
/gnude/arm-elf/lib/libc.a(vfprintf.o)(.text+0x8c0): In function `_vfprintf_r':
: undefined reference to `__eqdf2'
/gnude/arm-elf/lib/libc.a(vfprintf.o)(.text+0x1054): In function `_vfprintf_r':
: undefined reference to `__nedf2'
/gnude/arm-elf/lib/libc.a(vfprintf.o)(.text+0x155c): In function `_vfprintf_r':
: undefined reference to `__umoddi3'
/gnude/arm-elf/lib/libc.a(vfprintf.o)(.text+0x1578): In function `_vfprintf_r':
: undefined reference to `__udivdi3'
/gnude/arm-elf/lib/libc.a(vfprintf.o)(.text+0x1834): In function `_vfprintf_r':
: undefined reference to `__ltdf2'
/gnude/arm-elf/lib/libc.a(vfprintf.o)(.text+0x1d98): In function `cvt':
: undefined reference to `__eqdf2'
/gnude/arm-elf/lib/libc.a(vfprintf.o)(.text+0x1e10): In function `cvt':
: undefined reference to `__nedf2'
/gnude/arm-elf/lib/libc.a(vfprintf.o)(.text+0x1e30): In function `cvt':
: undefined reference to `__negdf2'
/gnude/arm-elf/lib/libc.a(dtoa.o)(.text+0x7c): In function `_dtoa_r':
: undefined reference to `__eqdf2'
not sure what i should do next. i think i'll start by removing the explicit libc.a from the linker command line.
I'm in the process of cross-compiling GTK+ 3.4.4 for Windows. I have already cross-compiled all of the build dependencies for GTK (ATK, Cairo, GDK Pixbuf, and Pango) and installed them to /usr/i686-w64-mingw32/.
Attempting to compile GTK itself, however, results in the following error:
In file included from gdkrgba.c:31:0:
fallback-c89.c:40:1: error: expected identifier or '(' before 'sizeof'
fallback-c89.c:40:1: error: expected ')' before '==' token
Line 34 - 44 of gdk/fallback-c89.c contains:
34. #ifndef HAVE_ISINF
35. /* Unfortunately MSVC does not have finite()
36. * but it does have _finite() which is the same
37. * as finite() except when x is a NaN
38. */
39. static inline gboolean
40. isinf (double x)
41. {
42. return (!_finite (x) && !_isnan (x));
43. }
44. #endif
I haven't the slightest idea where GCC is finding 'sizeof' or '=='. Why is the compiler throwing such a cryptic error message and how can I fix it?
Edit: here is the actual command line:
/usr/bin/i686-w64-mingw32-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I..
-DG_LOG_DOMAIN="Gdk" -DGDK_COMPILATION -I.. -I../gdk -I..
-DG_DISABLE_CAST_CHECKS -mms-bitfields
-I/usr/i686-w64-mingw32/include/pango-1.0
-I/usr/i686-w64-mingw32/include/glib-2.0
-I/usr/i686-w64-mingw32/lib/glib-2.0/include
-I/usr/i686-w64-mingw32/include/cairo -I/usr/i686-w64-mingw32/include/pixman-1
-I/usr/i686-w64-mingw32/include -I/usr/i686-w64-mingw32/include/freetype2
-I/usr/i686-w64-mingw32/include/libpng15
-I/usr/i686-w64-mingw32/include/gdk-pixbuf-2.0 -O2 -Wall -mms-bitfields -MT
gdkrgba.lo -MD -MP -MF .deps/gdkrgba.Tpo -c gdkrgba.c -DDLL_EXPORT -DPIC -o
.libs/gdkrgba.o
Further edit: after compiling with the -E option, I captured the following pre-processed output... which explains the strange sizeof:
# 39 "fallback-c89.c"
static inline gboolean
((sizeof (double x) == sizeof (float) ? __fpclassifyf (double x) : sizeof double x)) == (0x0100 | 0x0400))
{
return (!_finite (x) && !_isnan (x));
}
I can only conclude that isinf is already a defined macro. It is merely being expanded when used in the function declaration above.
My question now becomes... why is HAVE_ISINF not defined? Is it a problem with the configure script?
Yet another edit: okay, so I decided to search for everything in the build tree that contained the string 'HAVE_ISINF' and came across the following instances:
autom4te.cache/traces.1
m4trace:configure.ac:740: -1- AH_OUTPUT([HAVE_ISINF], [/* Define to 1 if you
have the `isinf\' function. */
#%:#undef HAVE_ISINF])
config.h.in
/* Define to 1 if you have the `isinf' function. */
#undef HAVE_ISINF
config.h
/* Define to 1 if you have the `isinf' function. */
/* #undef HAVE_ISINF */
Surprisingly, there is nothing in config.log mentioning `HAVE_ISINF'.
(Possibly) final edit: I did some more investigation and found the string 'isinf' in autom4te.cache/output.0 here: http://paste.ubuntu.com/1154478/
This code made a reference to ac_fn_c_check_func, so I dug up the source for that function and compiled the .c sample that the script generates:
test.c:25:6: warning: conflicting types for built-in function ‘isinf’
[enabled by default]
/tmp/ccLYd1R8.o:test.c:(.text+0xc): undefined reference to `_isinf'
collect2: ld returned 1 exit status
This is odd since my explanation above would suggest that isinf is simply a macro.
I finally found this. In summary:
"The isnan() and isinf() are C99 macros not functions so use AC_CHECK_DECL instead of AC_CHECK_FUNCS for those."
So it looks like I'll be patching the source.