http://www.perlmonks.org?node_id=691139


in reply to Re: Dynaloader/XS: sharing C symbols across shared objects
in thread Dynaloader/XS: sharing C symbols across shared objects

Basically, if the Hello.pm shared object exports the say_hello() function, then all works fine. Otherwise you get the failure you reported.

That makes sense to me. If I understand correctly, then the failure mode is very similar to what you get when trying to load a function that a Perl module doesn't export.

The solution would seem to be to recompile Lingua::Stem::Snowball with additional options that specify that its shared object should export the necessary symbols. Fortunately, I maintain Lingua::Stem::Snowball, so I can release a new version if need be.

I've been trying with the gcc -export-dynamic, which I specify using Module::Build's extra_linker_flags option (and verify that it appears on the command line). No luck yet though. Hmm.

--
Marvin Humphrey
Rectangular Research ― http://www.rectangular.com