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

Hi,

I'm getting the following warning every time I run a perl script that uses DBD:
"Can't make loaded symbols global on this platform while loading /opt/ +perl_32/lib/site_perl/5.8.3/IA64.ARCHREV_0-thread-multi/auto/DBD/Syba +se/Sybase.so at /opt/perl_32/lib/5.8.3/IA64.ARCHREV_0-thread-multi/Dy +naLoader.pm line 229."
The DBD module is installed on a IA-64 machine with Perl 5.8.3 as the base installation. The odd thing is that it works flawlessly (no warning) on the older PA-RISC machine.

Any idea how to fix this issue? Any help would be appreciated.

Thanks in advance,
Andrew

Replies are listed 'Best First'.
Re: DBD - Global Symbols Issue
by archfool (Monk) on Aug 20, 2007 at 19:46 UTC
    Do an 'ldd /opt/perl_32/lib/site_perl/5.8.3/IA64.ARCHREV_0-thread-multi/auto/DBD/Sybase/Sybase.so'

    Are there missing libraries? Wrong archetecture? (i.e. 64 v 32 bit libraries)? I'm guessing you're running perl under one archetecture/bitdepth and the sybase shared object as something else.

      Archfool - thanks for your reply, below are the results of the ldd command.
      libsybct.so => /sybase/OCS-15_0/lib/libsybct.so libsybcs.so => /sybase/OCS-15_0/lib/libsybcs.so libsybtcl.so => /sybase/OCS-15_0/lib/libsybtcl.so libsybcomn.so => /sybase/OCS-15_0/lib/libsybcomn.so libsybintl.so => /sybase/OCS-15_0/lib/libsybintl.so libsybblk.so => /sybase/OCS-15_0/lib/libsybblk.so libdl.so.1 => /usr/lib/hpux32/libdl.so.1 libm.so.1 => /usr/lib/hpux32/libm.so.1 libsybcs.so => /sybase/OCS-15_0/lib/libsybcs.so libsybtcl.so => /sybase/OCS-15_0/lib/libsybtcl.so libsybcomn.so => /sybase/OCS-15_0/lib/libsybcomn.so libsybintl.so => /sybase/OCS-15_0/lib/libsybintl.so libm.so.1 => /usr/lib/hpux32/libm.so.1 libsybunic.so => /sybase/OCS-15_0/lib/libsybunic.so libsybct.so => /sybase/OCS-15_0/lib/libsybct.so

      I also tried re-installing DBD::Sybase in both the 32 bit and 64 bit builds using the 'perl Makefile.PL -r=buildXX' where XX is the bit depth. Unfortunately the 'Can't make loaded symbols...' warning came up for both builds during the 'make test' session.
Re: DBD - Global Symbols Issue
by mpeppler (Vicar) on Aug 22, 2007 at 18:42 UTC
    Did you install DBD::Sybase 1.08 ?

    If so you should probably edit Sybase.pm and make sure that dl_load_flags() returns 0x00 - it's around line 35 in the file.

    Michael

      mpeppler - Yes, it is DBD:Sybase 1.08. That seems to do the trick!

      I changed this
      sub dl_load_flags { if($^O eq 'aix') { 0x00 } else { 0x01 }}
      to this
      sub dl_load_flags { if($^O eq 'aix') { 0x00 } else { 0x00 }}

      Just out of curiousity, why is this fix needed? It seems like it's just forcing the 'aix' check to pass, any idea why?
      Thank you all for your help so far, much appreciated.