#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    2
    Rep Power
    0

    Installing GD perl module


    I am having trouble installing a perl module called GD which is required by our third party software TeamSite which has its own flavour of perl called iwperl(32 bit). We are trying to install the perl module on a 64 bit Red Hat Linux Initially I tried to install using the default commands:-
    1) iwperl Makefile.PL
    2) make
    3) make test

    However on the make test, I get the following errors:-
    PERL_DL_NONLAZY=1 /web/soft/iw-home/TeamSite/iw-perl/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
    t/GD..........Can't load './blib/arch/auto/GD/GD.so' for module GD: ./blib/arch/auto/GD/GD.so: wrong ELF class: ELFCLASS64 at /web/soft/iw-home/TeamSite/iw-perl/lib/DynaLoader.pm line 229.

    If I run the 'file' command below
    #file GD.so, I get -> GD.so: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped

    So it appears that the GD shared object is 64 bit and iwperl is 32 bit, so there is an compatibility problem here.

    I then tried building the module by passing in the following during the make command

    make PASTHRU='-m32' LD='cc -m32'

    but I get errors related to /usr/bin/ld
    /usr/bin/ld: skipping incompatible /usr/lib64/libXpm.so when searching for -lXpm

    and during the make test I get
    PERL_DL_NONLAZY=1 /web/soft/iw-home/TeamSite/iw-perl/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
    t/GD..........Can't load './blib/arch/auto/GD/GD.so' for module GD: ./blib/arch/auto/GD/GD.so: wrong ELF class: ELFCLASS64 at /web/soft/iw-home/TeamSite/iw-perl/lib/DynaLoader.pm line 229.

    So then I checked the GNU linker(ld) and that is 64 bit version. So to compile this module would I need to have a 32 bit version of the linker (ld)?
    The company which ships out the software only provide iwperl is 32bit form and not 64 bit.
    Any help would be much appreciated?

    Thanks
    Mashuk
  2. #2
  3. !~ /m$/
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    May 2004
    Location
    Reno, NV
    Posts
    4,254
    Rep Power
    1810
    You could try compiling GD as a 32 bit library from source.

    https://bitbucket.org/pierrejoye/gd-libgd/src
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    2
    Rep Power
    0
    You could try compiling GD as a 32 bit library from source.
    Is there a simpler way to build the module other than from the source? I am not familiar with building perl modules from the source.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    1
    Rep Power
    0
    Why dont You just install GD from shell?
    eg. yum install perl-GD.i386
  8. #5
  9. !~ /m$/
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    May 2004
    Location
    Reno, NV
    Posts
    4,254
    Rep Power
    1810
    I wasn't talking about the perl module, I meant building the GD C library from source so that you would have a version that would work with your 32-bit perl.

    But certainly, check package managers for versions of both GD and the perl module.

IMN logo majestic logo threadwatch logo seochat tools logo