Page 1 of 1

Install error, Linux, zlib

Posted: 2012-02-13T08:59:43-07:00
by mauritzhansen
I am getting an install error (from source, ImageMagick-6.7.5, CentOS 5.7):
/usr/bin/ld: /usr/local/lib/libz.a(crc32.o): relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libz.a: could not read symbols: Bad value
This same issue was discussed in an old tag. The answer that worked for the poster was:
Do as the exception suggests. Remove the Zlib distribution and include -fPIC on the compile command line. Now try configuring / installing ImageMagick again.
I succeed in adding the -fPIC compile command, but what is meant with 'remove the Zlib distribution'? If I attempt to remove this package from my system I get warned of a LOT of dependencies that will also be removed, so this does not seem like a good solution. Also, I believe I need Zlib for png images?

Re: Install error, Linux, zlib

Posted: 2012-02-13T10:52:53-07:00
by fmw42
I am not an expert on this, but I suspect that means --without zlib in your IM ./configure

see
http://www.imagemagick.org/script/advan ... lation.php

Re: Install error, Linux, zlib

Posted: 2012-02-14T06:50:12-07:00
by mauritzhansen
Thanks fmw42,

I had tried without zlib before but it still seemed to include it. Then I found another post that said png support requires zlib, so including png will include zlib even if I state that it should be excluded.

I have now succeeded in installing ImageMagic by excluding zlib and png.

However, I know that I am going to require png support. Any suggestions on how to get that included?

Re: Install error, Linux, zlib

Posted: 2012-02-14T10:54:34-07:00
by fmw42
I think you will need to hear back from the IM developers on that. I am not that much of an expert on compiling IM.

Re: Install error, Linux, zlib

Posted: 2012-02-14T11:00:31-07:00
by magick
This issue is a standard compile / build problem, not a problem specific to ImageMagick. Your build wants a position independent library which you can get by compiling the Zlib library with -fPIC. Query Google with R_X86_64_32 and fPIC and you will see numerous articles about this problem.

Re: Install error, Linux, zlib

Posted: 2012-02-14T15:14:06-07:00
by mauritzhansen
I installed the latest zlib and could then install ImageMagic. However, I noticed that I had no support for png and jpeg. So, I fixed that, did a make uninstall of ImageMagick and then a configure, but make now gives the following error:
magick/.libs/libMagickCore.so: undefined reference to `gzgetc_'
Any ideas?

Re: Install error, Linux, zlib

Posted: 2012-02-14T17:56:14-07:00
by magick
ImageMagick calls gzgetc() from magick/blob.c. Its defined in the ZLib API and should be part of the ZLib library.

Re: Install error, Linux, zlib

Posted: 2012-02-15T06:46:51-07:00
by mauritzhansen
Uninstalled zlib and reinstalled and that did the trick. Thanks!