mooz / node-icu-charset-detector

A simple binding of ICU character set detection for Node.js
MIT License
86 stars 22 forks source link

failed install on osx 10.9.1 #7

Closed unbug closed 10 years ago

unbug commented 10 years ago
 
node-gyp rebuild

  CXX(target) Release/obj.target/node-icu-charset-detector/node-icu-charset-detector.o
../node-icu-charset-detector.cpp:5:10: fatal error: 'unicode/ucsdet.h' file not found
#include 
         ^

how can I fix this problem?

mooz commented 10 years ago

Maybe you forgot to exec brew link icu4k? See #5 for details.

unbug commented 10 years ago

I did exec that,still has the problem.

marcghorayeb commented 10 years ago

I have the same error Compiled from ICU source: ./runConfigure make make install

the sources have been copied to /usr/local/include/unicode but the npm install fails

marcghorayeb commented 10 years ago

@mooz any idea ?

marcghorayeb commented 10 years ago

Ok I have found a fix for my issue. I had to manually install Xcode's CLI Tools, even though I had them before upgrading to Mavericks Just type xcode-select --install in terminal, let the install complete itself and that's it !

mooz commented 10 years ago

Thank you for your instruction and P/R to fix this issue! I close this issue, since I've merged your P/R.

(Unfortunately, I don't have a Mac and thus cannot tackle with this kind of issue directly :cry: )

buley commented 8 years ago

I believe this step is no longer possible:

brew link icu4k

The package does not seem to install on OS X El Capitan or Heroku's default Linux distribution.

I can get the package to install by brew linking

brew link icu4c --force

I am lost on how to install this package on Linux

[copilot] brew install icu4c                                                                        master  ✱
Warning: icu4c-56.1 already installed
[copilot] brew link icu4k                                                                           master  ✱
Error: No such keg: /usr/local/Cellar/icu4k

[copilot] npm install

> node-icu-charset-detector@0.1.4 install /Users/buley/Code/twitchpilot/node_modules/node-icu-charset-detector
> node-gyp rebuild

  CXX(target) Release/obj.target/node-icu-charset-detector/node-icu-charset-detector.o
../node-icu-charset-detector.cpp:7:10: fatal error: 'unicode/ucsdet.h' file not found
#include <unicode/ucsdet.h>
         ^
1 error generated.
make: *** [Release/obj.target/node-icu-charset-detector/node-icu-charset-detector.o] 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:270:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 15.4.0
gyp ERR! command "/usr/local/Cellar/node/5.3.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/buley/Code/twitchpilot/node_modules/node-icu-charset-detector
gyp ERR! node -v v5.3.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm WARN install:node-icu-charset-detector@0.1.4 node-icu-charset-detector@0.1.4 install: `node-gyp rebuild`
npm WARN install:node-icu-charset-detector@0.1.4 Exit status 1
npm WARN EPACKAGEJSON twitchpilot@1.0.0 No description
npm WARN EPACKAGEJSON twitchpilot@1.0.0 No repository field.

[copilot] git push heroku master                                                                      master 
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 281 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Using set buildpack heroku/nodejs
remote: -----> Node.js app detected
remote: 
remote: -----> Creating runtime environment
remote:        
remote:        NPM_CONFIG_LOGLEVEL=error
remote:        NPM_CONFIG_PRODUCTION=true
remote:        NODE_ENV=production
remote:        NODE_MODULES_CACHE=true
remote: 
remote: -----> Installing binaries
remote:        engines.node (package.json):  unspecified
remote:        engines.npm (package.json):   unspecified (use default)
remote:        
remote:        Resolving node version (latest stable) via semver.io...
remote:        Downloading and installing node 5.9.1...
remote:        Using default npm version: 3.7.3
remote: 
remote: -----> Restoring cache
remote:        Loading 2 from cacheDirectories (default):
remote:        - node_modules
remote:        - bower_components (not cached - skipping)
remote: 
remote: -----> Building dependencies
remote:        Pruning any extraneous modules
remote:        Installing node modules (package.json)
remote:        
remote:        > node-icu-charset-detector@0.1.4 install /tmp/build_ab95e8c0f865492a7ca7a9c3b1a75523/node_modules/node-icu-charset-detector
remote:        > node-gyp rebuild
remote:        
remote:        make: Entering directory `/tmp/build_ab95e8c0f865492a7ca7a9c3b1a75523/node_modules/node-icu-charset-detector/build'
remote:        CXX(target) Release/obj.target/node-icu-charset-detector/node-icu-charset-detector.o
remote:        ../node-icu-charset-detector.cpp:7:28: fatal error: unicode/ucsdet.h: No such file or director
remote:        #include <unicode/ucsdet.h>
remote:        ^
remote:        compilation terminated.
remote:        make: *** [Release/obj.target/node-icu-charset-detector/node-icu-charset-detector.o] Error 1
remote:        make: Leaving directory `/tmp/build_ab95e8c0f865492a7ca7a9c3b1a75523/node_modules/node-icu-charset-detector/build'
remote:        gyp ERR! build error
remote:        gyp ERR! stack Error: `make` failed with exit code: 2
remote:        gyp ERR! stack     at ChildProcess.onExit (/tmp/build_ab95e8c0f865492a7ca7a9c3b1a75523/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
remote:        gyp ERR! stack     at emitTwo (events.js:100:13)
remote:        gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
remote:        gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
remote:        gyp ERR! System Linux 3.13.0-79-generic
remote:        gyp ERR! command "/tmp/build_ab95e8c0f865492a7ca7a9c3b1a75523/.heroku/node/bin/node" "/tmp/build_ab95e8c0f865492a7ca7a9c3b1a75523/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
remote:        gyp ERR! cwd /tmp/build_ab95e8c0f865492a7ca7a9c3b1a75523/node_modules/node-icu-charset-detecto
remote:        gyp ERR! node -v v5.9.1
remote:        gyp ERR! node-gyp -v v3.2.1
remote:        gyp ERR! not ok
remote: