Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac 10.7.4, node 0.8.8 npm install fails #93

Closed
funston opened this issue Sep 19, 2012 · 6 comments
Closed

Mac 10.7.4, node 0.8.8 npm install fails #93

funston opened this issue Sep 19, 2012 · 6 comments

Comments

@funston
Copy link

funston commented Sep 19, 2012

Any ideas why npm install soap is failing here?

.....

node-expat@1.6.1 install /Users/rich/dev/daisy/daisyjs-platform/node_modules/soap/node_modules/node-expat
node-gyp rebuild

CXX(target) Release/obj.target/node_expat/node-expat.o
SOLINK_MODULE(target) Release/node_expat.node
ld: warning: ignoring file Release/obj.target/node_expat/node-expat.o, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 1 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): Release/obj.target/node_expat/node-expat.o
llvm-g++-4.2: error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin11-llvm-g++-4.2': execvp: No such file or directory
clang: error: linker (via gcc) command failed with exit code 255 (use -v to see invocation)
make: *** [Release/node_expat.node] Error 255
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:219:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Darwin 11.4.2
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/rich/dev/daisy/daisyjs-platform/node_modules/soap/node_modules/node-expat

@joachimkainz
Copy link
Contributor

Make sure to install macports (from macports.org) and run sudo port install expat

@rwinzinger
Copy link

Hi,

could you please briefly explain what the problem actually is and why I do have to use macports?

Thanks,
Ralph

@joachimkainz
Copy link
Contributor

Sure. Some packages managed by npm have OS dependencies. In the case of
node-expat, this dependency is on the availability of libexpat.a. NPM
(unfortunately) does not manage OS dependencies, because there is no
uniform way to do that. As a result, one has to use the "native"
package management system to install these dependencies manually. If you
look at https://github.com/astro/node-expat, they actually tell you to
run apt-get
install libexpat1-dev.

Macports is the closest OSX-equivalent to apt-get on Ubuntu or yum on
CentOS/Redhat.

My $0.02 cents is that this is one of the thorniest issues when working
with Node/NPM and I hope that NPM will take on the provisioning problem on
the OS soon... But for now...

@rwinzinger
Copy link

Ok ... thought of something like that, but really wasn't sure. Thanks for the explanation since I'm currently starting a deep dive into node ...

@christiaanwesterbeek
Copy link
Contributor

Seems like it's not just Windows that requires you to go to trouble to get node-gyp to work. I have created a fork that replaces Expat with Sax: #206

@herom
Copy link
Contributor

herom commented Sep 15, 2014

Closed as this issue refers to an outdated dependency (dropped node-expat in favour of sax --> #246)

@herom herom closed this as completed Sep 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants