Error building PL/Perl (Postgres) under Cygwin

Поиск
Список
Период
Сортировка
От Edward Q. Bridges
Тема Error building PL/Perl (Postgres) under Cygwin
Дата
Msg-id 200011101531.eAAFVUs28086@mail.postgresql.org
обсуждение исходный текст
Список pgsql-ports
(note:  i posted this earlier this week and didn't receive any answers,
        i'm hoping that maybe people just missed it.  kevin & jason, my
        apologies for addressing you directly, but you answered analogous
        questions this week about postgres on nt and hoped you may be able
        offer some insight.  THANKS!!!)

I've successfully gotten Postgres and Perl working on a cygwin port,
and am now trying to get PL/Perl to work as well.

(PL/Perl is a plugin to the Postgres Database which allows
one to create functions within the RDBMS written in Perl)

Here are the specs:
Windows NT Workstation, 4.0 (S.P. 6a)
Cygwin DLL v. 1.1.4(0.2632)
Postgres 7.02
Perl 5.6.0
CygIPC 1.07-1

I successfully followed the instructions for installing Postgres at this url:
http://people.freebsd.org/~kevlo/postgres/portNT.html

And I successfully used the binary perl distribution from here:
http://cygutils.netpedia.net/V1.1/perl-5.6.0/index.html

However, when I goto $POSTGRES_SRC/src/pl/plperl and run
$ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/perl5/5.6.0/cygwin/CORE:/usr/local/bin \
  perl Makefile.PL POLLUTE=1
$ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/perl5/5.6.0/cygwin/CORE:/usr/local/bin \
  make
I get the messages appended at the end of the email.  I'm having trouble deciphering
these messages and determining whether this is a "Cygwin" issue or a "PLPerl" issue, and
what exactly to do about fixing it.

My questions:
*  Is this a problem with cygwin's ld2 or dllwrap?  or is it a problem where the perl distro
   i am using didn't have an "export definition file" with it?  or ???
*  What can I do to fix it :)

Thanks!!!
ed



$ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/perl5/5.6.0/cygwin/CORE:/usr/local/bin make
mkdir blib
mkdir blib/lib
mkdir blib/arch
mkdir blib/arch/auto
mkdir blib/arch/auto/plperl
mkdir blib/lib/auto
mkdir blib/lib/auto/plperl
gcc -c -I../../../src/include -I../../../src/backend -I/usr/local/include -fno-strict-aliasing -I/us
r/local/include -DPERL_POLLUTE  -DUSEIMPORTLIB -O     -DVERSION=\"0.10\" -DXS_VERSION=\"0.10\"  -I/u
sr/local/lib/perl5/5.6.0/cygwin/CORE  plperl.c
In file included from plperl.c:76:
/usr/local/lib/perl5/5.6.0/cygwin/CORE/perl.h:2027: warning: `DEBUG' redefined
../../../src/include/utils/elog.h:22: warning: this is the location of the previous definition
gcc -c -I../../../src/include -I../../../src/backend -I/usr/local/include -fno-strict-aliasing -I/us
r/local/include -DPERL_POLLUTE  -DUSEIMPORTLIB -O     -DVERSION=\"0.10\" -DXS_VERSION=\"0.10\"  -I/u
sr/local/lib/perl5/5.6.0/cygwin/CORE  eloglvl.c
/usr/local/bin/perl -I/usr/local/lib/perl5/5.6.0/cygwin -I/usr/local/lib/perl5/5.6.0 /usr/local/lib/
perl5/5.6.0/ExtUtils/xsubpp  -typemap /usr/local/lib/perl5/5.6.0/ExtUtils/typemap SPI.xs > SPI.xsc &
& mv SPI.xsc SPI.c
gcc -c -I../../../src/include -I../../../src/backend -I/usr/local/include -fno-strict-aliasing -I/us
r/local/include -DPERL_POLLUTE  -DUSEIMPORTLIB -O     -DVERSION=\"0.10\" -DXS_VERSION=\"0.10\"  -I/u
sr/local/lib/perl5/5.6.0/cygwin/CORE  SPI.c
In file included from SPI.xs:41:
/usr/local/lib/perl5/5.6.0/cygwin/CORE/perl.h:2027: warning: `DEBUG' redefined
../../../src/include/utils/elog.h:22: warning: this is the location of the previous definition
Running Mkbootstrap for plperl ()
chmod 644 plperl.bs
LD_RUN_PATH="" ld2 -o blib/arch/auto/plperl/plperl.dll  -L/usr/local/lib plperl.o eloglvl.o SPI.o /u
sr/local/lib/perl5/5.6.0/cygwin/auto/Opcode/Opcode.dll -L/usr/local/lib/perl5/5.6.0/cygwin/CORE -lpe
rl  /usr/local/lib/perl5/5.6.0/cygwin/CORE/libperl5_6_0.a
dllwrap --dllname plperl.dll --driver-name gcc --dlltool dlltool --export-all-symbols --as as --outp
ut-def libplperl.def --output-lib libplperl.a \
 -L/usr/local/lib plperl.o eloglvl.o SPI.o /usr/local/lib/perl5/5.6.0/cygwin/auto/Opcode/Opcode.dll
-L/usr/local/lib/perl5/5.6.0/cygwin/CORE -lperl /usr/local/lib/perl5/5.6.0/cygwin/CORE/libperl5_6_0.
a
dllwrap: no export definition file provided
dllwrap: creating one, but that may not be what you want
/usr/bin/ld: warning: cannot find entry symbol __cygwin_dll_entry@12; defaulting to 62881000
plperl.o(.text+0x1d4):plperl.c: undefined reference to `elog'
.
. [ lots of "undefined reference" messages deleted ]
.
plperl.o(.text+0x1526):plperl.c: undefined reference to `MemoryContextFree'
SPI.o(.text+0xf3):SPI.c: undefined reference to `elog'
collect2: ld returned 1 exit status
dllwrap: gcc exited with status 1
perlld: *** system() failed to execute
dllwrap --dllname plperl.dll --driver-name gcc --dlltool dlltool --export-all-symbols --as as --outp
ut-def libplperl.def --output-lib libplperl.a \
 -L/usr/local/lib plperl.o eloglvl.o SPI.o /usr/local/lib/perl5/5.6.0/cygwin/auto/Opcode/Opcode.dll
-L/usr/local/lib/perl5/5.6.0/cygwin/CORE -lperl /usr/local/lib/perl5/5.6.0/cygwin/CORE/libperl5_6_0.
a

make: *** [blib/arch/auto/plperl/plperl.dll] Error 1






В списке pgsql-ports по дате отправления:

Предыдущее
От: Jason Tishler
Дата:
Сообщение: Re: PostgreSQL on NT
Следующее
От: "Silberman, Malcolm (BHR)"
Дата:
Сообщение: Problem compiling with RedHat 7