pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: [INTERFACES] problem with LOAD
2+ messages / 2 participants
[nested] [flat]

* Re: [INTERFACES] problem with LOAD
@ 1999-05-20 16:41  Oleg Bartunov <oleg@sai.msu.su>
  parent: abdelkrim <haj@idianet.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Oleg Bartunov @ 1999-05-20 16:41 UTC (permalink / raw)
  To: abdelkrim <haj@idianet.net>; +Cc: pgsql-general@postgresql.org; pgsql-interfaces

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 LOAD
> 
> hello 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.o
> >> ld -x -r -o complex.o.obj complex.o
> >> ranlib complex.so.pic
> >> ld -x -Bshareable -o complex.so complex.so.pic
> 
> I 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




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* problem with LOAD
@ 1999-05-20 18:06  abdelkrim <haj@idianet.net>
  0 siblings, 1 reply; 2+ messages in thread

From: abdelkrim @ 1999-05-20 18:06 UTC (permalink / raw)
  To: pgsql-general@postgreSQL.org; pgsql-interfaces

hello 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.o
>> ld -x -r -o complex.o.obj complex.o
>> ranlib complex.so.pic
>> ld -x -Bshareable -o complex.so complex.so.pic

I use FreeBSD-3.1 with PostgreSQL 6.4.2

thanks





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~1999-05-20 18:06 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-05-20 18:06 problem with LOAD abdelkrim <haj@idianet.net>
1999-05-20 16:41 ` Oleg Bartunov <oleg@sai.msu.su>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox