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

Hi all,

I have a compiled version of Perl (5.14.2 which works with compiled apache2 & mod_perl ok).

When I try and compile ImageMagick using the args --with-perl I get the error cannot find -lperl (After researching, I'm assuming this is libperl.so its after).

If I look for libperl.so I can only find the system installed version, and can only find libperl.a in the custom compiled Perl version (in /opt/perl).

This is where I get stuck in my understanding. Should I be compiling Perl differently to produce a .so file (I tried option -Duseshrplib for compiling perl, but problem persisted even though I can now see a .so) rather than .a, or should there be something in the ImageMagick compile options that would accept a .a. I sort of vaguely understand the idea of static vs shared libs, but not sure of any consequences or problems or solutions

Does anyone have any ideas how I could get ImageMagick to compile correctly with my non system version of Perl without it negatively affecting anything else ?

Thanks in advance

Replies are listed 'Best First'.
Re: Compiling ImageMagick and Perl problem
by Anonymous Monk on Jun 20, 2013 at 11:02 UTC

    When I try and compile ImageMagick using the args --with-perl I get the error cannot find -lperl (After researching, I'm assuming this is libperl.so its after).

    Here is what I would do :) install precompiled ImageMagick say yum install ImageMagick or whatever ubuntu does

    Then do cpanp -z Image::Magick and like the readme says edit Makefile.PL for defaults for LIBS & INC & CCFLAGS params that we later pass to Writemakefile