Thread: Plperl make fails with Error1 at plperl.o (7.0.3)
Hello all, I'm resending the message sent by "turing2000" on November 16th. Because I'm having the exact same problem. My configuration is as follows: RedHat 7.0, originally installed the RPM version of PostgreSQL 7.0.2, then downloaded source and upgraded to 7.0.3... Now that I've gotten further along in my project I have need of a Procedural Language, and I figured PL/Perl would be easy... I have been mistaken... as it refuses to compile despite my best efforts. The error below is EXACTLY the same as what I am getting. Any help would be appreciated. -Michael Miyabara-McCaskey > -----Original Message----- > From: pgsql-admin-owner@postgresql.org > [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of turing2000 > Sent: Thursday, November 16, 2000 8:25 AM > To: pgsql-admin@postgresql.org > Subject: [ADMIN] > > > > Deal ( question ) consist of: > > [plperl]# 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 > -fno-strict-aliasing -D_LARGEFILE_SOURCE > -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"0.10\" > -DXS_VERSION=\"0.10\" -fpic > -I/usr/local/perl/lib/5.6.0/i686-linux/CORE plperl.c > In file included from plperl.c:76: > /usr/local/perl/lib/5.6.0/i686-linux/CORE/perl.h:467: > warning: `USE_LOCALE' redefined > ../../../src/include/config.h:214: warning: this is the > location of the previous definition > In file included from plperl.c:76: > /usr/local/perl/lib/5.6.0/i686-linux/CORE/perl.h:2027: > warning: `DEBUG' redefined > ../../../src/include/utils/elog.h:22: warning: this is the > location of the previous definition > plperl.c: In function `plperl_create_sub': > plperl.c:328: `errgv' undeclared (first use in this function) > plperl.c:328: (Each undeclared identifier is reported only once > plperl.c:328: for each function it appears in.) > plperl.c:334: `na' undeclared (first use in this function) > plperl.c: In function `plperl_call_perl_func': > plperl.c:444: `errgv' undeclared (first use in this function) > plperl.c:450: `na' undeclared (first use in this function) > plperl.c: In function `plperl_func_handler': > plperl.c:654: `na' undeclared (first use in this function) > plperl.c: In function `plperl_build_tuple_argument': > plperl.c:2192: `na' undeclared (first use in this function) > make: *** [plperl.o] Error 1 > > > > What is that may be? > > turing2000 >
"Michael Miyabara-McCaskey" <mykarz@miyabara.com> writes: >> plperl.c: In function `plperl_create_sub': >> plperl.c:328: `errgv' undeclared (first use in this function) >> plperl.c:328: (Each undeclared identifier is reported only once >> plperl.c:328: for each function it appears in.) >> plperl.c:334: `na' undeclared (first use in this function) >> plperl.c: In function `plperl_call_perl_func': >> plperl.c:444: `errgv' undeclared (first use in this function) >> plperl.c:450: `na' undeclared (first use in this function) >> plperl.c: In function `plperl_func_handler': >> plperl.c:654: `na' undeclared (first use in this function) >> plperl.c: In function `plperl_build_tuple_argument': >> plperl.c:2192: `na' undeclared (first use in this function) >> make: *** [plperl.o] Error 1 In 7.0.*, for some versions of Perl you must do perl Makefile.PL POLLUTE=1 make make install regards, tom lane
"Michael Miyabara-McCaskey" <mykarz@miyabara.com> writes: > ... I am now getting the error message that: > ERROR: Load of file /usr/local/pgsql/lib/plperl.so failed: shared object not > open Hm. That's a pretty unhelpfully worded error message, isn't it? You may be able to find a more extensive error report in the postmaster's log file, assuming you routed the postmaster's stderr to someplace other than /dev/null. But I'll bet that the real problem is not with plperl.so but with Perl's libperl.so, which plperl.so depends on. On the Perl versions I've used, a shared library version of libperl is *not* built unless you specifically request it while configuring the Perl build. On some platforms you get a usable shlib anyway, on some you don't. Another possibility is that libperl.so exists but is not being found by the dynamic loader; you may need to run ldconfig or set LD_LIBRARY_PATH or some such to include the proper directory in the Perl install in the search path. regards, tom lane
Turing, Thank you for the advice, the "pollute=1" was an important step, that Tom Lane also helped me out with... it did get me past the error, however, I then got... >ERROR: Load of file /usr/local/pgsql/lib/plperl.so failed: shared object not open For your own notes, if it's ever an issue. This second error was actually caused by the "libperl.so" not being in the LD_LIBRARY_PATH. With for me was fixed by adding "/usr/local/bin" to my "/etc/ld.so.conf" file, and then running ldconfig. Thank you again for the help. -Michael > -----Original Message----- > From: turing2000 [mailto:turing2000@mail.ru] > Sent: Wednesday, December 13, 2000 3:05 AM > To: mykarz@miyabara.com > Subject: Re: Plperl make fails with Error1 at plperl.o (7.0.3) > > > cd /usr/src/perl_package # go into YOU directory > ./configure -Duseshrplib -des # --------------important step > !! ---------------- > make > make test > make install > # now you get perl with shared libperl.so > > cd /usr/src/postgres_package # go into YOU directory > cd ./pl/plperl # I don't remember exactly directory name, > verify by bash or > file maneger > perl Makefile.PL POLLUTE=1 # --------------important step > !! ---------------- > make > > # while "create function", "create language" use exactly name > "plperl_call_handler" as sed in pg documentation > > > ----- Original Message ----- > From: Michael Miyabara-McCaskey <mykarz@miyabara.com> > To: <pgsql-admin@postgresql.org>; <pgsql-interfaces@postgresql.org> > Cc: 'turing2000' <turing2000@mail.ru> > Sent: Monday, December 11, 2000 1:25 AM > Subject: Plperl make fails with Error1 at plperl.o (7.0.3) > > > > Hello all, I'm resending the message sent by "turing2000" > on November > 16th. > > > > Because I'm having the exact same problem. > > > > My configuration is as follows: RedHat 7.0, originally > installed the RPM > > version of PostgreSQL 7.0.2, then downloaded source and upgraded to > 7.0.3... > > Now that I've gotten further along in my project I have need of a > Procedural > > Language, and I figured PL/Perl would be easy... > > > > I have been mistaken... as it refuses to compile despite my > best efforts. > > The error below is EXACTLY the same as what I am getting. > > > > Any help would be appreciated. > > > > -Michael Miyabara-McCaskey > > > > > -----Original Message----- > > > From: pgsql-admin-owner@postgresql.org > > > [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of turing2000 > > > Sent: Thursday, November 16, 2000 8:25 AM > > > To: pgsql-admin@postgresql.org > > > Subject: [ADMIN] > > > > > > > > > > > > Deal ( question ) consist of: > > > > > > [plperl]# 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 > > > -fno-strict-aliasing -D_LARGEFILE_SOURCE > > > -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"0.10\" > > > -DXS_VERSION=\"0.10\" -fpic > > > -I/usr/local/perl/lib/5.6.0/i686-linux/CORE plperl.c > > > In file included from plperl.c:76: > > > /usr/local/perl/lib/5.6.0/i686-linux/CORE/perl.h:467: > > > warning: `USE_LOCALE' redefined > > > ../../../src/include/config.h:214: warning: this is the > > > location of the previous definition > > > In file included from plperl.c:76: > > > /usr/local/perl/lib/5.6.0/i686-linux/CORE/perl.h:2027: > > > warning: `DEBUG' redefined > > > ../../../src/include/utils/elog.h:22: warning: this is the > > > location of the previous definition > > > plperl.c: In function `plperl_create_sub': > > > plperl.c:328: `errgv' undeclared (first use in this function) > > > plperl.c:328: (Each undeclared identifier is reported only once > > > plperl.c:328: for each function it appears in.) > > > plperl.c:334: `na' undeclared (first use in this function) > > > plperl.c: In function `plperl_call_perl_func': > > > plperl.c:444: `errgv' undeclared (first use in this function) > > > plperl.c:450: `na' undeclared (first use in this function) > > > plperl.c: In function `plperl_func_handler': > > > plperl.c:654: `na' undeclared (first use in this function) > > > plperl.c: In function `plperl_build_tuple_argument': > > > plperl.c:2192: `na' undeclared (first use in this function) > > > make: *** [plperl.o] Error 1 > > > > > > > > > > What is that may be? > > > > > > turing2000 > > > > > > > >
Tom, Again your help was excellent and on target. I had gone through the fun and games of building a shared libperl.so, and the plperl.so... but... The LD_LIBRARY_PATH was the culprit. As I'm running RedHat, by default it does not create a /usr/local/bin, but I created one by hand, and then dumped my libperl.so there... Well... This was not in the "/etc/ld.so.conf" file. So I added the path, and ran the ldconfig and presto... Everything works very well. With Perl up and running I'm actually able to make PostgreSQL drive around the block a few times. Thank you again. -Michael > -----Original Message----- > From: pgsql-interfaces-owner@postgresql.org > [mailto:pgsql-interfaces-owner@postgresql.org]On Behalf Of Tom Lane > Sent: Sunday, December 10, 2000 5:12 PM > To: mykarz@miyabara.com > Cc: pgsql-interfaces@postgresql.org > Subject: Re: [INTERFACES] Plperl make fails with Error1 at plperl.o > (7.0.3) > > > "Michael Miyabara-McCaskey" <mykarz@miyabara.com> writes: > > ... I am now getting the error message that: > > > ERROR: Load of file /usr/local/pgsql/lib/plperl.so failed: > shared object not > > open > > Hm. That's a pretty unhelpfully worded error message, isn't it? > You may be able to find a more extensive error report in the > postmaster's log file, assuming you routed the postmaster's stderr > to someplace other than /dev/null. > > But I'll bet that the real problem is not with plperl.so but > with Perl's > libperl.so, which plperl.so depends on. On the Perl versions > I've used, > a shared library version of libperl is *not* built unless you > specifically request it while configuring the Perl build. On some > platforms you get a usable shlib anyway, on some you don't. > > Another possibility is that libperl.so exists but is not being found > by the dynamic loader; you may need to run ldconfig or set > LD_LIBRARY_PATH or some such to include the proper directory in the > Perl install in the search path. > > regards, tom lane >