princepawn has asked for the wisdom of the Perl Monks concerning the following question:

I am attempting to use a module which was built via SWIG and I get the following error:
Can't load '/home/tmbranno/cpan/lib/perl5/site_perl/5.005/sun4-solaris +/auto/gdc\ hart/gdchart.so' for module gdchart: ld.so.1: /usr/local/bin/perl: fat +al: reloc\ ation error: file /home/tmbranno/cpan/lib/perl5/site_perl/5.005/sun4-s +olaris/au\ to/gdchart/gdchart.so: symbol ceil: referenced symbol not found at /us +r/local/l\ ib/perl5/5.00503/sun4-solaris/DynaLoader.pm line 169.
I even tried to force Dynloader to open the math library (as that's where ceil() is defined), but it won't find the symbol for ceil for some reason:
#!/usr/local/bin/perl -I/home/tmbranno/cpan/lib/perl5/site_perl/5.005 use DynaLoader; BEGIN { dl_load_file("/usr/lib/libm.so"); use gdchart;

Replies are listed 'Best First'.
(tye)Re: DynaLoader isn't finding libm.a
by tye (Sage) on Jul 25, 2001 at 09:42 UTC

    The "ldd" command ("list dynamic dependencies") is often very useful in debugging such problems. If you find that you need to set LD_LIBRARY_PATH at run time to get things to work then you may want to specify LD_RUN_PATH at compile/load time instead. But these things vary between operating systems, of course.

            - tye (but my friends call me "Tye")
Re: DynaLoader isn't finding libm.a
by Zaxo (Archbishop) on Jul 25, 2001 at 07:01 UTC

    Check $ENV{LD_LIBRARY_PATH}. I think that's usually the problem with dll loading on Solaris.

    After Compline,
    Zaxo