Closed xiaopow closed 8 years ago
@xiaopow seems to be an issue with secp256k1 . does sudo apt-get install libgmp-dev
help?
@iurimatias sorry, running on a mac os, do you mind giving the command to install on mac?
@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
@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
@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
+1, filed an issue above
+1 myabe linked to https://github.com/ethereum/ethereumjs-tx/issues/6
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?
I'm getting a different set of errors now: https://gist.github.com/KenKappler/8a31688895e40793d597
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'
@pjsample for that specific issue, does this help? https://github.com/iurimatias/embark-framework#eaccess-error
@xiaopow @hitchcott what OS and OS version are you using? (e.g OSX Yosemite, Ubuntu 14.04, etc..)
@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'
```
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 ?~~~
Debugging this on OS X 10.11 here: https://github.com/wanderer/secp256k1-node/issues/35
@iurimatias can you try bumping ethersim's etheruemjs-tx to 0.6.9 ?
@wanderer done
@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?
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'
@croqaz what do you get with sudo npm -g install solc
?
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
@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
@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
Thanks @iurimatias - seems to be working with 1.0.2
(still got warnings from secp256k1@1.1.4
, but it seems alright)
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.
@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
@iurimatias Figured it out. EtherSim is using outdated ethereumjs-vm (which has outdated secp256k1):
https://github.com/iurimatias/EtherSim/issues/1#issuecomment-152789878
@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.
@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.
@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.
Hei @hitchcott , no, I still can't install Solc using npm install -g solc
.
@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 :(
@taoeffect ....you know...you could just submit a PR with updated bits :)
@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 ....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).
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)
ethersim is now an optional dependency on embark 1.1.1 , the latest ethersim also uses more up to date dependencies
Hi, am seeing the following error during sudo npm install -g embark-framework grunt-cli