This repository has been archived by the owner. It is now read-only.

libtool: unrecognized option `-static' #28442

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

Comments

Projects
None yet
3 participants
@hanxue
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

This comment has been minimized.

Show comment
Hide comment
@adamv

adamv Apr 16, 2014

Contributor

What were you trying to do that caused the issue?

Contributor

adamv commented Apr 16, 2014

What were you trying to do that caused the issue?

@hanxue

This comment has been minimized.

Show comment
Hide comment
@hanxue

hanxue Apr 17, 2014

Contributor

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

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@adamv

adamv Apr 17, 2014

Contributor

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

Contributor

adamv commented Apr 17, 2014

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

@jacknagel

This comment has been minimized.

Show comment
Hide comment
@jacknagel

jacknagel Apr 17, 2014

Contributor

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

Contributor

jacknagel commented Apr 17, 2014

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

@jacknagel

This comment has been minimized.

Show comment
Hide comment
@jacknagel

jacknagel Apr 17, 2014

Contributor

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

Contributor

jacknagel commented Apr 17, 2014

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

@adamv

This comment has been minimized.

Show comment
Hide comment
@adamv

adamv Apr 17, 2014

Contributor

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

Contributor

adamv commented Apr 17, 2014

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

@adamv

This comment has been minimized.

Show comment
Hide comment
@adamv

adamv Apr 24, 2014

Contributor

Ping.

Contributor

adamv commented Apr 24, 2014

Ping.

@hanxue

This comment has been minimized.

Show comment
Hide comment
@hanxue

hanxue Apr 25, 2014

Contributor

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.

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@adamv

adamv Apr 25, 2014

Contributor

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

Contributor

adamv commented Apr 25, 2014

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

@jacknagel

This comment has been minimized.

Show comment
Hide comment
@jacknagel

jacknagel Apr 25, 2014

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.

Contributor

jacknagel commented Apr 25, 2014

$ 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

This comment has been minimized.

Show comment
Hide comment
@adamv

adamv Apr 29, 2014

Contributor

@hanxue any luck?

Contributor

adamv commented Apr 29, 2014

@hanxue any luck?

@adamv

This comment has been minimized.

Show comment
Hide comment
@adamv

adamv May 2, 2014

Contributor

Ping.

Contributor

adamv commented May 2, 2014

Ping.

@adamv

This comment has been minimized.

Show comment
Hide comment
@adamv

adamv May 3, 2014

Contributor

Presuming fixed.

Contributor

adamv commented May 3, 2014

Presuming fixed.

@adamv adamv closed this May 3, 2014

@Homebrew Homebrew locked and limited conversation to collaborators Jan 2, 2016

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