hi

isinf() is not build to libecpg.so if build and install postgresql by source on solaris9.
(isinf() is not contained within solaris9 system.)

bash-2.05$ nm /usr/local/pgsql/lib/libecpg.so | grep isinf
[215]   |         0|       0|FUNC |GLOB |0    |UNDEF  |isinf

It(isinf missing) will causes ecpg program compile error such as follows.

bash-2.05$ ecpg test.pgc
bash-2.05$ cc -I/usr/local/pgsql/include -L/usr/local/pgsql/lib -lecpg test.c -o test
Undefined                       first referenced
 symbol                             in file
isinf                               /usr/local/pgsql/lib/libecpg.so
ld: fatal: Symbol referencing errors. No output written to test


I modify src/interfaces/ecpg/ecpglib/Makefile to resolve this problem.
The diff file refer to the attachment "ecpglib-Makefile.patch".

Regards,
Jiang Guiqing
int main(void)
{
        EXEC SQL CONNECT TO tcp:postgresql://localhost:5432/postgres USER 
postgres;
        EXEC SQL CREATE TABLE testecpg (id int, data text);
        EXEC SQL DISCONNECT;
        return 0;
}


diff --git a/src/interfaces/ecpg/ecpglib/Makefile 
b/src/interfaces/ecpg/ecpglib/Makefile
index 565df3c..daac615 100644
--- a/src/interfaces/ecpg/ecpglib/Makefile
+++ b/src/interfaces/ecpg/ecpglib/Makefile
@@ -26,7 +26,7 @@ LIBS := $(filter-out -lpgport, $(LIBS))
 
 OBJS= execute.o typename.o descriptor.o sqlda.o data.o error.o prepare.o 
memory.o \
        connect.o misc.o path.o pgstrcasecmp.o \
-       $(filter snprintf.o strlcpy.o win32setlocale.o, $(LIBOBJS))
+       $(filter snprintf.o strlcpy.o win32setlocale.o isinf.o, $(LIBOBJS))
 
 # thread.c is needed only for non-WIN32 implementation of path.c
 ifneq ($(PORTNAME), win32)
@@ -57,7 +57,7 @@ include $(top_srcdir)/src/Makefile.shlib
 # necessarily use the same object files as the backend uses. Instead,
 # symlink the source files in here and build our own object file.
 
-path.c pgstrcasecmp.c snprintf.c strlcpy.c thread.c win32setlocale.c: % : 
$(top_srcdir)/src/port/%
+path.c pgstrcasecmp.c snprintf.c strlcpy.c thread.c win32setlocale.c isinf.c: 
% : $(top_srcdir)/src/port/%
        rm -f $@ && $(LN_S) $< .
 
 misc.o: misc.c $(top_builddir)/src/port/pg_config_paths.h
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to