Question

I'm trying to install a patch on wireshark, and the compilation of the wireshark requires libtool library. However, after installing libtool from ftp://ftp.gnu.org/pub/gnu/libtool/, the command ./autogen.sh spits out this error:

error: /Library/Developer/CommandLineTools/usr/bin/libtool: unknown option character `-' in: --version
Usage: /Library/Developer/CommandLineTools/usr/bin/libtool -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT]
Usage: /Library/Developer/CommandLineTools/usr/bin/libtool -dynamic [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] [-compatibility_version #] [-current_version #] [-seg1addr 0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table <filename>] [-seg_addr_table_filename <file_system_path>] [-all_load] [-noall_load]

and then instructs me to download libtool.

What does the error mean, and what do I need to do to fix it?

Was it helpful?

Solution

What does the error mean

It means that:

  • NeXTSTEP had a program called "libtool" long before GNU libtool was created;
  • OS X, being a descendant of NeXTSTEP, also had such a tool;
  • earlier versions of OS X also provided GNU libtool;
  • this resulted in a name collision, which OS X worked around by renaming the GNU libtool to "glibtool";
  • if you're running on a version of OS X that provided the GNU libtool, you didn't realize it, and installed it yourself;
  • if you're not running on a version of OS X that provides the GNU libtool, you installed it yourself;
  • the installed version has the same name as the OS X libtool, so there's a name collision.

Either you, or somebody else, appears to have edited the autogen.sh script to directly run /Library/Developer/CommandLineTools/usr/bin/libtool or made some other change to cause it to run that script; this was the Wrong Thing To Do, as that's the OS X libtool, and that is most definitely NOT the libtool that Wireshark wants.

what do I need to do to fix it?

  1. undo whatever was done to cause autogen.sh to make it run /Library/Developer/CommandLineTools/usr/bin/libtool;
  2. rename whatever version of libtool you installed (probably /usr/local/bin/libtool) to glibtool, and rename the libtoolize in the same directory to glibtoolize, so that it looks just like the GNU libtool that OS X used to provide, and thus so that Wireshark's attempt to use the GNU libtool works.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top