Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

libtool: unrecognized option `-static' #28442

Closed
hanxue opened this issue Apr 16, 2014 · 13 comments
Closed

libtool: unrecognized option `-static' #28442

hanxue opened this issue Apr 16, 2014 · 13 comments

Comments

@hanxue
Copy link
Contributor

hanxue commented Apr 16, 2014

The libtool that is built with homebrew will often cause this error message:

libtool: unrecognized option-static'

See #13917 and these two articles for example.

Is there a better solution to unlinking libtool?

@adamv
Copy link
Contributor

adamv commented Apr 16, 2014

What were you trying to do that caused the issue?

@hanxue
Copy link
Contributor Author

hanxue commented Apr 17, 2014

Installing a node.js module by running npm install. The node module contains native code that needs to be compiled by node-gyp, which in turn uses libtool. Specifically I was trying to install and build the node-scrypt module https://www.npmjs.org/package/node-scrypt

@adamv
Copy link
Contributor

adamv commented Apr 17, 2014

Our libtool formula is marked as keg-only, so it shouldn't be linked.

@jacknagel
Copy link
Contributor

It's only keg only for Xcode <= 4.3.

@jacknagel
Copy link
Contributor

Though our libtool does not shadow the system libtool (which is a different tool), because it is installed as glibtool.

@adamv
Copy link
Contributor

adamv commented Apr 17, 2014

What does which -a libtool show? I only have one in /usr/bin/libtool.

@adamv
Copy link
Contributor

adamv commented Apr 24, 2014

Ping.

@hanxue
Copy link
Contributor Author

hanxue commented Apr 25, 2014

My version of libtool from homebrew actually shadows /usr/bin/libtool

$ which libtool
/usr/local/bin/libtool
$ whereis libtool
/usr/bin/libtool
$ ls -l /usr/local/bin/libtool
lrwxr-xr-x  1 hanxue  admin  23 Dec 16 18:11 /usr/local/bin/libtool -> /usr/local/bin/glibtool

I suspect the way GNU libtool is built is slightly different from the version shipped with OS X / XCode.

@adamv
Copy link
Contributor

adamv commented Apr 25, 2014

@hanxue Please post your brew doctor and brew --config as well.

@jacknagel
Copy link
Contributor

$ ls -l /usr/local/bin/libtool
lrwxr-xr-x 1 hanxue admin 23 Dec 16 18:11 /usr/local/bin/libtool -> /usr/local/bin/glibtool

This looks like a symlink that you or some other tool made; our symlinks are (a) relative and (b) point into the keg, not at files in the top-level directory.

Put another way, if our libtool was actually installing itself as libtool, the link would look like

/usr/local/bin/libtool -> ../Cellar/libtool/2.4.2/bin/libtool

I bet if you look at brew list libtool, there will only be a glibtool there.

@adamv
Copy link
Contributor

adamv commented Apr 29, 2014

@hanxue any luck?

@adamv
Copy link
Contributor

adamv commented May 2, 2014

Ping.

@adamv
Copy link
Contributor

adamv commented May 3, 2014

Presuming fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants