Compile failure in plperl

Started by Bruce Momjianalmost 22 years ago7 messageshackers
Jump to latest
#1Bruce Momjian
bruce@momjian.us

I am getting a CVS HEAD compile failure in plperl:

gmake[4]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl/tcl/modules'
gmake[3]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl/tcl'
gmake[3]: Entering directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl/plperl'
gcc -O2 -fno-strict-aliasing -O1 -Wpointer-arith -Wcast-align -fpic -I. -I/usr/libdata/perl5/5.00503/i386-bsdos/CORE -I../../../src/include -I/usr/local/include/readline -I/usr/contrib/include -c -o plperl.o plperl.c
plperl.c: In function `plperl_get_keys':
plperl.c:417: warning: passing arg 3 of `Perl_av_store' makes pointer from integer without a cast
plperl.c: In function `plperl_get_elem':
plperl.c:452: warning: passing arg 2 of `Perl_hv_exists_ent' makes pointer from integer without a cast
plperl.c: In function `plperl_func_handler':
plperl.c:930: warning: passing arg 3 of `Perl_av_store' makes pointer from integer without a cast
gcc -O2 -fno-strict-aliasing -O1 -Wpointer-arith -Wcast-align -fpic -I. -I/usr/libdata/perl5/5.00503/i386-bsdos/CORE -I../../../src/include -I/usr/local/include/readline -I/usr/contrib/include -c -o spi_internal.o spi_internal.c
/usr/bin/perl /usr/libdata/perl5/5.00503/ExtUtils/xsubpp -typemap /usr/libdata/perl5/5.00503/ExtUtils/typemap SPI.xs >SPI.c
gcc -O2 -fno-strict-aliasing -O1 -Wpointer-arith -Wcast-align -fpic -I. -I/usr/libdata/perl5/5.00503/i386-bsdos/CORE -I../../../src/include -I/usr/local/include/readline -I/usr/contrib/include -c -o SPI.o SPI.c
SPI.xs: In function `XS__spi_exec_query':
SPI.xs:51: `aTHX_' undeclared (first use in this function)
SPI.xs:51: (Each undeclared identifier is reported only once
SPI.xs:51: for each function it appears in.)
SPI.xs:51: syntax error before string constant
gmake[3]: *** [SPI.o] Error 1
gmake[3]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl/plperl'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src'
gmake: *** [all] Error 2

This is Perl version:

This is perl, version 5.005_03 built for i386-bsdos

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#2Andrew Dunstan
andrew@dunslane.net
In reply to: Bruce Momjian (#1)
Re: [HACKERS] Compile failure in plperl

The problem is your old version of perl.

Please see if the attached patch fixes it (The one I sent in previously
didn't apply cleanly - this one should).

thanks

andrew

Bruce Momjian wrote:

Show quoted text

I am getting a CVS HEAD compile failure in plperl:

gmake[4]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl/tcl/modules'
gmake[3]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl/tcl'
gmake[3]: Entering directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl/plperl'
gcc -O2 -fno-strict-aliasing -O1 -Wpointer-arith -Wcast-align -fpic -I. -I/usr/libdata/perl5/5.00503/i386-bsdos/CORE -I../../../src/include -I/usr/local/include/readline -I/usr/contrib/include -c -o plperl.o plperl.c
plperl.c: In function `plperl_get_keys':
plperl.c:417: warning: passing arg 3 of `Perl_av_store' makes pointer from integer without a cast
plperl.c: In function `plperl_get_elem':
plperl.c:452: warning: passing arg 2 of `Perl_hv_exists_ent' makes pointer from integer without a cast
plperl.c: In function `plperl_func_handler':
plperl.c:930: warning: passing arg 3 of `Perl_av_store' makes pointer from integer without a cast
gcc -O2 -fno-strict-aliasing -O1 -Wpointer-arith -Wcast-align -fpic -I. -I/usr/libdata/perl5/5.00503/i386-bsdos/CORE -I../../../src/include -I/usr/local/include/readline -I/usr/contrib/include -c -o spi_internal.o spi_internal.c
/usr/bin/perl /usr/libdata/perl5/5.00503/ExtUtils/xsubpp -typemap /usr/libdata/perl5/5.00503/ExtUtils/typemap SPI.xs >SPI.c
gcc -O2 -fno-strict-aliasing -O1 -Wpointer-arith -Wcast-align -fpic -I. -I/usr/libdata/perl5/5.00503/i386-bsdos/CORE -I../../../src/include -I/usr/local/include/readline -I/usr/contrib/include -c -o SPI.o SPI.c
SPI.xs: In function `XS__spi_exec_query':
SPI.xs:51: `aTHX_' undeclared (first use in this function)
SPI.xs:51: (Each undeclared identifier is reported only once
SPI.xs:51: for each function it appears in.)
SPI.xs:51: syntax error before string constant
gmake[3]: *** [SPI.o] Error 1
gmake[3]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl/plperl'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src'
gmake: *** [all] Error 2

This is Perl version:

This is perl, version 5.005_03 built for i386-bsdos

Attachments:

ppport.patchtext/x-patch; name=ppport.patchDownload+1058-976
#3Bruce Momjian
bruce@momjian.us
In reply to: Andrew Dunstan (#2)
Re: [HACKERS] Compile failure in plperl

Andrew Dunstan wrote:

The problem is your old version of perl.

Please see if the attached patch fixes it (The one I sent in previously
didn't apply cleanly - this one should).

With your patch I now get this failure:

gmake[4]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl/tcl/modules'
gmake[3]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl/tcl'
gmake[3]: Entering directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl/plperl'
gcc -O2 -fno-strict-aliasing -O1 -Wpointer-arith -Wcast-align -fpic -I. -I/usr/libdata/perl5/5.00503/i386-bsdos/CORE -I../../../src/include -I/usr/local/include/readline -I/usr/contrib/include -c -o plperl.o plperl.c
gcc -O2 -fno-strict-aliasing -O1 -Wpointer-arith -Wcast-align -fpic -I. -I/usr/libdata/perl5/5.00503/i386-bsdos/CORE -I../../../src/include -I/usr/local/include/readline -I/usr/contrib/include -c -o spi_internal.o spi_internal.c
/usr/bin/perl /usr/libdata/perl5/5.00503/ExtUtils/xsubpp -typemap /usr/libdata/perl5/5.00503/ExtUtils/typemap SPI.xs >SPI.c
gcc -O2 -fno-strict-aliasing -O1 -Wpointer-arith -Wcast-align -fpic -I. -I/usr/libdata/perl5/5.00503/i386-bsdos/CORE -I../../../src/include -I/usr/local/include/readline -I/usr/contrib/include -c -o SPI.o SPI.c
ar cr libplperl.a `lorder plperl.o spi_internal.o SPI.o | tsort`
ranlib libplperl.a
gcc -O2 -fno-strict-aliasing -O1 -Wpointer-arith -Wcast-align -fpic -shared -Wl,-x,-soname,libplperl.so.0 plperl.o spi_internal.o SPI.o -L../../../src/port -L/usr/local/lib -L/usr/contrib/lib -L/usr/X11/lib -L/usr/local/lib /usr/libdata/perl5/5.00503/i386-bsdos/auto/DynaLoader/DynaLoader.a -L/usr/libdata/perl5/5.00503/i386-bsdos/CORE -lperl -ldl -lm -lc -Wl,-rpath,/usr/libdata/perl5/5.00503/i386-bsdos/CORE -lc -Wl,-rpath,/usr/local/pgsql/lib -o libplperl.so.0.0
spi_internal.o: In function `Perl_grok_numeric_radix':
spi_internal.o(.text+0x128): multiple definition of `Perl_grok_numeric_radix'
plperl.o(.text+0x128): first defined here
spi_internal.o: In function `Perl_grok_number':
spi_internal.o(.text+0x1e8): multiple definition of `Perl_grok_number'
plperl.o(.text+0x1e8): first defined here
SPI.o: In function `Perl_grok_numeric_radix':
SPI.o(.text+0x128): multiple definition of `Perl_grok_numeric_radix'
plperl.o(.text+0x128): first defined here
SPI.o: In function `Perl_grok_number':
SPI.o(.text+0x1e8): multiple definition of `Perl_grok_number'
plperl.o(.text+0x1e8): first defined here
gmake[3]: *** [libplperl.so.0.0] Error 1
gmake[3]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl/plperl'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src'
gmake: *** [all] Error 2

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#4Andrew Dunstan
andrew@dunslane.net
In reply to: Bruce Momjian (#3)
Re: [HACKERS] Compile failure in plperl

That is *intensely* annoying. What on earth are these function bodies
doing in a .h file anyway? (Remember, I just used the standard utility
to generate the file).

Anyway, here is a version with all that stuff cut out - I don't believe
we need any of it. Does this improve things?

cheers

andrew

Bruce Momjian wrote:

Show quoted text

Andrew Dunstan wrote:

The problem is your old version of perl.

Please see if the attached patch fixes it (The one I sent in previously
didn't apply cleanly - this one should).

With your patch I now get this failure:

gmake[4]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl/tcl/modules'
gmake[3]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl/tcl'
gmake[3]: Entering directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl/plperl'
gcc -O2 -fno-strict-aliasing -O1 -Wpointer-arith -Wcast-align -fpic -I. -I/usr/libdata/perl5/5.00503/i386-bsdos/CORE -I../../../src/include -I/usr/local/include/readline -I/usr/contrib/include -c -o plperl.o plperl.c
gcc -O2 -fno-strict-aliasing -O1 -Wpointer-arith -Wcast-align -fpic -I. -I/usr/libdata/perl5/5.00503/i386-bsdos/CORE -I../../../src/include -I/usr/local/include/readline -I/usr/contrib/include -c -o spi_internal.o spi_internal.c
/usr/bin/perl /usr/libdata/perl5/5.00503/ExtUtils/xsubpp -typemap /usr/libdata/perl5/5.00503/ExtUtils/typemap SPI.xs >SPI.c
gcc -O2 -fno-strict-aliasing -O1 -Wpointer-arith -Wcast-align -fpic -I. -I/usr/libdata/perl5/5.00503/i386-bsdos/CORE -I../../../src/include -I/usr/local/include/readline -I/usr/contrib/include -c -o SPI.o SPI.c
ar cr libplperl.a `lorder plperl.o spi_internal.o SPI.o | tsort`
ranlib libplperl.a
gcc -O2 -fno-strict-aliasing -O1 -Wpointer-arith -Wcast-align -fpic -shared -Wl,-x,-soname,libplperl.so.0 plperl.o spi_internal.o SPI.o -L../../../src/port -L/usr/local/lib -L/usr/contrib/lib -L/usr/X11/lib -L/usr/local/lib /usr/libdata/perl5/5.00503/i386-bsdos/auto/DynaLoader/DynaLoader.a -L/usr/libdata/perl5/5.00503/i386-bsdos/CORE -lperl -ldl -lm -lc -Wl,-rpath,/usr/libdata/perl5/5.00503/i386-bsdos/CORE -lc -Wl,-rpath,/usr/local/pgsql/lib -o libplperl.so.0.0
spi_internal.o: In function `Perl_grok_numeric_radix':
spi_internal.o(.text+0x128): multiple definition of `Perl_grok_numeric_radix'
plperl.o(.text+0x128): first defined here
spi_internal.o: In function `Perl_grok_number':
spi_internal.o(.text+0x1e8): multiple definition of `Perl_grok_number'
plperl.o(.text+0x1e8): first defined here
SPI.o: In function `Perl_grok_numeric_radix':
SPI.o(.text+0x128): multiple definition of `Perl_grok_numeric_radix'
plperl.o(.text+0x128): first defined here
SPI.o: In function `Perl_grok_number':
SPI.o(.text+0x1e8): multiple definition of `Perl_grok_number'
plperl.o(.text+0x1e8): first defined here
gmake[3]: *** [libplperl.so.0.0] Error 1
gmake[3]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl/plperl'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src'
gmake: *** [all] Error 2

Attachments:

ppport.htext/x-c-header; name=ppport.hDownload
#5Bruce Momjian
bruce@momjian.us
In reply to: Andrew Dunstan (#4)
Re: [HACKERS] Compile failure in plperl

Andrew Dunstan wrote:

That is *intensely* annoying. What on earth are these function bodies
doing in a .h file anyway? (Remember, I just used the standard utility
to generate the file).

Anyway, here is a version with all that stuff cut out - I don't believe
we need any of it. Does this improve things?

Nope. I get this failure:

gmake[4]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl/tcl/modules'
gmake[3]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl/tcl'
gmake[3]: Entering directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl/plperl'
gcc -O2 -fno-strict-aliasing -O1 -Wpointer-arith -Wcast-align -fpic -I. -I/usr/libdata/perl5/5.00503/i386-bsdos/CORE -I../../../src/include -I/usr/local/include/readline -I/usr/contrib/include -c -o plperl.o plperl.c
gcc -O2 -fno-strict-aliasing -O1 -Wpointer-arith -Wcast-align -fpic -I. -I/usr/libdata/perl5/5.00503/i386-bsdos/CORE -I../../../src/include -I/usr/local/include/readline -I/usr/contrib/include -c -o spi_internal.o spi_internal.c
/usr/bin/perl /usr/libdata/perl5/5.00503/ExtUtils/xsubpp -typemap /usr/libdata/perl5/5.00503/ExtUtils/typemap SPI.xs >SPI.c
gcc -O2 -fno-strict-aliasing -O1 -Wpointer-arith -Wcast-align -fpic -I. -I/usr/libdata/perl5/5.00503/i386-bsdos/CORE -I../../../src/include -I/usr/local/include/readline -I/usr/contrib/include -c -o SPI.o SPI.c
SPI.xs: In function `XS__spi_exec_query':
SPI.xs:51: `aTHX_' undeclared (first use in this function)
SPI.xs:51: (Each undeclared identifier is reported only once
SPI.xs:51: for each function it appears in.)
SPI.xs:51: syntax error before string constant
gmake[3]: *** [SPI.o] Error 1
gmake[3]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl/plperl'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src'
gmake: *** [all] Error 2

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#6Andrew Dunstan
andrew@dunslane.net
In reply to: Bruce Momjian (#5)
Re: [HACKERS] Compile failure in plperl

Ok. It's impossible for me to fix this by remote control - I need access
to some box with one of these old versions of perl so I can come up with
a clean solution.

Or did you revert the change that put "#include ppport.h" in SPI.xs?

cheers

andrew

Bruce Momjian wrote:

Show quoted text

Andrew Dunstan wrote:

That is *intensely* annoying. What on earth are these function bodies
doing in a .h file anyway? (Remember, I just used the standard utility
to generate the file).

Anyway, here is a version with all that stuff cut out - I don't believe
we need any of it. Does this improve things?

Nope. I get this failure:

gmake[4]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl/tcl/modules'
gmake[3]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl/tcl'
gmake[3]: Entering directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl/plperl'
gcc -O2 -fno-strict-aliasing -O1 -Wpointer-arith -Wcast-align -fpic -I. -I/usr/libdata/perl5/5.00503/i386-bsdos/CORE -I../../../src/include -I/usr/local/include/readline -I/usr/contrib/include -c -o plperl.o plperl.c
gcc -O2 -fno-strict-aliasing -O1 -Wpointer-arith -Wcast-align -fpic -I. -I/usr/libdata/perl5/5.00503/i386-bsdos/CORE -I../../../src/include -I/usr/local/include/readline -I/usr/contrib/include -c -o spi_internal.o spi_internal.c
/usr/bin/perl /usr/libdata/perl5/5.00503/ExtUtils/xsubpp -typemap /usr/libdata/perl5/5.00503/ExtUtils/typemap SPI.xs >SPI.c
gcc -O2 -fno-strict-aliasing -O1 -Wpointer-arith -Wcast-align -fpic -I. -I/usr/libdata/perl5/5.00503/i386-bsdos/CORE -I../../../src/include -I/usr/local/include/readline -I/usr/contrib/include -c -o SPI.o SPI.c
SPI.xs: In function `XS__spi_exec_query':
SPI.xs:51: `aTHX_' undeclared (first use in this function)
SPI.xs:51: (Each undeclared identifier is reported only once
SPI.xs:51: for each function it appears in.)
SPI.xs:51: syntax error before string constant
gmake[3]: *** [SPI.o] Error 1
gmake[3]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl/plperl'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src'
gmake: *** [all] Error 2

#7Bruce Momjian
bruce@momjian.us
In reply to: Andrew Dunstan (#6)
Re: [HACKERS] Compile failure in plperl

Andrew has developed the following patch which allows Perl 5.05 to
compile plperl. I have applied the patch because it is causing compile
failures for testers.

---------------------------------------------------------------------------

Andrew Dunstan wrote:

Ok. It's impossible for me to fix this by remote control - I need access
to some box with one of these old versions of perl so I can come up with
a clean solution.

Or did you revert the change that put "#include ppport.h" in SPI.xs?

cheers

andrew

Bruce Momjian wrote:

Andrew Dunstan wrote:

That is *intensely* annoying. What on earth are these function bodies
doing in a .h file anyway? (Remember, I just used the standard utility
to generate the file).

Anyway, here is a version with all that stuff cut out - I don't believe
we need any of it. Does this improve things?

Nope. I get this failure:

gmake[4]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl/tcl/modules'
gmake[3]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl/tcl'
gmake[3]: Entering directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl/plperl'
gcc -O2 -fno-strict-aliasing -O1 -Wpointer-arith -Wcast-align -fpic -I. -I/usr/libdata/perl5/5.00503/i386-bsdos/CORE -I../../../src/include -I/usr/local/include/readline -I/usr/contrib/include -c -o plperl.o plperl.c
gcc -O2 -fno-strict-aliasing -O1 -Wpointer-arith -Wcast-align -fpic -I. -I/usr/libdata/perl5/5.00503/i386-bsdos/CORE -I../../../src/include -I/usr/local/include/readline -I/usr/contrib/include -c -o spi_internal.o spi_internal.c
/usr/bin/perl /usr/libdata/perl5/5.00503/ExtUtils/xsubpp -typemap /usr/libdata/perl5/5.00503/ExtUtils/typemap SPI.xs >SPI.c
gcc -O2 -fno-strict-aliasing -O1 -Wpointer-arith -Wcast-align -fpic -I. -I/usr/libdata/perl5/5.00503/i386-bsdos/CORE -I../../../src/include -I/usr/local/include/readline -I/usr/contrib/include -c -o SPI.o SPI.c
SPI.xs: In function `XS__spi_exec_query':
SPI.xs:51: `aTHX_' undeclared (first use in this function)
SPI.xs:51: (Each undeclared identifier is reported only once
SPI.xs:51: for each function it appears in.)
SPI.xs:51: syntax error before string constant
gmake[3]: *** [SPI.o] Error 1
gmake[3]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl/plperl'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/pl'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src'
gmake: *** [all] Error 2

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

!DSPAM:40e8839e277026631821392!

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Attachments:

/bjm/difftext/plainDownload+774-738