installed libtool but libtoolize not found

后端 未结 4 511
醉话见心
醉话见心 2020-12-23 10:02

im trying to build libxml2 from source on my mac.

so i have autoconf libtool and automake installed using mac ports

autoconf and automake seem to be working

相关标签:
4条回答
  • 2020-12-23 10:10

    You typically need to use glibtool and glibtoolize, since libtool already exists on OS X as a binary tool for creating Mach-O dynamic libraries. So, that's how MacPorts installs it, using a program name transform, though the port itself is still named 'libtool'.

    Some autogen.sh scripts (or their equivalent) will honor the LIBTOOL / LIBTOOLIZE environment variables. I have a line in my own autogen.sh scripts:

    case `uname` in Darwin*) glibtoolize --copy ;;
      *) libtoolize --copy ;; esac
    

    You may or may not want the --copy flag.


    Note: If you've installed the autotools using MacPorts, a correctly written configure.ac with Makefile.am files should only require autoreconf -fvi. It should call glibtoolize, etc., as expected. Otherwise, some packages will distribute an autogen.sh or similar script.

    0 讨论(0)
  • 2020-12-23 10:12

    An alternative to Brew is to use macports. For example:

    $ port info libtool
    libtool @2.4.6_5 (devel, sysutils)
    Variants:             universal
    
    Description:          GNU libtool is a generic library support script. Libtool hides the complexity of using shared libraries behind a consistent, portable interface.
    Homepage:             https://www.gnu.org/software/libtool
    
    Build Dependencies:   xattr
    Platforms:            darwin, freebsd
    License:              libtool
    Maintainers:          Email: larryv@macports.org, GitHub: larryv
    

    Then like Brew, you do:

    $ sudo port install libtool
    Password:
    --->  Fetching archive for libtool
    --->  Attempting to fetch libtool-2.4.6_5.darwin_15.x86_64.tbz2 from https://packages.macports.org/libtool
    --->  Attempting to fetch libtool-2.4.6_5.darwin_15.x86_64.tbz2.rmd160 from https://packages.macports.org/libtool
    --->  Installing libtool @2.4.6_5
    --->  Activating libtool @2.4.6_5
    --->  Cleaning libtool
    --->  Updating database of binaries
    --->  Updating database of C++ stdlib usage
    --->  Scanning binaries for linking errors
    --->  No broken files found.                             
    --->  No broken ports found.
    

    Then you can check where it lives ... btw, you can soft-link glibtoolize to libtoolize. For my needs either was okay

    $ which glibtoolize
    /opt/local/bin/glibtoolize
    
    0 讨论(0)
  • 2020-12-23 10:13

    I hope my answer is not too naive. I am a noob to OSX.

    brew install libtool solved a similar issue for me.

    0 讨论(0)
  • 2020-12-23 10:22

    To bring together a few threads libtoolize is installed as glibtoolize when you install libtool using brew. This can be achieved as follows; install it and then create a softlink for libtoolize:

    brew install libtool
    ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize
    
    0 讨论(0)
提交回复
热议问题