Configure script picks wrong xml2-config
Swiss army knife of image processing
Brought to you by:
bfriesen
v1.3.29, cross-compiling from Cygwin to MinGW
$ ../configure --host=x86_64-w64-mingw32 --enable-shared --with-sysroot=/usr/x86_64-w64-mingw32/sys-root/mingw --prefix=/usr/x86_64-w64-mingw32/sys-root/mingw CXXFLAGS=-O3
I scratched my head for good three hours trying to understand why MinGW compiler was making Cygwin-dependent executables. It turned out that configure script was picking /usr/bin/xml2-config instead of /usr/x86_64-w64-mingw32/sys-root/mingw/bin/xml2-config which made compiler to search main lib directories.
I hammered the path into configure script to work around it but it would be nice to see it work without it.
GraphicsMagick now uses pkg-config to search for libxml2 prior to looking for an xml2-config program. I don't know how this change impacts your build scenario. What happens now for your build?
I tried it right now with same configure command (without modifying anything of course) and checked the shared libraries with DependencyWalker - no Cygwin dependency anymore. Thanks for your labour!
However, I have this in config.log:
Nonetheless, the libraries are not dependent on Cygwin anymore and I don't see
ac_cv_path_xml2_configused anywhere.Last edit: Baykalov Pyotr 2018-11-28
On Wed, 28 Nov 2018, Baykalov Pyotr wrote:
This is expected behavior. If pkg-config is not available or does not
know about the package, then it will still use the xml2-config script.
It tests for the path to the xml2-config in advance in order to avoid
possibly executing a non-existent command if pkg-config fails and as a
form of documentation.
Bob
User reports success (apparently due to using pkg-config) with implementation now included in GM 1.3.31.