Your name               : David Walker
Your email address      : [EMAIL PROTECTED]


System Configuration
---------------------
  Architecture (example: Intel Pentium)    : Intel PII(Linux) and Intel 
PPro(FBSD)

  Operating System (example: Linux 2.4.18) : Linux 2.6.9 & FreeBSD 
4.10-RELEASE-p3

  PostgreSQL version (example: PostgreSQL-7.4.6) :   PostgreSQL-7.4.6

  Compiler used (example:  gcc 2.95.2)  : Linux: gcc version 3.3.4
                                          FreeBSD: gcc version 2.95.4 20020320 

Please enter a FULL description of your problem:
------------------------------------------------

If PostgreSQL is compiled with PL/Perl enabled and linked against Perl 
compiled with  libperl.so rather than libperl.a, then when postmaster tries to 
load libplperl.so, libperl can't be found (Linux, one version of Perl 
installed) or is linked with the wrong version of Perl (FreeBSD system Perl in 
/usr and ports Perl in /usr/local).



Please describe a way to repeat the problem.   Please try to provide a
concise reproducible example, if at all possible: 
----------------------------------------------------------------------

Compile PostgreSQL with PL/Perl enabled and linked against Perl compiled with  
libperl.so. Run "createlang plperl test" (assuming you have a database named 
"test").
The command will fail with or "libperl.so not found" "Symbol not found".


If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------

This problem occurs because the library path to libperl.so is not included in 
libplperl.so.

This patch to postgresql-7.4.6/config/perl.m4 fixes the problem:

*** postgresql-7.4.6/config/perl.m4     Sat Nov 13 12:03:28 2004
--- postgresql-7.4.6-orig/config/perl.m4        Tue May 28 09:57:53 2002
***************
*** 30,35 ****
  AC_MSG_CHECKING(for flags to link embedded Perl)
  pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
  pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
! perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//"`
  AC_SUBST(perl_embed_ldflags)dnl
  AC_MSG_RESULT([$perl_embed_ldflags])])
--- 30,35 ----
  AC_MSG_CHECKING(for flags to link embedded Perl)
  pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
  pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
! perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"`
  AC_SUBST(perl_embed_ldflags)dnl
  AC_MSG_RESULT([$perl_embed_ldflags])])




Thanks to AndrewSN in #postgresql on FreeNode for figuring out how to fix this.

David Walker
--------
http://howto.mainstreamlinux.com



---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to