in reply to Re: Can't load DBlib.so - sybperl 2.18
in thread Can't load DBlib.so - sybperl 2.18

I am unabel to find where to change the settings in Makefile to compile teh sybperl against 5.004 version, its defautl setting to new version.
  • Comment on Re^2: Can't load DBlib.so - sybperl 2.18

Replies are listed 'Best First'.
Re^3: Can't load DBlib.so - sybperl 2.18 (2 perls)
by tye (Sage) on Mar 05, 2012 at 15:41 UTC

    The instance of Perl you use to invoke the Makefile.PL (or other first-step Perl script) sets which instance of Perl the module will be built for. If you built it for the wrong version, then just rebuild it, this time using the proper instance of Perl to run the Makefile.PL.

    make clean $path_to_version/perl Makefile.PL make ...

    If you do not have a specific need for having two different versions of Perl installed, then it sounds like you would have a much easier time if you were to uninstall the version of Perl that you don't need.

    If you do have a need for two versions of Perl (it is rather common to "leave the 'system' Perl alone" and to install your own version of Perl that you can customize for your needs), then I would next uninstall the version of Perl that you installed and then re-install it, this time making sure that your new version does not share any module directories with the other version of Perl.

    Having two versions of Perl sharing a directory where modules are installed is usually not worth the resulting complexity.

    If the only module directory being shared between the two versions of Perl is your user-specific directory, then we come back to "use the right version of Perl". Make an alias or change your $PATH or something so you stop jumping between Perl versions for different steps of what you are trying to do.

    - tye        

Re^3: Can't load DBlib.so - sybperl 2.18
by Eliya (Vicar) on Mar 01, 2012 at 13:23 UTC

    I would rather go the other way and modify your script val_equity_finance_report.pl (the shebang line, or however you're invoking the script) to use perl-5.8.4  (the system Perl is ancient (!) — though 5.8.4 isn't exactly new either...)

      Thanks Eliya, I edited teh shebang line and its no longer giving me the memmory wrap error.

      But now its giving me referenced symbol not found errors somthing like below:

      ld.so.1: val_equity_finance_report.pl: fatal: relocation error: file /home/valops/sybperl-2.18/usr/local/perl-5.8/lib/site_perl/5.8.4/sun4-solaris-thread-multi/auto/Sybase/DBlib/DBlib.so: symbol dbopen: referenced symbol not found

      Killed

        How exactly did you build DBlib.so?  Complete output of the build/make steps would help.   Presumably, it didn't get linked against the Sybase libs (which should provide the actual implementation for dbopen).