17017

Error building libxmljs for node.js

I'm having a problems building libxmljs on my mac os x 10.9.3.

Here's what I'm getting:

3 warnings generated. CC(target) Release/obj.target/libxml/vendor/libxml/xpointer.o LIBTOOL-STATIC Release/xml.a libtool: unrecognized option `-static' libtool: Try `libtool --help' for more information. make: *** [Release/xml.a] Error 1 gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23) gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12) gyp ERR! System Darwin 13.2.0 gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /usr/local/lib/node_modules/libxmljs gyp ERR! node -v v0.10.13 gyp ERR! node-gyp -v v0.10.2 gyp ERR! not ok unbuild libxmljs@0.10.0 npm ERR! weird error 1 npm ERR! not ok code 0

So... It's some wierd error 1. Can't really figure out what exactly.

The node installed with homebrew.

Answer1:

Okay. Here's the deal. There's a described problem with building modules for homebrew installed node.js.

libtool: unrecognized option `-static'

http://flummox-engineering.blogspot.ru/2014/04/libtool-unrecognized-option-static.html

This happenes when you're using homebrew's libtool. You should use systemwide that's located in <strong>/usr/bin/libtool</strong>.

To fix this issue you can type <strong>which libtool</strong>. If it is in <strong>/usr/local/Cellar/libtool....</strong> then it's homebrew's one. Just unlink it with this command:

brew unlink libtool

Do your npm install and link it back again

brew link libtool

In my case i had libtool installed with MAMP. So I edited my <strong>~/.bash_profile</strong> file and removed that <strong>PATH="/Applications/MAMP/Library/bin:${PATH}"</strong> line i recently added my my own.

Recommend

  • Set Path for Mounted Network Drive in Node
  • when trying to configure or rebuild node-gyp, getting errors: mac osx mavericks
  • ERROR : No emulator images (avds) found thrown on windows 8 while opening emulator
  • spawn ENOENT error
  • gulp Cannot find module 'readable-stream/transform'
  • npm installing mmmagic fails
  • Error while adding android platform for cordova
  • Error while running execFileSync in packaged Electron app
  • ERROR in renderer.js from UglifyJs Unexpected token punc «(»
  • Error: Please install Android target: “android-22” when SDK manager shows it is installed
  • Canvas for Node.js working locally but not on Heroku server
  • Cannot update firebase version [duplicate]
  • Interpreting STRACE output - pipes and forks
  • Write output of for loop to multiple files
  • Error in installing package: fatal error: stdlib.h: no such file or directory
  • Ubuntu and bcrypt
  • How to get latest version of a artifact on Bintray using JSONP
  • During installation of Django, why do I keep getting ImportError: No module named django?
  • Login not working in Firefox in Meteor
  • cygwin cannot exec 'git-add--interactive' permission denied
  • Using JRuby with Rails 3.2
  • Code in Job's Script Block after Start-Process Does not Execute
  • error importing numpy
  • ADO and msqli connections very slow
  • Needing to do .toArray() to get output of mongodb .find() on key name not value
  • PHP buffered output depending on server setting?
  • Very simple C++ DLL that can be called from .net
  • MongoError: Incorrect arguments
  • Installing Hadoop, Java Exception about illegal characters at index 7?
  • Obtain ObjectIdHex value from mgo query
  • Convert array of 8 bytes to signed long in C++
  • Acquiring multiple attributes from .xml file in c#
  • -fvisibility=hidden not passed by compiler for Debug builds
  • How to CLICK on IE download dialog box i.e.(Open, Save, Save As…)
  • LevelDB C iterator
  • How can I remove ASP.NET Designer.cs files?
  • Are Kotlin's Float, Int etc optimised to built-in types in the JVM? [duplicate]
  • costura.fody for a dll that references another dll
  • java string with new operator and a literal
  • Net Present Value in Excel for Grouped Recurring CF