llancet has asked for the wisdom of the Perl Monks concerning the following question:
Ok, I got the key. The module library should be located at auto/FooBar/FooBar.so instead of auto/FooBar.so...
============================================
Hi monks!
I'm writing a module with XS, which is a wrapper for another library. I made a simple test on my module:
1. link FooBar.pm to current directory,
2. link compiled FooBar.so to ./auto/,
3. then run perl -MFooBar, and it cries:
Can't find 'boot_FooBar' symbol in /usr/local/lib/libFooBar.so at - line 0.
This is strange, as boot_FooBar is compiled in the perl wrapper library, so it should not be searched in the original library.
I'm sure boot_FooBar is inside auto/FooBar.so, by using readelf -s:
46: 00000000000048a4 1049 FUNC GLOBAL DEFAULT 11 boot_FooBarIn addition, I did not use any perl helper modules (like Module::Build or ExtUtils::MakeMaker) to build my module. I did everything manually.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: XS module cannot find boot_FooBar symbol
by tobyink (Canon) on Mar 04, 2014 at 09:15 UTC | |
by llancet (Friar) on Mar 04, 2014 at 11:39 UTC | |
|
Re: XS module cannot find boot_FooBar symbol
by davido (Cardinal) on Mar 04, 2014 at 15:53 UTC | |
by llancet (Friar) on Mar 05, 2014 at 02:54 UTC | |
|
Re: XS module cannot find boot_FooBar symbol
by Anonymous Monk on Mar 04, 2014 at 08:42 UTC | |
|
Re: XS module cannot find boot_FooBar symbol
by bulk88 (Priest) on Mar 05, 2014 at 05:02 UTC | |
by llancet (Friar) on Mar 06, 2014 at 07:22 UTC |