[kw-pm] numerous "perl: symbol lookup error" issues in a large software build

Robert P. J. Day rpjday at crashcourse.ca
Wed Sep 21 05:13:40 PDT 2011


  i'm hoping one of you perl wizards can help me with something, as i
need to resolve an annoying issue ASAP (as in, this morning if
possible).  if you're the first one to come up with the solution, the
next time i am in K-W, i will buy you a *case* of beer.  so here it
is.

  i have my 64-bit laptop running a fully-updated ubuntu 11.04, and
i'm using a proprietary build system to create an embedded linux
image.  (if you're familiar with openembedded, poky or yocto, you're
thinking along the right lines.)

  the build involves creating a root filesystem full of stuff for a
target board, so it involves starting with a number of pristine
software tarballs, untarring each one, configuring, possibly applying
some patches, then (cross-)compiling each one and installing it in a
root filesystem location.  eventually, once all of the packages are
built and installed, that root filesystem is turned into an
appropriate binary image and flashed to the target board.

  so, as i said, part of the process is to untar a pristine tarball,
possibly patch it, configure it, then compile it, and that's where the
problems start, as a number of those patches fail their config step
looking for missing perl symbols.

  the first package that failed that way was the pacemaker package,
and it failed simply trying to create the documentation that would be
installed in the docs directory using publican, thusly:

===== big snip here =====
cd Pacemaker_Explained && /usr/local/bin/publican build --publish
--langs=all --formats=pdf,html,html-single,txt
perl: symbol lookup error: /usr/lib/perl5/auto/HTML/Parser/Parser.so:
undefined symbol: Perl_Istack_sp_ptr
Makefile:617: *** [Pacemaker_Explained.txt] Error 127
===== end build =====

  obviously(?), the publican package is invoking perl, and there's
some XML and HTML parsing going on behind the scenes, at which point
we have that symbol lookup error.

  i had no idea how to start debugging that so i posted to the perl
beginners list and one person said he'd run into the same problem and
solved it by installing the HTML::Parser module from CPAN.  now, i
have the ubuntu "libhtml-parser-perl" package installed which gives me
that module but, as i understand it (and i might have misunderstood),
i need to replace/update that with the CPAN module.

  if that's correct, i don't understand why.  also, i would think i'd
have to remove that ubuntu package first, and there's a *ton* of
packages that depend on it, so that's not going to happen.  would i
simply use CPAN to install that module?  and would it take precedence?
and, ***most importantly***, why would that solve things?  what kind
of problem is this that installing a newer module would solve?  and
does it represent something in the build software itself that needs to
be tweaked?  in short, i not only want a solution, i want to know why
this is happening and how to avoid it in the future.  but wait,
there's more.

  to get around that offending package, i simply removed it from the
list of packages to be built.  at which point, the next package (and a
few more) failed similarly looking for a *different* symbol:

+ autoreconf
perl: symbol lookup error: /usr/lib/perl5/auto/Cwd/Cwd.so: undefined
symbol: Perl_Gthr_key_ptr
autoreconf: gnu-configize failed with exit status: 127

  so it's a different missing symbol but i'm guessing this would have
a similar solution (at last count, four packages failed looking for
precisely that symbol).

  so ... what do i do?  do i just install a newer CPAN module, which
would override the current ubuntu package module?  is that the
recommended solution?  and why?

  oh, one last thing.  this is happening on ubuntu 11.04.  officially,
this build should simply work on ubuntu 10.04.  i haven't verified
that personally, but it's supposed to.  so that suggests there's
something that changed between ubuntu 10.04 and 11.04 that's causing
this.

  anyway, thoughts?  i'd really like to resolve this as quickly as
possible.  thanks.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================


More information about the kw-pm mailing list