Kibana development snapshot doesn't build

I'm trying to build Kibana, and following the instructions in contributing.md. Under Linux, when trying to run the command npm run elasticsearch, I get:

jc3@jc3-vgn:~/kibana$ npm run elasticsearch

kibana@5.0.0-snapshot elasticsearch /home/jc3/kibana > grunt esvm:dev:keepalive

Running "esvm:dev:keepalive" (esvm) task starting up "dev" cluster Keeping elasticsearch alive, to shutdown press command/control+c INFO - - cluster - Downloading & installing from "master" branch.
INFO - - cluster - Installing plugins
INFO - - cluster - Starting 1 nodes
Fatal error: Command failed: /bin/sh -c /home/jc3/kibana/esvm/dev/branch-master/bin/elasticsearch --help Exception in thread "main" java.lang.UnsupportedClassVersionError:
org/elasticsearch/bootstrap/Elasticsearch : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:803)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at
sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)

*** stuff deleted due to 5000 character limit ***

npm ERR! Linux 3.13.0-85-generic
jc3@jc3-vgn:~/kibana$

Under Windows 10, I get elasticsearch and kibana servers running, but when I try to build Kibana using npm run build, I get:

$ npm run build

kibana@5.0.0-snapshot build C:\Users\JohnC3\documents\jc3\kibana
grunt build

Running "build" task

Running "_build:getProps" task

Running "clean:build" (clean) task

0 paths cleaned.

Running "clean:target" (clean) task

0 paths cleaned.

Running "_build:downloadNodeBuilds:start" task

downloading linux-x64 - 11.25 mb
downloading windows - 11.14 mb
downloading linux-x86 - 10.85 mb
downloading darwin-x64 - 9.38 mb

Running "copy:devSource" (copy) task
Created 246 directories, copied 1059 files

Running "babel:build" (babel) task

Running "_build:babelOptions" task

Running "_build:installedPlugins" task

Running "_build:packageJson" task

Running "_build:readme" task

Running "_build:installNpmDeps" task

Running "_build:removePkgJsonDeps" task

Running "clean:testsFromModules" (clean) task

2980 paths cleaned.

Running "clean:deepModuleBins" (clean) task

1 path cleaned.

Running "clean:deepModules" (clean) task

6 paths cleaned.

Running "run:optimizeBuild" (run) task

Error: spawn ./build/kibana/bin/kibana ENOENT
Warning: non-zero exit code -4058 Use --force to continue.

Aborted due to warnings.

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "build"
npm ERR! node v4.4.2
npm ERR! npm v2.15.0
npm ERR! code ELIFECYCLE
npm ERR! kibana@5.0.0-snapshot build: grunt build
npm ERR! Exit status 3
npm ERR!
npm ERR! Failed at the kibana@5.0.0-snapshot build script 'grunt build'.
npm ERR! This is most likely a problem with the kibana package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! grunt build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs kibana
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls kibana
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\JohnC3\documents\jc3\kibana\npm-debug.log

JohnC3@JC3-VAIO-S MINGW64 ~/documents/jc3/kibana (master)
$

Is there a "production" snapshot on Git that should be used? Every time I run the Git command in contributing.md, it gits the 5.0.0 development version.

In any case, I'd appreciate any help that could be provided to allow me to be able to build Kibana under Ubuntu Linux or Windows 10. Thanks...

Your issue on Linux appears to be your JDK is not up to 1.8 but that's required for Elasticsearch 5.0 (which is master).
(it would be nice if it said "Unsupported JDK 1.7" or something more obvious)

Doing a "build" on Windows is not currently supported but there's a PR I'm assigned to test Fix build windows cygwin by repocho · Pull Request #6267 · elastic/kibana · GitHub. You could look at that and see if it helps/ Please add a comment on the PR if you're successful or not.

But you don't actually have to "build" to make changes and submit PRs with your changes. You can still change source and run Kibana to test without that "build" step.

Regards,
Lee

Thanks for the help Lee!

I posted the results of the Windows attempt on Google.

On Linux, after updating the JDK, I was able to get the targets built. On the first attempt, I got a "unexpected EOF" during the optimize step, and the build stopped. I ran the build a 2nd time with --force, and got the targets built. The optimize step showed "stopped". I ran it a 3rd time without --force, and got the same results; targets built but optimize showed "stopped".

Thanks...