Building imagemagick with a custom libxml2
Posted: 2011-07-17T09:39:50-07:00
Hi,
I have a libxml2 installed in /opt/libxml2 that I want to link imagemagick to. The system itself has another libxml2 installed in /usr/lib64. But the development files for this version are not installed.
To make sure it takes the right libxml2 I already set a bunch of environment variables:
export PATH=/opt/libxml2/bin:/opt/perl/bin:/opt/openssl/bin:/usr/bin:/bin
export LD_RUN_PATH=/opt/openssl/lib64:/opt/libxml2/lib64
export CPATH=/opt/openssl/include:/opt/libxml2/include/libxml2
export LIBRARY_PATH=/opt/openssl/lib64:/opt/libxml2/lib64
export CFLAGS='-I/opt/openssl/include -I/opt/libxml2/include/libxml2'
export CPPFLAGS='-I/opt/openssl/include -I/opt/libxml2/include/libxml2'
export LDFLAGS='-L/opt/openssl/lib64 -L/opt/libxml2/lib64'
export XML2_CONFIG=/opt/libxml2/bin/xml2-config
But they are of no help. I still get this error during "make":
...
CC coders/coders_tiff_la-tiff.lo
CCLD coders/tiff.la
CC coders/coders_wmf_la-wmf.lo
CCLD coders/wmf.la
/usr/bin/grep: /usr/lib64/libxml2.la: No such file or directory
/usr/bin/sed: can't read /usr/lib64/libxml2.la: No such file or directory
libtool: link: `/usr/lib64/libxml2.la' is not a valid libtool archive
Why the hell does it look for /usr/lib64/libxml2.la instead of /opt/libxml2/lib64/libxml2.la?
In the configure stage it looks good:
...
checking for XML...
checking for xml2-config... xml2-config
checking libxml/parser.h usability... yes
checking libxml/parser.h presence... yes
checking for libxml/parser.h... yes
checking for xmlParseExternalEntity in -lxml2... yes
checking if XML package is complete... yes
...
I have a libxml2 installed in /opt/libxml2 that I want to link imagemagick to. The system itself has another libxml2 installed in /usr/lib64. But the development files for this version are not installed.
To make sure it takes the right libxml2 I already set a bunch of environment variables:
export PATH=/opt/libxml2/bin:/opt/perl/bin:/opt/openssl/bin:/usr/bin:/bin
export LD_RUN_PATH=/opt/openssl/lib64:/opt/libxml2/lib64
export CPATH=/opt/openssl/include:/opt/libxml2/include/libxml2
export LIBRARY_PATH=/opt/openssl/lib64:/opt/libxml2/lib64
export CFLAGS='-I/opt/openssl/include -I/opt/libxml2/include/libxml2'
export CPPFLAGS='-I/opt/openssl/include -I/opt/libxml2/include/libxml2'
export LDFLAGS='-L/opt/openssl/lib64 -L/opt/libxml2/lib64'
export XML2_CONFIG=/opt/libxml2/bin/xml2-config
But they are of no help. I still get this error during "make":
...
CC coders/coders_tiff_la-tiff.lo
CCLD coders/tiff.la
CC coders/coders_wmf_la-wmf.lo
CCLD coders/wmf.la
/usr/bin/grep: /usr/lib64/libxml2.la: No such file or directory
/usr/bin/sed: can't read /usr/lib64/libxml2.la: No such file or directory
libtool: link: `/usr/lib64/libxml2.la' is not a valid libtool archive
Why the hell does it look for /usr/lib64/libxml2.la instead of /opt/libxml2/lib64/libxml2.la?
In the configure stage it looks good:
...
checking for XML...
checking for xml2-config... xml2-config
checking libxml/parser.h usability... yes
checking libxml/parser.h presence... yes
checking for libxml/parser.h... yes
checking for xmlParseExternalEntity in -lxml2... yes
checking if XML package is complete... yes
...