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
Updated by Denis 'GNUtoo' Carikli almost 9 years ago
- Category changed from 51 to Build system
Updated by Denis 'GNUtoo' Carikli almost 9 years ago
- Device Not device specific added
Updated by Wolfgang Wiedmeyer over 7 years ago
- Device added
- Device deleted (
Not device specific)
It's very likely too much work to patch Replicant 4.2 to make it work with Java 1.8. However, the current development version Replicant 6.0 builds fine with Java 1.8, at least on Debian Stretch.
Updated by Ryan roller over 7 years ago
The wiki page for javac has additional info
Updated by Kurtis Hanna about 5 years ago
- Status changed from New to Closed
- Resolution set to wontfix
This issue has been closed because Replicant 4.2 is no longer supported or maintained.