Menu

#548 Configure script picks wrong xml2-config

v1.0_(example)
closed-fixed
2
2018-12-02
2018-02-19
No

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.

Discussion

  • Bob Friesenhahn

    Bob Friesenhahn - 2018-11-22
    • labels: Configure, build, or install --> Configure, build, or install
     
  • Bob Friesenhahn

    Bob Friesenhahn - 2018-11-22

    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?

     
  • Baykalov Pyotr

    Baykalov Pyotr - 2018-11-28

    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!

     
  • Baykalov Pyotr

    Baykalov Pyotr - 2018-11-28

    However, I have this in config.log:

    configure:27615: checking for xml2-config
    configure:27633: found /usr/bin/xml2-config
    configure:27645: result: /usr/bin/xml2-config
    

    Nonetheless, the libraries are not dependent on Cygwin anymore and I don't see ac_cv_path_xml2_config used anywhere.

     

    Last edit: Baykalov Pyotr 2018-11-28
    • Bob Friesenhahn

      Bob Friesenhahn - 2018-11-28

      On Wed, 28 Nov 2018, Baykalov Pyotr wrote:

      However, I have this in config.log:
      ~~~
      configure:27615: checking for xml2-config
      configure:27633: found /usr/bin/xml2-config
      configure:27645: result: /usr/bin/xml2-config
      ~~~
      Nonetheless, the libraries are not dependent on Cygwin though.

      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

       
  • Bob Friesenhahn

    Bob Friesenhahn - 2018-12-02
    • status: open --> closed-fixed
    • assigned_to: Bob Friesenhahn
     
  • Bob Friesenhahn

    Bob Friesenhahn - 2018-12-02

    User reports success (apparently due to using pkg-config) with implementation now included in GM 1.3.31.

     

Log in to post a comment.

MongoDB Logo MongoDB