OpenJDK 1.8.0-jdk8-b35 seems to break Leiningen 2

Is it only me experiencing an issue with running the most recent build of Leiningen 2 with the recent OpenJDK 8 x64-lambda JDK with Lambda from jdk8 branch (b35) (OpenJDK-OSX-8-x64-lambda-jdk-b35-20120507) on Mac OS X?

With the version of OpenJDK selected in the Java Preferences, lein2 finishes with a stacktrace.

Here’s the full log of the steps to reproduce the issue. Is it Clojure 1.4 or lein2?

jacek:~/oss/leiningen
$ git pull -u
Already up-to-date.

jacek:~
$ java -version
openjdk version "1.8.0-jdk8-b35"
OpenJDK Runtime Environment (build 1.8.0-jdk8-b35-20120507)
OpenJDK 64-Bit Server VM (build 24.0-b07, mixed mode)

jacek:~/oss/leiningen/leiningen-core
$ lein install
Copying 33 files to /Users/jacek/oss/leiningen/leiningen-core/lib
No namespaces to :aot compile listed in project.clj.
Created /Users/jacek/oss/leiningen/leiningen-core/leiningen-core-2.0.0-SNAPSHOT.jar
Wrote pom.xml
[INFO] Installing /Users/jacek/oss/leiningen/leiningen-core/leiningen-core-2.0.0-SNAPSHOT.jar to
/Users/jacek/.m2/repository/leiningen-core/leiningen-core/2.0.0-SNAPSHOT/leiningen-core-2.0.0-SNAPSHOT.jar

jacek:~
$ lein2 version
Exception in thread "main" java.lang.VerifyError: (class: ordered/map/OrderedMap, method: count signature: ()J) Expecting to find long on stack, compiling:(ordered/map.clj:26)
  at clojure.lang.Compiler.analyzeSeq(Compiler.java:6462)
  at clojure.lang.Compiler.analyze(Compiler.java:6262)
  at clojure.lang.Compiler.analyze(Compiler.java:6223)
  at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5618)
  at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5054)
  at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3674)
  at clojure.lang.Compiler.analyzeSeq(Compiler.java:6453)
  at clojure.lang.Compiler.analyze(Compiler.java:6262)
  at clojure.lang.Compiler.analyzeSeq(Compiler.java:6443)
  at clojure.lang.Compiler.analyze(Compiler.java:6262)
  at clojure.lang.Compiler.access$100(Compiler.java:37)
  at clojure.lang.Compiler$DefExpr$Parser.parse(Compiler.java:518)
  at clojure.lang.Compiler.analyzeSeq(Compiler.java:6455)
  at clojure.lang.Compiler.analyze(Compiler.java:6262)
  at clojure.lang.Compiler.analyzeSeq(Compiler.java:6443)
  at clojure.lang.Compiler.analyze(Compiler.java:6262)
  at clojure.lang.Compiler.analyze(Compiler.java:6223)
  at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5618)
  at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:5919)
  at clojure.lang.Compiler.analyzeSeq(Compiler.java:6455)
  at clojure.lang.Compiler.analyze(Compiler.java:6262)
  at clojure.lang.Compiler.analyze(Compiler.java:6223)
  at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5618)
  at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5054)
  at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3674)
  at clojure.lang.Compiler.analyzeSeq(Compiler.java:6453)
  at clojure.lang.Compiler.analyze(Compiler.java:6262)
  at clojure.lang.Compiler.eval(Compiler.java:6508)
  at clojure.lang.Compiler.load(Compiler.java:6952)
  at clojure.lang.RT.loadResourceScript(RT.java:359)
  at clojure.lang.RT.loadResourceScript(RT.java:350)
  at clojure.lang.RT.load(RT.java:429)
  at clojure.lang.RT.load(RT.java:400)
  at clojure.core$load$fn__4890.invoke(core.clj:5415)
  at clojure.core$load.doInvoke(core.clj:5414)
  at clojure.lang.RestFn.invoke(RestFn.java:408)
  at clojure.core$load_one.invoke(core.clj:5227)
  at clojure.core$load_lib.doInvoke(core.clj:5264)
  at clojure.lang.RestFn.applyTo(RestFn.java:142)
  at clojure.core$apply.invoke(core.clj:603)
  at clojure.core$load_libs.doInvoke(core.clj:5298)
  at clojure.lang.RestFn.applyTo(RestFn.java:137)
  at clojure.core$apply.invoke(core.clj:603)
  at clojure.core$require.doInvoke(core.clj:5381)
  at clojure.lang.RestFn.invoke(RestFn.java:551)
  at leiningen.core.project$eval22$loading__4784__auto____23.invoke(project.clj:1)
  at leiningen.core.project$eval22.invoke(project.clj:1)
  at clojure.lang.Compiler.eval(Compiler.java:6511)
  at clojure.lang.Compiler.eval(Compiler.java:6501)
  at clojure.lang.Compiler.load(Compiler.java:6952)
  at clojure.lang.RT.loadResourceScript(RT.java:359)
  at clojure.lang.RT.loadResourceScript(RT.java:350)
  at clojure.lang.RT.load(RT.java:429)
  at clojure.lang.RT.load(RT.java:400)
  at clojure.core$load$fn__4890.invoke(core.clj:5415)
  at clojure.core$load.doInvoke(core.clj:5414)
  at clojure.lang.RestFn.invoke(RestFn.java:408)
  at clojure.core$load_one.invoke(core.clj:5227)
  at clojure.core$load_lib.doInvoke(core.clj:5264)
  at clojure.lang.RestFn.applyTo(RestFn.java:142)
  at clojure.core$apply.invoke(core.clj:603)
  at clojure.core$load_libs.doInvoke(core.clj:5298)
  at clojure.lang.RestFn.applyTo(RestFn.java:137)
  at clojure.core$apply.invoke(core.clj:603)
  at clojure.core$require.doInvoke(core.clj:5381)
  at clojure.lang.RestFn.invoke(RestFn.java:482)
  at leiningen.core.main$eval3$loading__4784__auto____4.invoke(main.clj:1)
  at leiningen.core.main$eval3.invoke(main.clj:1)
  at clojure.lang.Compiler.eval(Compiler.java:6511)
  at clojure.lang.Compiler.eval(Compiler.java:6501)
  at clojure.lang.Compiler.load(Compiler.java:6952)
  at clojure.lang.RT.loadResourceScript(RT.java:359)
  at clojure.lang.RT.loadResourceScript(RT.java:350)
  at clojure.lang.RT.load(RT.java:429)
  at clojure.lang.RT.load(RT.java:400)
  at clojure.core$load$fn__4890.invoke(core.clj:5415)
  at clojure.core$load.doInvoke(core.clj:5414)
  at clojure.lang.RestFn.invoke(RestFn.java:408)
  at clojure.core$load_one.invoke(core.clj:5227)
  at clojure.core$load_lib.doInvoke(core.clj:5264)
  at clojure.lang.RestFn.applyTo(RestFn.java:142)
  at clojure.core$apply.invoke(core.clj:603)
  at clojure.core$load_libs.doInvoke(core.clj:5298)
  at clojure.lang.RestFn.applyTo(RestFn.java:137)
  at clojure.core$apply.invoke(core.clj:603)
  at clojure.core$require.doInvoke(core.clj:5381)
  at clojure.lang.RestFn.invoke(RestFn.java:408)
  at clojure.main$main_opt.invoke(main.clj:324)
  at clojure.main$main.doInvoke(main.clj:427)
  at clojure.lang.RestFn.invoke(RestFn.java:436)
  at clojure.lang.Var.invoke(Var.java:423)
  at clojure.lang.AFn.applyToHelper(AFn.java:167)
  at clojure.lang.Var.applyTo(Var.java:532)
  at clojure.main.main(main.java:37)
Caused by: java.lang.VerifyError: (class: ordered/map/OrderedMap, method: count signature: ()J) Expecting to find long on stack
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Class.java:259)
  at clojure.lang.RT.classForName(RT.java:2039)
  at clojure.lang.Compiler$HostExpr.maybeClass(Compiler.java:957)
  at clojure.lang.Compiler$HostExpr.access$400(Compiler.java:736)
  at clojure.lang.Compiler$NewExpr$Parser.parse(Compiler.java:2473)
  at clojure.lang.Compiler.analyzeSeq(Compiler.java:6455)
  ... 93 more

With the version of OpenJDK changed to 1.7.0-jdk7u4-b21, it works fine.

jacek:~
$ java -version
openjdk version "1.7.0-jdk7u4-b21"
OpenJDK Runtime Environment (build 1.7.0-jdk7u4-b21-20120427)
OpenJDK 64-Bit Server VM (build 23.0-b21, mixed mode)

jacek:~
$ lein2 version
Leiningen 2.0.0-SNAPSHOT on Java 1.7.0-jdk7u4-b21 OpenJDK 64-Bit Server VM

jacek:~
$ lein2 repl
nREPL server started on port 60220
Welcome to REPL-y!
Clojure 1.4.0
    Exit: Control+D or (exit) or (quit)
Commands: (user/help)
    Docs: (doc function-name-here)
          (find-doc "part-of-name-here")
  Source: (source function-name-here)
          (user/sourcery function-name-here)
 Javadoc: (javadoc java-object-or-class-here)
Examples from clojuredocs.org: [clojuredocs or cdoc]
          (user/clojuredocs name-here)
          (user/clojuredocs "ns-here" "name-here")
nil
user=> (clojure-version)
"1.4.0"
user=> (leiningen.core.main/leiningen-version)
"2.0.0-SNAPSHOT"
Be Sociable, Share!
This entry was posted in Languages.

One Response to OpenJDK 1.8.0-jdk8-b35 seems to break Leiningen 2

  1. Pobody says:

    I often get stacktrace crashes from OpenJDK on amd64 ubuntu, so I have to manually download Oracle JDK.

Leave a Reply

%d bloggers like this: