Skip site navigation (1) Skip section navigation (2)

Re: [INTERFACES] problem with LOAD

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: abdelkrim <haj(at)idianet(dot)net>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [INTERFACES] problem with LOAD
Date: 1999-05-20 16:41:36
Message-ID: Pine.GSO.3.96.SK.990520203508.7536J-100000@ra (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-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 $(at)(dot)pic
        @${AR} cq $(at)(dot)pic order $<.obj | tsort
        ${RANLIB} $(at)(dot)pic
        @rm -f $@
        $(LD) -x -Bshareable -Bforcearchive -o $@ $(at)(dot)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(at)idianet(dot)net>
> To: pgsql-general(at)postgresql(dot)org, pgsql-interfaces(at)postgresql(dot)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(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83


In response to

pgsql-interfaces by date

Next:From: Alex TurnerDate: 1999-05-20 18:00:52
Subject: JDBC from remote
Previous:From: rootDate: 1999-05-20 15:55:45
Subject: lo_read error ???

pgsql-general by date

Next:From: Jackson, DeJuanDate: 1999-05-20 18:01:25
Subject: RE: [GENERAL] Relations between tables.
Previous:From: christianDate: 1999-05-20 15:33:17
Subject: Relations between tables.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group