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

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.

Replies are listed 'Best First'.
Re^4: DBD::Sybase make fails because of incompatible shared object(.so)
by fire_blade (Initiate) on Sep 28, 2015 at 09:51 UTC

    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.

      Have you searched Makefile.PL for example for sybintl ? It seems to have only one occurrence. I would assume that this would be a proper place to make the change.

      As to the need of modification, as Makefile.PL is a (Perl) program like many others, it is most likely that it simply doesn't support the detection and adaption to the bitness.