Received: from mailhost.conquestnetwork.com (root@mailhost.conquestnetwork.com [194.72.178.183]) by hub.org (8.9.3/8.9.3) with ESMTP id OAA04916; Mon, 22 May 2000 14:53:59 -0400 (EDT) (envelope-from rhakonarson@conquestnetwork.com) Received: from ragnar ([192.168.0.46]) by mailhost.conquestnetwork.com (8.9.3/8.8.8) with SMTP id TAA25960; Mon, 22 May 2000 19:55:29 +0100 From: "Ragnar Hakonarson" To: , , Subject: plperl difficulties Date: Mon, 22 May 2000 19:54:59 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 X-Archive-Number: 200005/233 Hi, I have statically linked the DynaLoader with plperl.so and modified plperl.c so that plperl functions executes do not execute within the 'safe compartment'. plperl.c have been changed as follows: extern void boot_Opcode _((CV * cv)); extern void boot_SPI _((CV * cv)); extern void boot_DynaLoader _((CV* cv)); <------ Added static void plperl_init_shared_libs(void) { char *file = __FILE__; dXSUB_SYS; <------- Added newXS("Opcode::bootstrap", boot_Opcode, file); newXS("SPI::bootstrap", boot_SPI, file); newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file); <---added } I then compile plperl.c as follows: gcc -o blib/arch/auto/plperl/plperl.so -shared -L/usr/local/lib plperl.o eloglvl.o SPI.o /usr/lib/perl5/5.00503/i586-linux/auto/Opcode/Opcode.so -L/usr/lib/perl5/5.00503/i586-linux/CORE -lperl `perl -MExtUtils::Embed -e ccopts -e ldopts` When I try to import a perl module that relies on a C module I get the following error message: ERROR: creation of function failed : Can't load '/usr/lib/perl5/site_perl/5.005/i586-linux/auto/Pg/Pg.so' for module Pg: /usr/lib/perl5/site_perl/5.005/i586-linux/auto/Pg/Pg.so: undefined symbol: PL_sv_undef at /usr/lib/perl5/5.00503/i586-linux/DynaLoader.pm line 169. at /caseTracking/packages/SP.pm line 7 BEGIN failed--compilation aborted at /caseTracking/packages/SP.pm line 7. BEGIN failed--compilation aborted at (eval 1) line 2. Any ideas? Any help is highly appreciated :) Regards Ragnar