login about faq

We are trying to get the Perl modules working on Solaris 10.1, Perl 5.8.4 and on the SPARC architecture. We followed the installation instructions and are now attempting to execute test.pl which came with the package.

The package we installed is: chilkat-9.5.0-perl-5.8-sparc-sparc

The following output is displayed on the screen:

Can't find 'boot_chilkat' symbol in /usr/perl5/site_perl/5.8.4/libchilkat.so
at /usr/perl5/site_perl/5.8.4/chilkat.pm line 11
Compilation failed in require at test.pl line 1.

BEGIN failed--compilation aborted at test.pl line 1

asked Sep 16 at 08:57

chilkat's gravatar image

chilkat ♦♦

Chilkat uses swig (swig.org) to interface from Perl to the underlying C++ code.

The 1st step in understanding the problem is to find "boot_chilkat" in the SWIG generated wrappers. If a symbol cannot be found, then it must be that an exported symbol (function) is not present in name, or in signature (i.e. the arguments are different).

In the SWIG generated C++ code (which is not public), this is found:

#define SWIG_init    boot_chilkat

It means that for any SWIG module, there will be an exported function named "boot_MODULENAME". In this case the module name is "chilkat". So.. SWIG defined a macro that resolves to "boot_chilkat", and therefore the function in the generated SWIG wrappings will be named "SWIG_init". So let's look for it...

This is what we find:

SWIGEXPORT void SWIG_init (CV cv);
SWIGEXPORT void SWIG_init (pTHXo_ CV cv);
SWIGEXPORT void SWIG_init (CV cv, CPerlObj );

In Chilkat's case, PERL_OBJECT is never going to be defined. So this leaves two possible function signatures. The Chilkat Perl module, and the Perl installation both must agree with MULTIPLICITY. If they do not, then the boot_chilkat function will have different arguments, and thus a different exported function signature and boot_chilkat will not be found.

We need to find the MULTIPLICITY of the Perl installation and of Chilkat. To find out if your Perl was built with MULTIPLICITY, type "perl -V" on the command line:

perl -V
You'll get a lot of output. Look for this:
Characteristics of this binary (from libperl):
  Built under solaris
  Compiled at Jul 24 2012 13:41:27
In this case, we can see that MULTIPLICITY is defined.

Now... in building a Perl module in C++, one must compile with the Perl provided header files (.h) in the CORE subdirectory. The config.h will indicate whether MULTIPLICITY is defined or not. Chilkat should be consistent across-the-board in MULTIPLICITY. The answer is that Chilkat chooses to always define MULTIPLICITY. Perl installations normally have MULTIPLICITY defined. Therefore, Chilkat should work with typical Perl installations.

But... Here's Where I Found the Source of the Problem

In reviewing Chilkat's config.h headers for the various platforms and various Perl versions, I found that almost all correctly defined MULTIPLICITY. A few did not, and one of the few that did not was the config.h for Perl 5.8 on Solaris SPARC. I will fix these config.h files and rebuild, and assuming no other unforeseen problems arise (you never know with the tangled messy internals of C++ interfacing to things like Perl, PHP, etc.), then the problem should get resolved..


answered Sep 16 at 09:24

chilkat's gravatar image

chilkat ♦♦

edited Sep 16 at 09:24

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Sep 16 at 08:57

Seen: 88 times

Last updated: Sep 16 at 09:24

powered by OSQA