mobile icon indicating copy to clipboard operation
mobile copied to clipboard

8255240: Mobile builds need to exclude some modules

Open johanvos opened this issue 3 years ago • 9 comments

exclude some modules that are not relevant on Mobile. Fix for JDK-8255240


Progress

  • [x] Change must not contain extraneous whitespace
  • [x] Commit message must refer to an issue
  • [ ] Change must be properly reviewed

Testing

Linux x32 Linux x64 Windows x64 macOS x64
Build ✔️ (1/1 passed) ✔️ (5/5 passed) ✔️ (2/2 passed) ✔️ (2/2 passed)
Test (tier1) ✔️ (9/9 passed) ❌ (1/9 failed) ✔️ (9/9 passed)

Failed test task

Issue

  • JDK-8255240: Mobile builds need to exclude some modules

Download

$ git fetch https://git.openjdk.java.net/mobile pull/10/head:pull/10 $ git checkout pull/10

johanvos avatar Oct 22 '20 12:10 johanvos

:wave: Welcome back jvos! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

bridgekeeper[bot] avatar Oct 22 '20 12:10 bridgekeeper[bot]

Webrevs

mlbridge[bot] avatar Oct 22 '20 13:10 mlbridge[bot]

Is this a temp fix? Excluding SA certainly makes sense but eliminating the entire desktop module will prohibit the use of local imaging and text APIs. Shouldn't you focus more on eliminating the native windowing toolkit?

bobvandette avatar Oct 22 '20 13:10 bobvandette

We (at Gluon) only use the static libraries from the mobile builds, not the modules/jars (they come from the upstream builds). Hence, the desktop module (which also contains the beans etc) is still used, but the binary (jmod) comes from upstream.

However, it would make sense to build the module here too, and only exclude the native part indeed.

johanvos avatar Oct 22 '20 13:10 johanvos

@bobvandette java.desktop is back in the list (at least the module will be build).

johanvos avatar Oct 23 '20 09:10 johanvos

@magicus Do you want to have a look at this PR too?

johanvos avatar Oct 24 '20 10:10 johanvos

Excuse me, but why don't you port jdk8 instead? Also, I succeed to port jdk8 to Android, but stuck at

/home/runner/work/android-openjdk-build-multiarch/android-openjdk-build-multiarch/openjdk/jdk/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.c: In function 'InitSimpleTypes.constprop':
/home/runner/work/android-openjdk-build-multiarch/android-openjdk-build-multiarch/openjdk/jdk/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.c:314:17: internal compiler error: in build2_stat, at tree.c:4159
 static jboolean InitSimpleTypes
                 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://source.android.com/source/report-bugs.html> for instructions.
make[2]: *** [/home/runner/work/android-openjdk-build-multiarch/android-openjdk-build-multiarch/openjdk/build/linux-aarch64-normal-server-release/jdk/objs/libawt/GraphicsPrimitiveMgr.o] Error 1
lib/Awt2dLibraries.gmk:468: recipe for target '/home/runner/work/android-openjdk-build-multiarch/android-openjdk-build-multiarch/openjdk/build/linux-aarch64-normal-server-release/jdk/objs/libawt/GraphicsPrimitiveMgr.o' failed
make[2]: *** Waiting for unfinished jobs....
BuildJdk.gmk:70: recipe for target 'libs-only' failed
make[1]: *** [libs-only] Error 2
make: *** [jdk-only] Error 2
/home/runner/work/android-openjdk-build-multiarch/android-openjdk-build-multiarch/openjdk//make/Main.gmk:116: recipe for target 'jdk-only' failed

At

for (pHdr = pStart; pHdr < pEnd; pHdr = PtrAddBytes(pHdr, size)) {

If I comment out the check pHdr < pEnd, then it built. But I want it to complete headless AWT to get Caciocavallo project working or wrap Graphics2D to Android Canvas.

khanhduytran0 avatar Nov 01 '20 00:11 khanhduytran0

Excuse me, but why don't you port jdk8 instead?

This repository is auto-synced from upstream openjdk/jdk which is 16-ea currently. I don't see a reason why we want Java 8 on Android/ios while we have 15 and beyond on desktop?

johanvos avatar Nov 02 '20 15:11 johanvos

Simple reason for porting Java 8 is LTS available, but Java 11 have LTS too.

khanhduytran0 avatar Nov 02 '20 22:11 khanhduytran0

@johanvos this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout 8255240-excludemodules
git fetch https://git.openjdk.org/mobile master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

openjdk[bot] avatar Feb 17 '23 18:02 openjdk[bot]

@johanvos This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Dec 05 '23 03:12 bridgekeeper[bot]

@johanvos This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open pull request command.

bridgekeeper[bot] avatar Jan 02 '24 03:01 bridgekeeper[bot]