moseley has asked for the wisdom of the Perl Monks concerning the following question:

I have a module Text::Pspell that is failing make test on my Debian Woody machine. It only fails with PERL_DL_NONLAZY=1. With PERL_DL_NONLAZY=0 make test passes all tests.

I assume it's due to some unresolved symbol(s). nm ./blib/arch/auto/Text/Pspell/Pspell.so shows many "U" entries.

What I don't know is how to determine what exactly is not resolved.

Running my test script generates this output:

~/Text-Pspell-0.02$ PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib +/lib -I/usr/lib/perl/5.6.1 -I/usr/share/perl/5.6.1 t/*.t 1..17 ok 1 destroyed by out of scope ok 2 ok 3 ok 4 language-tag: en spelling: jargon: word-list-path: /usr/share/pspell module-search-order: aspell,ispell encoding: iso8859-1 ignore: (default) personal: (default) repl: (default) save-repl: (default) ignore-repl: (default) sug-mode: fast run-together: (default) master: master-flags: module: ok 5 ok 6 ok 7 en Aborted
That's not much info. Can someone offer tips on debugging?

Thanks,

Replies are listed 'Best First'.
Re: PERL_DL_NONLAZY and make test failure
by Elian (Parson) on May 13, 2002 at 14:05 UTC
    Well, the easiest thing to do is to load up the module by hand and see what it yells about.
    perl -Ilib/blib -Ilib/arch -MText::Pspell
    and look through the output. It all should be there.

    Whether or not the unresolved symbols will be a problem for you is another matter entirely. They are a problem, as there's code in the library that will crash and burn when run, but you might not use that stuff.

    Libraries that don't completely resolve isn't unusual, unfortunately. Late binding of library code gives an adequate speed boost, but it tends to encourage sloppy building since you don't always find your problems until runtime. (Usually in error handling functions, of course, since what else would use routines only really occasionally? That and it's the most inconvenient thing, so it's liklely to happen)

      Well, the easiest thing to do is to load up the module by hand and see what it yells about.

      perl -Ilib/blib -Ilib/arch -MText::Pspell

      That doesn't complain about anything. But that's not preloading with PERL_DL_NONLAZY, although PERL_DL_NONLAZY=1 doesn't change anything.

      I'm not really looking for a way around the problem, but rather how to debug -- specifically how to find out what is unresolved. I guess it's not exactly a "perl" problem, but a lack of good unix debugging skills on my part. Thanks,

Re: PERL_DL_NONLAZY and make test failure
by samtregar (Abbot) on May 13, 2002 at 05:50 UTC
    I don't know much about debugging, but I had to turn off this "feature" in order to get my Guile module working. To do that I added this code to my Makefile.PL:

    # avoid PERL_DL_NONLAZY. libguile is missing symbols and it's not my # job to fix... package MY; sub test { my $self = shift; my $result = $self->SUPER::test(@_); $result =~ s/PERL_DL_NONLAZY=1//g; return $result; }

    As a sidenote - I cover this problem and the solution in my upcoming book. If you liked my answer, buy a copy and support the artist!

    -sam