in reply to DBD::Sybase - 'make' fails because of incompatible shared object(.so)

skipping incompatible /opt/sap/OCS-16_0/lib/libsybct.so

Hello :) skipping incompatible /opt/sap/OCS-16_0/lib/libsybct.so, skipping incompatible /opt/sap/OCS-16_0/lib/libsybct.so

-> http://dbaspot.com/sybase/426144-skipping-incompatible-opt-sybase-ocs-15_0-lib-libsybtcl-so-when.html

file libsybtcl64.so ...-DSYB_LP64 ... -llibsybtcl64

So there you have it, make sure you have "64" bit version of the .so files, make sure Makefile.PL turns on LP64 flag, and make sure the -l...64 versions are found, and make again

This is perl, v5.8.3 built for x86_64-linux Copyright 1987-2003, Larry Wall

( 2016 - 2003) * 10 = 130 years in computer time

  • Comment on Re: DBD::Sybase make fails because of incompatible shared object(.so)

Replies are listed 'Best First'.
Re^2: DBD::Sybase make fails because of incompatible shared object(.so)
by fire_blade (Initiate) on Sep 25, 2015 at 17:24 UTC
    Thanks!

    I went through the link you shared and there somebody suggested to add the following -

    You might need this "add -DSYB_LP64" in the Makefile for 64-bit.

    So i modified the following in Makefile, not sure if this what he meant -

    EXTRALIBS = -L/opt/sap/OCS-16_0/lib -lsybct -lsybcs -lsybtcl -lsybcomn + -lsybintl -lsybblk -DSYB_LP64 LDLOADLIBS = -L/opt/sap/OCS-16_0/lib -lsybct -lsybcs -lsybtcl -lsybcom +n -lsybintl -lsybblk -ldl -lm -DSYB_LP64
    But it didn't work.

    How to set LP64 flag in Makefile.PL? Not sure where to enable LP64. Also, I tried modifying the CONFIG file which is placed in the same folder where Makefile.PL and added "BUILD_TYPE=64" even that didn't work.

    Though i was able to by-pass the error using a dirty hack, which is by replacing all the .so file with 64 bit version of .so file and the make went through fine. During "make test" half of the test failed and "make install" succeeded. And my perl script also compiled.

    But still i want to know the right way to fix this.

      Matching the Makefile is a good approach if you don't find the place in Makefile.PL where the libraries and command line switches are added.

      From your description it seems as if you only added -DSYS_LP64 but omitted -llibsybtcl64. Most likely, you will also need to remove -lsybctl .

      My guess is that you will need to change all mentions of -lsyb* to -lsyb*64 so the build process picks up the 64-bit versions of the libraries.

        Thanks @corion & @Anonymous Monk

        'make' was successful once i modified the following entries in Makefile to -

        EXTRALIBS = -L/opt/sap/OCS-16_0/lib -lsybct64 -lsybcs64 -lsybtcl64 -ls +ybcomn64 -lsybintl64 -lsybblk64 -DSYB_LP64 LDLOADLIBS = -L/opt/sap/OCS-16_0/lib -lsybct64 -lsybcs64 -lsybtcl64 -l +sybcomn64 -lsybintl64 -lsybblk64 -ldl -lm -DSYB_LP64

        It is now picking up all the 64 bit .so files. It was complaining for the following files -

        - libsybct64.so/libsybct.so - libsybcs64.so/libsybcs.so - libsybtcl64.so/libsybtcl.so - libsybcomn64.so/libsybcomn.so - libsybintl64.so/libsybintl.so - libsybblk64.so/libsybblk.so

        Even though my issue is resolved, out of curiosity i was wondering what changes needs to be done to 'Makefile.PL' to generate correct 'Makefile'.

        Also why one should modify these files, shouldn't it automatically understand that it is a 64 bit machine and the perl module should look for 64 bit version of .so file.

      So did you check which files are 64 bit versions (like libsybtcl64 ) and make sure they're added to LIBS of ExtUtils::MakeMaker?

      Also, in addition to what corion said, in the sybase Makefile.PL, it tries to determine when to add -DSYB_LP64 and when to omit it .... so you can also simply edit Makefile.PL right before WriteMakefile() to make the changes you need, this survives make clean