Issue #1317
closedBuilding Replicant with javac >= 1.8
0%
Description
I tried to compile Replicant 4.2 with Oracle Java 1.8.0 update 60 installed (on a x86_64 GNU/Linux desktop operating system).
The pre-check says:
Checking build tools versions...
****************************************************
You are attempting to build with the incorrect version
of javac.
Your version is: javac 1.8.0_60.
The correct version is: 1.6 or 1.7.
****************************************************
build/core/main.mk:133: *** stop. Stop.
So I made a little change to the file: /replicant-4.2/build/core/main.mk
(the patch file 'add-1.8-to-javac-correct-version-check.patch' is attached).
After that the build process starts and run for some hours, but finally breaks on:
host Java: guavalib (/home/misc/dev/replicant-4.2/out/host/common/obj/JAVA_LIBRARIES/guavalib_intermediates/classes)
warning: [options] bootstrap class path not set in conjunction with -source 1.5
warning: [options] source value 1.5 is obsolete and will be removed in a future release
warning: [options] target value 1.5 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
external/guava/guava/src/com/google/common/base/Splitter.java:375: error: method spliterator in interface Iterable<T> cannot be applied to given types;
return spliterator(sequence);
^
required: no arguments
found: CharSequence
reason: actual and formal argument lists differ in length
where T is a type-variable:
T extends Object declared in interface Iterable
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
4 warnings
make: *** [/home/misc/dev/replicant-4.2/out/host/common/obj/JAVA_LIBRARIES/guavalib_intermediates/javalib.jar] Error 41
I've found some links to that topic:
- https://groups.google.com/forum/#!topic/j2objc-discuss/OndhvPHZsWU
- https://groups.google.com/forum/#!topic/android-building/BFr5bmQzhHw
but they don't provide any solution.
After searching through this:- CM 10.1: https://github.com/CyanogenMod/android_external_guava/commits/cm-10.1
- AOSP: https://android.googlesource.com/platform/external/guava
I fear, there could be waiting more work, (e. g. merging an updated guava version). Then I don't know if it's worth the trouble.
So for now, I switched back to Oracle Java 1.7.0 update 80 and everything compiles great (with some insignificant warnings).
But if there would be an easy way to compile with a newer Java version, I would be really glad to get any hint to do so.
Files