fg2it / grafana-on-raspberry

Grafana packages for raspberry pi (armv6/armv7) and aarch64/arm64
311 stars 32 forks source link

What about grafana v3.0? #3

Closed anisimovevgeniy closed 8 years ago

anisimovevgeniy commented 8 years ago

Hello, i'm trying to compile v3.0. Can you help with this errors?

root@raspberrypi:/tmp/graf-build/src/github.com/grafana/grafana# npm install
\
> phantomjs-prebuilt@2.1.7 install /tmp/graf-build/src/github.com/grafana/grafana/node_modules/phantomjs-prebuilt
> node install.js

Considering PhantomJS found at /usr/local/bin/phantomjs
Found PhantomJS at /usr/local/bin/phantomjs ...verifying
PhantomJS detected, but wrong version 2.0.0 @ /usr/local/bin/phantomjs.
Unexpected platform or architecture: linux/arm
It seems there is no binary available for your platform/architecture
Try to install PhantomJS globally
npm ERR! Linux 4.1.21-v7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v4.4.1
npm ERR! npm  v2.14.20
npm ERR! code ELIFECYCLE

npm ERR! phantomjs-prebuilt@2.1.7 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phantomjs-prebuilt@2.1.7 install script 'node install.js'.
npm ERR! This is most likely a problem with the phantomjs-prebuilt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs phantomjs-prebuilt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls phantomjs-prebuilt
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /tmp/graf-build/src/github.com/grafana/grafana/npm-debug.log

root@raspberrypi:/tmp/graf-build/src/github.com/grafana/grafana# phantomjs --version 2.0.0

fg2it commented 8 years ago

@anisimovevgeniy I Didn't expect that. From your log

PhantomJS detected, but wrong version 2.0.0 @ /usr/local/bin/phantomjs.

Your phantomjs is correctly detected, but the npm module phantomjs-prebuilt want a specific version. In deed, here you see that the version is checked against v2.1.1.

I thought this kind of check was dropped since I didn't have that problem building v2.6.0. I checked, and my build uses 1.9.20 of phantomjs npm module (previous name of phantomjs-prebuild) which also want a specific version (1.9.8) but, for an unknown reason, accept my version (2.0.1-development).

So, the suggestion I have is to use the same kind of dirty trick I used here : patch your phantomjs binary. You can use something like hexedit to open your file, locate the version string and simply rewrite that.

anisimovevgeniy commented 8 years ago

Dirty magic)) It works, thx!

fg2it commented 8 years ago

Glad to know. Thanks for your feedback.