Hi Guys,

I am trying to create a perl embeded application which expose WWW::Mechanize into my Cython extension project. I compile and link my extension using:

x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/lib/perl/5.18/CORE -I/usr/include/python3.4m -I/home/losintikfos/git/testproj/env/include/python3.4m -c src/perlxsi.c -o build/temp.linux-x86_64-3.4/src/perlxsi.o -O0 -g3 -Wall -c -fmessage-length=0 -Wl,-E -fstack-protector -L/usr/local/lib -L/usr/lib/perl/5.18/CORE -lperl -ldl -lm -lpthread -lc -lcrypt -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/perl/5.18/CORE

x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/lib/perl/5.18/CORE -I/usr/include/python3.4m -I/home/losintikfos/git/testproj/env/include/python3.4m -c src/perlmechanize.c -o build/temp.linux-x86_64-3.4/src/perlmechanize.o -O0 -g3 -Wall -c -fmessage-length=0 -Wl,-E -fstack-protector -L/usr/local/lib -L/usr/lib/perl/5.18/CORE -lperl -ldl -lm -lpthread -lc -lcrypt -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/perl/5.18/CORE

x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.4/src/perlxsi.o build/temp.linux-x86_64-3.4/src/perlmechanize.o build/temp.linux-x86_64-3.4/src/pymechanize.o -lperl -o build/lib.linux-x86_64-3.4/pymechanize.cpython-34m.so

Which works fine. My problem is - when I import calls from my extension module pymechanize.cpython-34m.so I get below error:

Can't load '/usr/local/lib/perl/5.18.2/auto/Encode/Encode.so' for module Encode: /usr/local/lib/perl/5.18.2/auto/Encode/Encode.so: undefined symbol: PL_utf8skip at /usr/share/perl/5.18/XSLoader.pm line 68.
 at /usr/local/lib/perl/5.18.2/Encode.pm line 10.
Compilation failed in require at /usr/local/share/perl/5.18.2/HTML/Form.pm line 6.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.18.2/HTML/Form.pm line 6.
Compilation failed in require at /usr/local/share/perl/5.18.2/WWW/Mechanize.pm line 133.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.18.2/WWW/Mechanize.pm line 133.
Compilation failed in require.
BEGIN failed--compilation aborted.
Attempt to reload WWW/Mechanize.pm aborted.
Compilation failed in require at (eval 9) line 1.
BEGIN failed--compilation aborted at (eval 9) line 1.

For almost two weeks now I have tried various options - including reinstalling Encode.pm but to no luck. I can see the symbol is there when I do:

nm /usr/local/lib/perl/5.18.2/auto/Encode/Encode.so | grep PL_utf8skip

Do anyone know what might be causing this?


In reply to Issue: Encode.so: undefined symbol: PL_utf8skip by losintikfos

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.