Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
perl symbol lookup error
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
amasidlover
Apprentice
Apprentice


Joined: 16 Jun 2002
Posts: 271
Location: Manchester, UK

PostPosted: Mon Oct 17, 2011 10:13 am    Post subject: perl symbol lookup error Reply with quote

Hi,

I ran emerge --sync on the 10th of October and updated (emerge -uavNDt world && revdep-rebuild) my desktop, then this Sunday (16th) I ran the same on a development virtual machine, I now can't get the perl debugger to start. Additionally libapreq2 was not starting and I solved this by adding the 'perl' use flag to make.conf and redoing the emerge/revedep-rebuild command; however this didn't solve the perl debugger issue.

Code:


alex@alex ~ $ perl -d /usr/local/bin/dev/cardgen.pl

Loading DB routines from perl5db.pl version 1.33
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

main::(/usr/local/bin/dev/cardgen.pl:9):
9:   my $db = MySQL->new( '', '', 'dbserver', '', 'config') ||
10:                   die "Failed to connect to configuration database";
perl: symbol lookup error: /usr/lib64/perl5/site_perl/5.12.4/x86_64-linux/auto/Term/ReadLine/Gnu/Gnu.so: undefined symbol: xmalloc



I've rebuilt the module Term::ReadLine and Term::ReadLine::Gnu using cpan -i and this hasn't solved the issue - I've also looked at the library tree:

Code:


alex@alex ~ $ sudo lddtree /usr/lib64/perl5/site_perl/5.12.4/x86_64-linux/auto/Term/ReadLine/Gnu/Gnu.so
Password:
Gnu.so => /usr/lib64/perl5/site_perl/5.12.4/x86_64-linux/auto/Term/ReadLine/Gnu/Gnu.so (interpreter => none)
    libreadline.so.6 => /lib64/libreadline.so.6
    libncurses.so.5 => /lib64/libncurses.so.5
        libdl.so.2 => /lib64/libdl.so.2
            ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
    libc.so.6 => /lib64/libc.so.6



And I have done emerge -1av readline ncurses - I haven't done libc due to its size, but could try that.

According to emerge.log the set of updates included (among others - can provide full list if necessary):

sys-libs/readline-6.1_p2 => sys-libs/readline-6.2_p1

dev-lang/perl-5.12.3-r => dev-lang/perl-5.12.4-r1

sys-devel/libtool-2.4-r1 and sys-apps/util-linux-2.19.1 (rebuilt no version change)

Downgrading to sys-libs/readline-6.1_p2 appears to solve the problem.

Is there anything else I should check/do before filing a bug report?

Thanks, Alex
_________________
http://www.axiomtech.co.uk
http://www.zednax.com
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 7667
Location: Somewhere over Atlanta, Georgia

PostPosted: Mon Oct 17, 2011 10:36 am    Post subject: Reply with quote

A run of
Code:
perl-cleaner --all
(on the installed packages that produce the error) is probably in order before filing a bug.

- John
_________________
This space intentionally left blank.
Back to top
View user's profile Send private message
amasidlover
Apprentice
Apprentice


Joined: 16 Jun 2002
Posts: 271
Location: Manchester, UK

PostPosted: Mon Oct 17, 2011 11:11 am    Post subject: Reply with quote

I was going to mention that I did consider perl-cleaner, but despite having been coding perl for many years now I find the help for perl-cleaner a bit incomprehensible; specifically:

"--phupdate Update existing ph files, useful after an upgrade to system parts like the kernel" - so, after a kernel upgrade ok, but which parts are 'like' the kernel??

And, in what circumstances do I need to run ph-clean, ph-update or phall or all vs really all etc.. Its clear what they do, but not really when/why they need doing. I have had a number of minor perl version bumps that have not needed any whereas the move from 5.8 -> 5.12 needed reallyall/all (can't remember which).

And the guide: http://www.gentoo.org/proj/en/perl/perl-cleaner.xml isn't really much help either.

I've run perl-cleaner --all, however I'm not sure what you meant by "(on the installed packages that produce the error)" as I thought perl-cleaner doesn't allow selection of packages, I thought it did the selection for you?

Regardless, perl-cleaner --all does not solve the problem so I will file a bug report. Do you have any suggestions as to which package it should be filed against as the perl module itself is a cpan module and not an ebuild. I assume readline as downgrading solves the problem; but I have a feeling this is going to result in the readline maintainers bouncing it back as a perl issue (and vice-versa)....

Thanks, Alex
_________________
http://www.axiomtech.co.uk
http://www.zednax.com
Back to top
View user's profile Send private message
amasidlover
Apprentice
Apprentice


Joined: 16 Jun 2002
Posts: 271
Location: Manchester, UK

PostPosted: Thu Apr 05, 2012 9:49 am    Post subject: Reply with quote

Am posting an update in the hope that someone may have some ideas as bash 4.2 and readline 6.2_p1-r1 just went stable for us and broke perl debugging again.

I've masked and downgraded them and that sorts it out, but I'm still not sure which package the bug is with (perl or readline) and whether I report the bug on one or both etc...
_________________
http://www.axiomtech.co.uk
http://www.zednax.com
Back to top
View user's profile Send private message
amasidlover
Apprentice
Apprentice


Joined: 16 Jun 2002
Posts: 271
Location: Manchester, UK

PostPosted: Sun Dec 23, 2012 11:08 am    Post subject: Reply with quote

Posting another update as there are no longer any stable bash-4.1 packages for amd64...

Any help would be much appreciated - even if its just to know which package to report a bug against...
_________________
http://www.axiomtech.co.uk
http://www.zednax.com
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 5434

PostPosted: Sun Dec 23, 2012 2:50 pm    Post subject: Reply with quote

Wow, talking about persistence (and dysfunctional upstream).

The most simple solution seems to be taking xmalloc.c from readline tarball, cleaning up its includes to simply
Code:
#include <stdio.h>
#include <stdlib.h>

and patching Gnu.xs by corecting xmalloc prototype and '#include'ing xmalloc.c below it.
Probably just a matter of a couple lines in src_prepare - 'make test' seems to pass with these changes.

If there's no bug for dev-perl/Term-ReadLine-Gnu, file one.
On the other hand, playing with cpan was unlikely to help, it the version was the same.
Back to top
View user's profile Send private message
amasidlover
Apprentice
Apprentice


Joined: 16 Jun 2002
Posts: 271
Location: Manchester, UK

PostPosted: Wed Dec 26, 2012 11:15 am    Post subject: Reply with quote

Thank you!

It turns out that when I installed Term::Readline::Gnu I hadn't checked if there was an ebuild for it and had done it via CPAN - On reading your post I wondered if I'd done this and checked. When I removed the CPAN installed version and merged the portage version the error went away...

So this one can be chalked up to user error...

Thanks again, nice to have this one solved after a year!

Alex
_________________
http://www.axiomtech.co.uk
http://www.zednax.com
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum