<< Back to previous view

[CLJ-856] Building Clojure (git head) on JDK7 fails Created: 12/Oct/11  Updated: 01/Mar/13  Resolved: 27/Jan/12

Status: Closed
Project: Clojure
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Lars Rune Nøstdal Assignee: Stuart Sierra
Resolution: Completed Votes: 1
Labels: None

linux, "1.7.0_02-ea", x86-64

Attachments: Text File 0002-Set-source-level-explicitly-to-1.5-to-make-clojure-c.patch    


lnostdal@blackbox:~/programming/clojure$ ant
Buildfile: /home/lnostdal/programming/clojure/build.xml

[delete] Deleting directory /home/lnostdal/programming/clojure/target
[delete] Deleting /home/lnostdal/programming/clojure/clojure-1.4.0-master-SNAPSHOT.jar
[delete] Deleting /home/lnostdal/programming/clojure/clojure.jar

[mkdir] Created dir: /home/lnostdal/programming/clojure/target/classes
[mkdir] Created dir: /home/lnostdal/programming/clojure/target/classes/clojure

[javac] /home/lnostdal/programming/clojure/build.xml:39: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 144 source files to /home/lnostdal/programming/clojure/target/classes
[javac] javac: target release 1.5 conflicts with default source release 1.7

/home/lnostdal/programming/clojure/build.xml:39: Compile failed; see the compiler error output for details.

Total time: 0 seconds

lnostdal@blackbox:~/programming/clojure$ emacs -nw build.xml
lnostdal@blackbox:~/programming/clojure$ git diff
diff --git a/build.xml b/build.xml
index a693e6d..c05adf8 100644
— a/build.xml
+++ b/build.xml
@@ -36,7 +36,7 @@
<target name="compile-java" depends="init"
description="Compile Java sources.">
<javac srcdir="${jsrc}" destdir="${build}" includeJavaRuntime="yes"

  • debug="true" target="1.5"/>
    + debug="true"/>

<target name="compile-clojure"

lnostdal@blackbox:~/programming/clojure$ ant

..and it builds OK. I don't understand the Java tools very well, but I decided to try removing "target" based on what I found here: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6856165

Comment by Stuart Halloway [ 25/Oct/11 6:03 PM ]

Based on the Sun bug link above, it seems to me we need to add the source="1.5" flag if we want to be able to build on 1.7

Comment by Tassilo Horn [ 23/Dec/11 3:54 AM ]

Exactly, Stuart. Here is a patch.

Generated at Sat Sep 23 20:33:24 CDT 2017 using JIRA 4.4#649-r158309.