embarklabs / embark

Framework for serverless Decentralized Applications using Ethereum, IPFS and other platforms
https://framework.embarklabs.io/
MIT License
3.79k stars 495 forks source link

npm install errors #99

Closed xiaopow closed 8 years ago

xiaopow commented 9 years ago

Hi, am seeing the following error during sudo npm install -g embark-framework grunt-cli

/usr/local/bin/grunt -> /usr/local/lib/node_modules/grunt-cli/bin/grunt

> secp256k1@1.1.1 install /usr/local/lib/node_modules/embark-framework/node_modules/ethersim/node_modules/ethereumjs-tx/node_modules/secp256k1
> node-gyp rebuild

  CXX(target) Release/obj.target/secp256k1/functions.o
../functions.cc:221:57: warning: variable 'pub_key' is uninitialized when used here [-Wuninitialized]
  int results = secp256k1_ec_pubkey_parse(secp256k1ctx, pub_key, pk_data, pub_len);
                                                        ^~~~~~~
../functions.cc:220:30: note: initialize the variable 'pub_key' to silence this warning
  secp256k1_pubkey_t *pub_key;
                             ^
                              = NULL
../functions.cc:245:56: warning: variable 'pub_key' is uninitialized when used here [-Wuninitialized]
  int results= secp256k1_ec_pubkey_parse(secp256k1ctx, pub_key, pk_data, pub_len);
                                                       ^~~~~~~
../functions.cc:244:30: note: initialize the variable 'pub_key' to silence this warning
  secp256k1_pubkey_t *pub_key;
                             ^
                              = NULL
2 warnings generated.
  CXX(target) Release/obj.target/secp256k1/util.o
  CXX(target) Release/obj.target/secp256k1/secp256k1.o
  CC(target) Release/obj.target/secp256k1/secp256k1-src/src/secp256k1.o
In file included from ../secp256k1-src/src/secp256k1.c:12:
In file included from ../secp256k1-src/src/num_impl.h:17:
../secp256k1-src/src/num_gmp_impl.h:25:13: warning: unused function 'secp256k1_num_copy'
      [-Wunused-function]
static void secp256k1_num_copy(secp256k1_num_t *r, const secp256k1_num_t *a) {
            ^
../secp256k1-src/src/num_gmp_impl.h:163:12: warning: unused function 'secp256k1_num_eq'
      [-Wunused-function]
static int secp256k1_num_eq(const secp256k1_num_t *a, const secp256k1_num_t *b) {
           ^
../secp256k1-src/src/num_gmp_impl.h:195:13: warning: unused function 'secp256k1_num_add'
      [-Wunused-function]
static void secp256k1_num_add(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_n...
            ^
../secp256k1-src/src/num_gmp_impl.h:201:13: warning: unused function 'secp256k1_num_sub'
      [-Wunused-function]
static void secp256k1_num_sub(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_n...
            ^
../secp256k1-src/src/num_gmp_impl.h:207:13: warning: unused function 'secp256k1_num_mul'
      [-Wunused-function]
static void secp256k1_num_mul(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_n...
            ^
../secp256k1-src/src/num_gmp_impl.h:80:13: warning: unused function 'secp256k1_num_mod'
      [-Wunused-function]
static void secp256k1_num_mod(secp256k1_num_t *r, const secp256k1_num_t *m) {
            ^
../secp256k1-src/src/num_gmp_impl.h:234:13: warning: unused function 'secp256k1_num_shift'
      [-Wunused-function]
static void secp256k1_num_shift(secp256k1_num_t *r, int bits) {
            ^
../secp256k1-src/src/num_gmp_impl.h:149:12: warning: unused function 'secp256k1_num_is_neg'
      [-Wunused-function]
static int secp256k1_num_is_neg(const secp256k1_num_t *a) {
           ^
../secp256k1-src/src/num_gmp_impl.h:256:13: warning: unused function 'secp256k1_num_negate'
      [-Wunused-function]
static void secp256k1_num_negate(secp256k1_num_t *r) {
            ^
In file included from ../secp256k1-src/src/secp256k1.c:13:
In file included from ../secp256k1-src/src/field_impl.h:19:
../secp256k1-src/src/field_5x52_impl.h:54:13: warning: unused function 'secp256k1_fe_verify'
      [-Wunused-function]
static void secp256k1_fe_verify(const secp256k1_fe_t *a) {
            ^
In file included from ../secp256k1-src/src/secp256k1.c:15:
../secp256k1-src/src/group_impl.h:36:13: warning: unused function 'secp256k1_ge_set_infinity'
      [-Wunused-function]
static void secp256k1_ge_set_infinity(secp256k1_ge_t *r) {
            ^
../secp256k1-src/src/group_impl.h:161:13: warning: unused function 'secp256k1_gej_set_xy'
      [-Wunused-function]
static void secp256k1_gej_set_xy(secp256k1_gej_t *r, const secp256k1_fe_t *x, const secp256k1...
            ^
In file included from ../secp256k1-src/src/secp256k1.c:14:
../secp256k1-src/src/scalar_impl.h:28:13: warning: unused function 'secp256k1_scalar_get_num'
      [-Wunused-function]
static void secp256k1_scalar_get_num(secp256k1_num_t *r, const secp256k1_scalar_t *a) {
            ^
In file included from ../secp256k1-src/src/secp256k1.c:14:
In file included from ../secp256k1-src/src/scalar_impl.h:20:
../secp256k1-src/src/scalar_4x64_impl.h:886:13: warning: unused function 'secp256k1_scalar_split_128'
      [-Wunused-function]
static void secp256k1_scalar_split_128(secp256k1_scalar_t *r1, secp256k1_scalar_t *r2, const ...
            ^
In file included from ../secp256k1-src/src/secp256k1.c:15:
../secp256k1-src/src/group_impl.h:227:12: warning: unused function 'secp256k1_gej_is_valid_var'
      [-Wunused-function]
static int secp256k1_gej_is_valid_var(const secp256k1_gej_t *a) {
           ^
15 warnings generated.
  SOLINK_MODULE(target) Release/secp256k1.node
  SOLINK_MODULE(target) Release/secp256k1.node: Finished

> sha3@1.2.0 install /usr/local/lib/node_modules/embark-framework/node_modules/ethersim/node_modules/ethereumjs-util/node_modules/sha3
> node-gyp rebuild

  CXX(target) Release/obj.target/sha3/src/addon.o
  CXX(target) Release/obj.target/sha3/src/displayIntermediateValues.o
  CXX(target) Release/obj.target/sha3/src/KeccakF-1600-reference.o
  CXX(target) Release/obj.target/sha3/src/KeccakNISTInterface.o
  CXX(target) Release/obj.target/sha3/src/KeccakSponge.o
  SOLINK_MODULE(target) Release/sha3.node
  SOLINK_MODULE(target) Release/sha3.node: Finished

> secp256k1@1.1.1 install /usr/local/lib/node_modules/embark-framework/node_modules/ethersim/node_modules/ethereumjs-vm/node_modules/secp256k1
> node-gyp rebuild

  CXX(target) Release/obj.target/secp256k1/functions.o
../functions.cc:221:57: warning: variable 'pub_key' is uninitialized when used here [-Wuninitialized]
  int results = secp256k1_ec_pubkey_parse(secp256k1ctx, pub_key, pk_data, pub_len);
                                                        ^~~~~~~
../functions.cc:220:30: note: initialize the variable 'pub_key' to silence this warning
  secp256k1_pubkey_t *pub_key;
                             ^
                              = NULL
../functions.cc:245:56: warning: variable 'pub_key' is uninitialized when used here [-Wuninitialized]
  int results= secp256k1_ec_pubkey_parse(secp256k1ctx, pub_key, pk_data, pub_len);
                                                       ^~~~~~~
../functions.cc:244:30: note: initialize the variable 'pub_key' to silence this warning
  secp256k1_pubkey_t *pub_key;
                             ^
                              = NULL
2 warnings generated.
  CXX(target) Release/obj.target/secp256k1/util.o
  CXX(target) Release/obj.target/secp256k1/secp256k1.o
  CC(target) Release/obj.target/secp256k1/secp256k1-src/src/secp256k1.o
In file included from ../secp256k1-src/src/secp256k1.c:12:
In file included from ../secp256k1-src/src/num_impl.h:17:
../secp256k1-src/src/num_gmp_impl.h:25:13: warning: unused function 'secp256k1_num_copy'
      [-Wunused-function]
static void secp256k1_num_copy(secp256k1_num_t *r, const secp256k1_num_t *a) {
            ^
../secp256k1-src/src/num_gmp_impl.h:163:12: warning: unused function 'secp256k1_num_eq'
      [-Wunused-function]
static int secp256k1_num_eq(const secp256k1_num_t *a, const secp256k1_num_t *b) {
           ^
../secp256k1-src/src/num_gmp_impl.h:195:13: warning: unused function 'secp256k1_num_add'
      [-Wunused-function]
static void secp256k1_num_add(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_n...
            ^
../secp256k1-src/src/num_gmp_impl.h:201:13: warning: unused function 'secp256k1_num_sub'
      [-Wunused-function]
static void secp256k1_num_sub(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_n...
            ^
../secp256k1-src/src/num_gmp_impl.h:207:13: warning: unused function 'secp256k1_num_mul'
      [-Wunused-function]
static void secp256k1_num_mul(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_n...
            ^
../secp256k1-src/src/num_gmp_impl.h:80:13: warning: unused function 'secp256k1_num_mod'
      [-Wunused-function]
static void secp256k1_num_mod(secp256k1_num_t *r, const secp256k1_num_t *m) {
            ^
../secp256k1-src/src/num_gmp_impl.h:234:13: warning: unused function 'secp256k1_num_shift'
      [-Wunused-function]
static void secp256k1_num_shift(secp256k1_num_t *r, int bits) {
            ^
../secp256k1-src/src/num_gmp_impl.h:149:12: warning: unused function 'secp256k1_num_is_neg'
      [-Wunused-function]
static int secp256k1_num_is_neg(const secp256k1_num_t *a) {
           ^
../secp256k1-src/src/num_gmp_impl.h:256:13: warning: unused function 'secp256k1_num_negate'
      [-Wunused-function]
static void secp256k1_num_negate(secp256k1_num_t *r) {
            ^
In file included from ../secp256k1-src/src/secp256k1.c:13:
In file included from ../secp256k1-src/src/field_impl.h:19:
../secp256k1-src/src/field_5x52_impl.h:54:13: warning: unused function 'secp256k1_fe_verify'
      [-Wunused-function]
static void secp256k1_fe_verify(const secp256k1_fe_t *a) {
            ^
In file included from ../secp256k1-src/src/secp256k1.c:15:
../secp256k1-src/src/group_impl.h:36:13: warning: unused function 'secp256k1_ge_set_infinity'
      [-Wunused-function]
static void secp256k1_ge_set_infinity(secp256k1_ge_t *r) {
            ^
../secp256k1-src/src/group_impl.h:161:13: warning: unused function 'secp256k1_gej_set_xy'
      [-Wunused-function]
static void secp256k1_gej_set_xy(secp256k1_gej_t *r, const secp256k1_fe_t *x, const secp256k1...
            ^
In file included from ../secp256k1-src/src/secp256k1.c:14:
../secp256k1-src/src/scalar_impl.h:28:13: warning: unused function 'secp256k1_scalar_get_num'
      [-Wunused-function]
static void secp256k1_scalar_get_num(secp256k1_num_t *r, const secp256k1_scalar_t *a) {
            ^
In file included from ../secp256k1-src/src/secp256k1.c:14:
In file included from ../secp256k1-src/src/scalar_impl.h:20:
../secp256k1-src/src/scalar_4x64_impl.h:886:13: warning: unused function 'secp256k1_scalar_split_128'
      [-Wunused-function]
static void secp256k1_scalar_split_128(secp256k1_scalar_t *r1, secp256k1_scalar_t *r2, const ...
            ^
In file included from ../secp256k1-src/src/secp256k1.c:15:
../secp256k1-src/src/group_impl.h:227:12: warning: unused function 'secp256k1_gej_is_valid_var'
      [-Wunused-function]
static int secp256k1_gej_is_valid_var(const secp256k1_gej_t *a) {
           ^
15 warnings generated.
  SOLINK_MODULE(target) Release/secp256k1.node
  SOLINK_MODULE(target) Release/secp256k1.node: Finished
/usr/local/bin/embark -> /usr/local/lib/node_modules/embark-framework/bin/embark
grunt-cli@0.1.13 /usr/local/lib/node_modules/grunt-cli
├── resolve@0.3.1
├── nopt@1.0.10 (abbrev@1.0.7)
└── findup-sync@0.1.3 (lodash@2.4.2, glob@3.2.11)

embark-framework@1.0.2 /usr/local/lib/node_modules/embark-framework
├── js-sha3@0.3.1
├── toposort@0.2.12
├── wrench@1.5.8
├── commander@2.9.0 (graceful-readlink@1.0.1)
├── shelljs@0.5.3
├── mkdirp@0.5.1 (minimist@0.0.8)
├── meteor-build-client@0.1.9 (simple-spinner@0.0.3, underscore@1.8.3)
├── grunt@0.4.5 (which@1.0.9, dateformat@1.0.2-1.2.3, eventemitter2@0.4.14, getobject@0.1.0, rimraf@2.2.8, colors@0.6.2, async@0.1.22, grunt-legacy-util@0.2.0, hooker@0.2.3, nopt@1.0.10, exit@0.1.2, minimatch@0.2.14, glob@3.1.21, lodash@0.9.2, coffee-script@1.3.3, underscore.string@2.2.1, iconv-lite@0.2.11, findup-sync@0.1.3, grunt-legacy-log@0.1.2, js-yaml@2.0.5)
├── read-yaml@1.0.0 (xtend@4.0.0, js-yaml@3.4.3)
├── web3@0.8.1 (xmlhttprequest@1.8.0, bignumber.js@2.0.7, crypto-js@3.1.5)
├── solc@0.1.5
└── ethersim@0.1.1 (ethereumjs-account@0.0.3, express@4.13.3, body-parser@1.14.1, merkle-patricia-tree@1.1.2, request@2.65.0, json-rpc2@1.0.1, ethereumjs-tx@0.6.3, ethereumjs-util@1.3.7, ethereumjs-vm@0.1.5)
iurimatias commented 9 years ago

@xiaopow seems to be an issue with secp256k1 . does sudo apt-get install libgmp-dev help?

xiaopow commented 9 years ago

@iurimatias sorry, running on a mac os, do you mind giving the command to install on mac?

iurimatias commented 9 years ago

@xiaopow so it looks like some dependency. I never got this error, so I must have some dev lib installed. try one of these:

brew install gmp brew install openssl

ililic commented 9 years ago

@iurimatias - I'm seeing similar issues in Ubuntu using Node v4.2.1. Seems that a version bump to secp256k1@1.1.4 is required for newer versions of node: https://github.com/wanderer/secp256k1-node/issues/32

xiaopow commented 9 years ago

@y0ssa @iurimatias

I had both gmp and openssl installed prior to installing embark.

ran sudo npm -g install secp256k1@1.1.4, got the following error,

> secp256k1@1.1.4 install /usr/local/lib/node_modules/secp256k1
> node-gyp rebuild

  CXX(target) Release/obj.target/secp256k1/functions.o
../functions.cc:224:57: warning: variable 'pub_key' is uninitialized when used here [-Wuninitialized]
  int results = secp256k1_ec_pubkey_parse(secp256k1ctx, pub_key, pk_data, pub_len);
                                                        ^~~~~~~
../functions.cc:223:30: note: initialize the variable 'pub_key' to silence this warning
  secp256k1_pubkey_t *pub_key;
                             ^
                              = NULL
../functions.cc:248:56: warning: variable 'pub_key' is uninitialized when used here [-Wuninitialized]
  int results= secp256k1_ec_pubkey_parse(secp256k1ctx, pub_key, pk_data, pub_len);
                                                       ^~~~~~~
../functions.cc:247:30: note: initialize the variable 'pub_key' to silence this warning
  secp256k1_pubkey_t *pub_key;
                             ^
                              = NULL
2 warnings generated.
  CXX(target) Release/obj.target/secp256k1/util.o
  CXX(target) Release/obj.target/secp256k1/secp256k1.o
  CC(target) Release/obj.target/secp256k1/secp256k1-src/src/secp256k1.o
In file included from ../secp256k1-src/src/secp256k1.c:12:
In file included from ../secp256k1-src/src/num_impl.h:17:
../secp256k1-src/src/num_gmp_impl.h:25:13: warning: unused function 'secp256k1_num_copy'
      [-Wunused-function]
static void secp256k1_num_copy(secp256k1_num_t *r, const secp256k1_num_t *a) {
            ^
../secp256k1-src/src/num_gmp_impl.h:163:12: warning: unused function 'secp256k1_num_eq'
      [-Wunused-function]
static int secp256k1_num_eq(const secp256k1_num_t *a, const secp256k1_num_t *b) {
           ^
../secp256k1-src/src/num_gmp_impl.h:195:13: warning: unused function 'secp256k1_num_add'
      [-Wunused-function]
static void secp256k1_num_add(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_n...
            ^
../secp256k1-src/src/num_gmp_impl.h:201:13: warning: unused function 'secp256k1_num_sub'
      [-Wunused-function]
static void secp256k1_num_sub(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_n...
            ^
../secp256k1-src/src/num_gmp_impl.h:207:13: warning: unused function 'secp256k1_num_mul'
      [-Wunused-function]
static void secp256k1_num_mul(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_n...
            ^
../secp256k1-src/src/num_gmp_impl.h:80:13: warning: unused function 'secp256k1_num_mod'
      [-Wunused-function]
static void secp256k1_num_mod(secp256k1_num_t *r, const secp256k1_num_t *m) {
            ^
../secp256k1-src/src/num_gmp_impl.h:234:13: warning: unused function 'secp256k1_num_shift'
      [-Wunused-function]
static void secp256k1_num_shift(secp256k1_num_t *r, int bits) {
            ^
../secp256k1-src/src/num_gmp_impl.h:149:12: warning: unused function 'secp256k1_num_is_neg'
      [-Wunused-function]
static int secp256k1_num_is_neg(const secp256k1_num_t *a) {
           ^
../secp256k1-src/src/num_gmp_impl.h:256:13: warning: unused function 'secp256k1_num_negate'
      [-Wunused-function]
static void secp256k1_num_negate(secp256k1_num_t *r) {
            ^
In file included from ../secp256k1-src/src/secp256k1.c:13:
In file included from ../secp256k1-src/src/field_impl.h:19:
../secp256k1-src/src/field_5x52_impl.h:54:13: warning: unused function 'secp256k1_fe_verify'
      [-Wunused-function]
static void secp256k1_fe_verify(const secp256k1_fe_t *a) {
            ^
In file included from ../secp256k1-src/src/secp256k1.c:15:
../secp256k1-src/src/group_impl.h:36:13: warning: unused function 'secp256k1_ge_set_infinity'
      [-Wunused-function]
static void secp256k1_ge_set_infinity(secp256k1_ge_t *r) {
            ^
../secp256k1-src/src/group_impl.h:161:13: warning: unused function 'secp256k1_gej_set_xy'
      [-Wunused-function]
static void secp256k1_gej_set_xy(secp256k1_gej_t *r, const secp256k1_fe_t *x, const secp256k1...
            ^
In file included from ../secp256k1-src/src/secp256k1.c:14:
../secp256k1-src/src/scalar_impl.h:28:13: warning: unused function 'secp256k1_scalar_get_num'
      [-Wunused-function]
static void secp256k1_scalar_get_num(secp256k1_num_t *r, const secp256k1_scalar_t *a) {
            ^
In file included from ../secp256k1-src/src/secp256k1.c:14:
In file included from ../secp256k1-src/src/scalar_impl.h:20:
../secp256k1-src/src/scalar_4x64_impl.h:886:13: warning: unused function 'secp256k1_scalar_split_128'
      [-Wunused-function]
static void secp256k1_scalar_split_128(secp256k1_scalar_t *r1, secp256k1_scalar_t *r2, const ...
            ^
In file included from ../secp256k1-src/src/secp256k1.c:15:
../secp256k1-src/src/group_impl.h:227:12: warning: unused function 'secp256k1_gej_is_valid_var'
      [-Wunused-function]
static int secp256k1_gej_is_valid_var(const secp256k1_gej_t *a) {
           ^
15 warnings generated.
  SOLINK_MODULE(target) Release/secp256k1.node
  SOLINK_MODULE(target) Release/secp256k1.node: Finished
secp256k1@1.1.4 /usr/local/lib/node_modules/secp256k1
├── bindings@1.2.1
└── nan@2.1.0
IstoraMandiri commented 9 years ago

+1, filed an issue above

KenKappler commented 9 years ago

+1 myabe linked to https://github.com/ethereum/ethereumjs-tx/issues/6

iurimatias commented 9 years ago

just updated ethersim (0.1.2) to use newer ethereumjs-tx which in turn uses a newer secp256k1.

could you give it another go to see if anything improves?

KenKappler commented 9 years ago

I'm getting a different set of errors now: https://gist.github.com/KenKappler/8a31688895e40793d597

pjsample commented 9 years ago

I'm also encountering a number of errors when trying to install via npm. First I installed node and npm: sudo apt-get install node sudo apt-get install npm

and then tried install embark: sudo npm -g install embark-framework

One of the errors: npm ERR! Error: ENOENT, open '/home/paul/tmp/npm-7387-xG-wDr_P/1444841340327-0.8379627654794604/package/package.json'

And another: npm ERR! Error: ENOENT, open '/home/paul/tmp/npm-7387-xG-wDr_P/1444841340327-0.8379627654794604/package/package.json'

iurimatias commented 9 years ago

@pjsample for that specific issue, does this help? https://github.com/iurimatias/embark-framework#eaccess-error

iurimatias commented 9 years ago

@xiaopow @hitchcott what OS and OS version are you using? (e.g OSX Yosemite, Ubuntu 14.04, etc..)

pjsample commented 9 years ago

@iurimatias Thanks for the reply, but I'm still encountering errors after trying EACCESS approach. here's what I'm seeing:

npm ERR! not a package /home/paul/tmp/npm-4627-iiERKiRI/1444930140524-0.0024392264895141125/tmp.tgz npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/home/paul/npm-global/lib/node_modules/embark-framework/node_modules/grunt/node_modules/glob' npm ERR! error rolling back embark-framework@1.0.2 { [Error: ENOTEMPTY, rmdir '/home/paul/npm-global/lib/node_modules/embark-framework/node_modules/grunt/node_modules/glob'] npm ERR! error rolling back errno: 53, npm ERR! error rolling back code: 'ENOTEMPTY', npm ERR! error rolling back path: '/home/paul/npm-global/lib/node_modules/embark-framework/node_modules/grunt/node_modules/glob' } npm ERR! Error: ENOENT, open '/home/paul/tmp/npm-4627-iiERKiRI/1444930140524-0.0024392264895141125/package/package.json'

croqaz commented 9 years ago

UPDATE : This appears to be fixed now.



```
sudo npm install -g embark-framework

npm WARN install Couldn't install optional dependency: Error extracting /home/cro/.npm/solc/0.1.4/package.tgz archive: ENOENT, open '/home/cro/.npm/solc/0.1.4/package.tgz'
```

~~~In `/home/cro/.npm/solc/` there is 1 folder: 0.1.5. The folder 0.1.4 doesn't exist.
How can I hack it to work ?~~~
taoeffect commented 9 years ago

Debugging this on OS X 10.11 here: https://github.com/wanderer/secp256k1-node/issues/35

wanderer commented 9 years ago

@iurimatias can you try bumping ethersim's etheruemjs-tx to 0.6.9 ?

iurimatias commented 9 years ago

@wanderer done

iurimatias commented 9 years ago

@xiaopow @ililic @hitchcott @taoeffect @pjsample @croqaz @KenKappler @wanderer just released a new version of one of the dependencies that fixes a lot of npm issues. could you do npm cache clear, reinstall embark again and let me know if you are still running into issues?

croqaz commented 9 years ago

Hello @iurimatias

Sorry, still doesn't work.

cro-desktop :: ~/Dev » npm cache clean                
cro-desktop :: ~/Dev » sudo npm install -g embark-framework
npm WARN install Couldn't install optional dependency: Error extracting /home/cro/.npm/solc/0.1.5/package.tgz archive: ENOENT, open '/home/cro/.npm/solc/0.1.5/package.tgz'
iurimatias commented 9 years ago

@croqaz what do you get with sudo npm -g install solc ?

croqaz commented 9 years ago

Hello @iurimatias

sudo npm -g install solc

npm ERR! Linux 3.19.0-31-generic
npm ERR! argv "node" "/usr/bin/npm" "-g" "install" "solc"
npm ERR! node v0.12.7
npm ERR! npm  v3.3.8
npm ERR! code EREADFILE

npm ERR! Error extracting /home/cro/.npm/solc/0.1.5/package.tgz archive: ENOENT, open '/home/cro/.npm/solc/0.1.5/package.tgz'
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /home/cro/npm-debug.log
iurimatias commented 9 years ago

@croqaz in that case there is either something wrong with your npm installation itself or with the solc package. please open a request here https://github.com/chriseth/browser-solidity/issues

ililic commented 9 years ago

@iurimatias - Clean install worked for me. I was getting a pesky error from node-gyp: gyp WARN EACCES user "root" does not have permission to access the dev dir which is discussed at node-gyp#454. Adding --unsafe-perm fixed the node-gyp warning.

sudo npm -g install embark-framework --unsafe-perm 
IstoraMandiri commented 9 years ago

Thanks @iurimatias - seems to be working with 1.0.2

(still got warnings from secp256k1@1.1.4, but it seems alright)

taoeffect commented 9 years ago

Umm... I'm also still getting build failure.

Looks like Embark is still using secp256k1@1.1.4 for whatever reason, and that's causing it to fail to install on OS X.

This problem was fixed in secp256k1 1.1.6. Ya'll just need to bump the dependency version.

pjsample commented 9 years ago

@iurimatias I did npm cache clear and then did what @ililic suggested with sudo npm -g install embark-framework --unsafe-perm.

Everything looked good except this output:

npm WARN install Couldn't install optional dependency: Error extracting /home/paul/.npm/solc/0.1.5/package.tgz archive: ENOENT, open '/home/paul/.npm/solc/0.1.5/package.tgz'

I then tried to test it with embark blockchain and got:

/usr/local/lib/node_modules/embark-framework/node_modules/solc/bin/soljson-latest.js:1
aughtException",(function(ex){if(!(ex instanceof ExitStatus)){throw ex}}));Mod
                                                                    ^
Error: ENOENT, no such file or directory './embark.yml'
    at Object.fs.openSync (fs.js:432:18)
    at Object.fs.readFileSync (fs.js:286:15)
    at Function.readYamlSync [as sync] (/usr/local/lib/node_modules/embark-framework/node_modules/read-yaml/index.js:82:16)
    at Command.program.command.description.action.env (/usr/local/lib/node_modules/embark-framework/bin/embark:126:31)
    at Command.listener (/usr/local/lib/node_modules/embark-framework/node_modules/commander/index.js:301:8)
    at Command.EventEmitter.emit (events.js:98:17)
    at Command.parseArgs (/usr/local/lib/node_modules/embark-framework/node_modules/commander/index.js:615:12)
    at Command.parse (/usr/local/lib/node_modules/embark-framework/node_modules/commander/index.js:458:21)
    at Object.<anonymous> (/usr/local/lib/node_modules/embark-framework/bin/embark:181:9)
    at Module._compile (module.js:456:26)

I then tried to install solc via npm install -g solc and got the same error that @croqaz got.

I opened an issue with browser-solidity, https://github.com/chriseth/browser-solidity/issues/66

taoeffect commented 9 years ago

@iurimatias Figured it out. EtherSim is using outdated ethereumjs-vm (which has outdated secp256k1):

https://github.com/iurimatias/EtherSim/issues/1#issuecomment-152789878

IstoraMandiri commented 9 years ago

@pjsample try using embark demo; cd embark_demo; embark blockchain

@taoeffect Mine seemed to start working when I rebuilt solc in homebrew through cpp-ethereum. I'll also try your fix.

pjsample commented 9 years ago

@hitchcott No such luck with the embark demo.

This is what I'm seeing after running embark blockchain

grunt-cli: The grunt command line interface. (v0.1.13)

Fatal error: Unable to find local grunt.

If you're seeing this message, either a Gruntfile wasn't found or grunt
hasn't been installed locally to your project. For more information about
installing and configuring grunt, please see the Getting Started guide:

http://gruntjs.com/getting-started

Also, when I run embark demo I get this error: npm ERR! Error extracting /home/paul/.npm/solc/0.1.5/package.tgz archive: ENOENT, open '/home/paul/.npm/solc/0.1.5/package.tgz'

It seems like it would work if not for the solc issue.

IstoraMandiri commented 9 years ago

@pjsample How about brew install cpp-ethereum ? (this will should rebuild solc, but probably won't work...)

How about npm install -g solc ? @croqaz says it's fixed now.

croqaz commented 9 years ago

Hei @hitchcott , no, I still can't install Solc using npm install -g solc.

taoeffect commented 9 years ago

@iurimatias, editing Embark's package.json to set "ethersim": "iurimatias/EtherSim#develop" and then doing a local npm install -g . got it to install.

However, embark demo is broken. For whatever reason that I can't fathom, it starts installing everything that was required to install Embark all over again, but locally I guess.

It fails when it installs secp256k1 for the 3rd or 4th time (but version 1.1.4 instead of 1.1.6):

> secp256k1@1.1.4 install /Users/greg/dapps/embark_demo/node_modules/embark-framework/node_modules/ethersim/node_modules/ethereumjs-vm/node_modules/secp256k1

Again as per https://github.com/iurimatias/EtherSim/issues/2 this is due to Ethersim. I supposed it's because it's copying boilerplate or something, which specifies as specific version of embark-framework instead of the locally installed one.

boilerplate shouldn't specify embark-framework as a devDependency at all. That's implied by the instructions to install embark globally. Similarly boilerplate shouldn't have grunt-cli listed in the devDependencies.

Of course, removing those from boilerplate still doesn't fix the problem because grunt-embark also has an outdated version of Ethersim. sigh :(

VoR0220 commented 9 years ago

@taoeffect ....you know...you could just submit a PR with updated bits :)

iurimatias commented 9 years ago

@taoeffect EtherSim develop branch has a big update and solves this issues. however it is still under development and currently the testing part is broken (thus why there hasn't been a release).

The changes you did, the missing part, is that the boilerplate package needs to be changed to your embark clone as well https://github.com/iurimatias/embark-framework/blob/develop/boilerplate/package.json

taoeffect commented 9 years ago

@taoeffect ....you know...you could just submit a PR with updated bits :)

I was just trying to get it to work; the changes I made are not PR worthy (i.e. "ethersim": "iurimatias/EtherSim#develop" is not something that belongs in a PR).

jbaylina commented 8 years ago

Just for reference. In a MAC (10.11.3 El Capitan) I had tu run

xcode-select --install

as it's suggested here:

https://github.com/ethereumjs/ethereumjs-tx/issues/6

Now it installs!. (With lots of warnings)

iurimatias commented 8 years ago

ethersim is now an optional dependency on embark 1.1.1 , the latest ethersim also uses more up to date dependencies