Re: [INTERFACES] problem with LOAD
This is a known problem with FreeBSD-3.1 and PostgreSQL I had too with
6.5 cvs version. I suppose you use FreeBSD elf ? Take a look to
ports for freebsd-elf specific patches or just change
src/Makefile.shlib
ifeq ($(PORTNAME), freebsd)
ifdef BSD_SHLIB
install-shlib-dep := install-shlib
ifdef ELF_SYSTEM
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
LDFLAGS_SL := -x -shared -soname $(shlib)
else
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LDFLAGS_SL := -x -Bshareable -Bforcearchive
endif
CFLAGS += $(CFLAGS_SL)
endif
endif
and makefiles/Makefile.freebsd
ifdef ELF_SYSTEM
LDFLAGS+= -export-dynamic
endif
%.so: %.o
ifdef ELF_SYSTEM
$(LD) -x -shared -o $@ $<
else
$(LD) -x -r -o $<.obj $<
@echo building shared object $@
@rm -f $@.pic
@${AR} cq $@.pic order $<.obj | tsort
${RANLIB} $@.pic
@rm -f $@
$(LD) -x -Bshareable -Bforcearchive -o $@ $@.pic
endif
This works for me !
Regards,
Oleg
PS.
These patches are already applied to current 6.5 sources.
On Thu, 20 May 1999, abdelkrim wrote:
Date: Thu, 20 May 1999 18:06:30 +0000
From: abdelkrim <haj@idianet.net>
To: pgsql-general@postgresql.org, pgsql-interfaces@postgresql.org
Subject: [INTERFACES] problem with LOADhello every body
i have some problem with LOAD command
postgres=> LOAD '/usr/local/pgsql/complex.so';
pqReadData() -- backend closed the channel unexpectedly.
This probably means the backend terminated abnormally before or while
processing the request.
We have lost the connection to the backend, so further processing is
impossible. Terminating.
$>>I build complex.so by:
gcc -I../include -I../backend -O2 -m486 -pipe -Wall
-Wmissing-prototypes -I../interfaces/libpq -I../../include -c
complex.c -o complex.old -x -r -o complex.o.obj complex.o
ranlib complex.so.pic
ld -x -Bshareable -o complex.so complex.so.picI use FreeBSD-3.1 with PostgreSQL 6.4.2
thanks
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83
Import Notes
Reply to msg id not found: 37444F26.B1BC47A@idianet.net