Subject: | Segmentation fault in Debian Linux |
Hi,
I had a lot of problems testing/installing the module in Debian in a self-compiled perl.
To make a long story short, here is what I hacked in Tcl.pm to make it work:
$ diff -u . blib/lib/Tcl.pm
--- ./Tcl.pm 2009-11-24 05:01:15.000000000 +0100
+++ blib/lib/Tcl.pm 2010-01-09 19:38:41.000000000 +0100
@@ -388,7 +388,7 @@
our $DL_PATH;
unless (defined $DL_PATH) {
- $DL_PATH = $ENV{PERL_TCL_DL_PATH} || $ENV{PERL_TCL_DLL} || "";
+ $DL_PATH = $ENV{PERL_TCL_DL_PATH} || $ENV{PERL_TCL_DLL} ||
"/usr/lib/libtcl8.4.so.0";
}
unless ($DL_PATH) {
@@ -413,10 +413,10 @@
}
}
-require XSLoader;
-
{
local $ENV{PATH} = $path if $path;
+ local $ENV{PERL_DL_NONLAZY} = 1;
+ require XSLoader;
XSLoader::load('Tcl', $Tcl::VERSION);
}
I really have no clue why the PERL_DL_NONLAZY environment variable has to be set, but I
noticed that the tests were fine and the programs segfaulted so I tried it.
I hope this might help someone in the meanwhile, cheers,
Flavio.
---
$ perl -v
This is perl, v5.8.8 built for i686-linux
Copyright 1987-2006, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
$ uname -a
Linux Polebian 2.6.26-2-686 #1 SMP Wed Aug 19 06:06:52 UTC 2009 i686 GNU/Linux
$ perl -V
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
Platform:
osname=linux, osvers=2.6.18-5-686, archname=i686-linux
uname='linux polebian 2.6.18-5-686 #1 smp mon dec 24 16:41:07 utc 2007 i686
gnulinux '
config_args='-Dprefix=/opt/perl-5.8.8 -de'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fno-strict-aliasing -pipe -Wdeclaration-after-statement -
I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include'
ccversion='', gccversion='4.1.2 20061115 (prerelease) (Debian 4.1.1-21)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -ldl -lm -lcrypt -lutil -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=/lib/libc-2.3.6.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.3.6'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: PERL_MALLOC_WRAP USE_LARGE_FILES USE_PERLIO
Built under linux
Compiled at Jan 24 2008 17:23:34
@INC:
/opt/perl-5.8.8/lib/5.8.8/i686-linux
/opt/perl-5.8.8/lib/5.8.8
/opt/perl-5.8.8/lib/site_perl/5.8.8/i686-linux
/opt/perl-5.8.8/lib/site_perl/5.8.8
/opt/perl-5.8.8/lib/site_perl