On Friday, September 12, 2014 11:16:12 am Philip Martin wrote:
> Alexey Neyman <stilor_at_att.net> writes:
> > Rather, I think, it is that the libsvn_swig_perl-1.so.0 does not list the
>
> > _Core.so as a dependency:
> I don't think that's the way it works. When Perl uses a module such as
> SVN::Repos then Perl itself knows to uses SVN::Core as a dependency.
> That causes the shared objects _Repos.so and _Core.so to be loaded. You
> should see that _Core.so has libsvn_swig_perl-1.so as a dependency.
Apparently it doesn't know that - see below.
> > If I pre-load the library, though, it fails differently:
> >
> > $ LD_PRELOAD=/usr/local/lib64/perl5/auto/SVN/_Core/_Core.so /tmp/1.pl
> > /repo Can't locate object method "new_default" via package "SVN::Pool"
> > (perhaps you forgot to load "SVN::Pool"?) at /tmp/1.pl line 6.
>
> I'm not sure LD_PRELOAD is the right way to do it as that might bypass
> the full Perl module load mechanism. I think you should try setting
> @INC, perhaps via
>
> use lib '/usr/local/lib64/perl5';
Unfortunately, this does not work. What works (at least getting it past the
point of loading the library) is explicit 'use SVN::Core;' before 'use
SVN::Repos'. But, I have verified this is an issue with the stock CentOS
packages (1.6.11), so it seems to be a generic issue. I removed too much when
reducing the test case. So, the question is, should SVN::Repos load SVN::Core
automatically?
However, it then segfaults in a shared library.
[aneyman_at_localhost ~]$ gdb /usr/bin/perl
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6_4.1)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/perl...Reading symbols from
/usr/lib/debug/usr/bin/suidperl.debug...done.
done.
(gdb) r /tmp/1.pl /svn/testrepo
Starting program: /usr/bin/perl /tmp/1.pl /svn/testrepo
[Thread debugging using libthread_db enabled]
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff138af10 in ?? ()
(gdb) bt
#0 0x00007ffff138af10 in ?? ()
#1 0x0000003bba01899e in run_cleanups (pool=0x8d7828) at
memory/unix/apr_pools.c:2314
#2 apr_pool_destroy (pool=0x8d7828) at memory/unix/apr_pools.c:782
#3 0x0000003bba018975 in apr_pool_destroy (pool=0x7e1498) at
memory/unix/apr_pools.c:779
#4 0x0000003bba018b84 in apr_pool_terminate () at memory/unix/apr_pools.c:605
#5 0x00007ffff1e5153d in _wrap_apr_terminate (my_perl=<value optimized out>,
cv=<value optimized out>) at core.c:2590
#6 0x0000003ae0aa6815 in Perl_pp_entersub (my_perl=0x603010) at pp_hot.c:2888
#7 0x0000003ae0aa4b06 in Perl_runops_standard (my_perl=0x603010) at run.c:40
#8 0x0000003ae0a4c5df in Perl_call_sv (my_perl=0x603010, sv=0x6c9190,
flags=6) at perl.c:2721
#9 0x0000003ae0a4cb1d in Perl_call_list (my_perl=0x603010, oldscope=1,
paramList=0x6c9388) at perl.c:5276
#10 0x0000003ae0a4e947 in perl_destruct (my_perl=0x603010) at perl.c:630
#11 0x0000000000400e01 in main (argc=3, argv=0x7fffffffe5a8,
env=0x7fffffffe5c8) at perlmain.c:126
[[[ 1.pl ]]]
[aneyman_at_localhost ~]$ cat /tmp/1.pl
#!/usr/bin/perl
use SVN::Core;
use SVN::Repos;
die "Usage: 1.pl REPO TXN" unless $#ARGV == 0;
my $repo = SVN::Repos::open($ARGV[0]) or die "Cannot open repo " . $ARGV[0];
exit 0;
]]]
The same script works fine with the stock CentOS bindings.
Regards,
Alexey.
Received on 2014-09-12 20:41:30 CEST