Bug 1857966

Summary: javamail fails to build with java-11-openjdk
Product: [Fedora] Fedora Reporter: jiri vanek <jvanek>
Component: javamailAssignee: Stuart D Gathman <stuart>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: decathorpe, java-maint-sig, java-sig-commits, jkang, jvanek, mefoster, mizdebsk, sgehwolf, stuart
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-22 13:37:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1825969    

Description jiri vanek 2020-07-16 19:27:00 UTC
javamail fails to build with java-11-openjdk as sytem JDK. See https://fedoraproject.org/wiki/Changes/Java11 .
See especially part about known failures: https://fedoraproject.org/wiki/Changes/Java11#common_issues_packagers_can_face_and_gathered_solutions

For the build logs, see: https://koji.fedoraproject.org/koji/taskinfo?taskID=47152758
We run the rebuild longer then 10days ago. Log may be gone. Also your package may be passing in regular rawhide.
To reproduce, simply: fedpkg clone javamail; cd javamail;  fedpkg build --target f33-java11; #The target is crucial.

We run two reruns your package failed both.

Surprisingly, your package is passing in our initial copr - https://copr.fedorainfracloud.org/coprs/jvanek/java11/package/javamail
That usually mean that it is jdk11 independent error, or platform (non-intel) specific failure.  Good luck.
              

We had tried 650 packages, and 500 had passed, so the java-11-openjdk will be system JDK in f33, and you should fix your package if you want to keep it alive. Usually the fix is simple, and best is to update the package to latest upstream version.
There will be usual mass rebuild once f33 branches. You may got another FTBFS bug.
Let us know here if you have any questions, here in bug, or at java-devel.org .

We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side if needed.

Comment 1 jiri vanek 2020-07-17 03:49:20 UTC
highlight: This was rebuild in sidetag f33-java11. Thus --target is really necessary to reproduce failure.
please note: This side tag, f33-java11, will be merged to main f33 buildroot in aprox 14 days.

Comment 2 Jie Kang 2020-07-21 16:54:51 UTC
Changes to a dependency were made to fix this build failure:

https://src.fedoraproject.org/rpms/apache-commons-compress/c/19527f1155934f27376bf503c44bb3e71190cfbb?branch=master


When I try to reproduce/test I see:

$ fedpkg build --target f33-java11
Could not execute build: Package javamail-1.5.2-13.fc33 has already been built
Note: You can skip this check with --skip-nvr-check. See help for more info.


Should I add --skip-nvr-check? Is that safe?

Comment 3 Stuart D Gathman 2020-07-22 01:03:21 UTC
mock now uses java11 to build javamail, and it succeeds (with some warnings about implementing deprecated APIs).

Comment 4 Severin Gehwolf 2020-07-22 06:59:00 UTC
(In reply to Jie Kang from comment #2)
> When I try to reproduce/test I see:
> 
> $ fedpkg build --target f33-java11
> Could not execute build: Package javamail-1.5.2-13.fc33 has already been
> built
> Note: You can skip this check with --skip-nvr-check. See help for more info.
> 
> 
> Should I add --skip-nvr-check? Is that safe?

No. A single build can only exist once. The release would have to be bumped. Note that mbooth built it in f33 here:
https://koji.fedoraproject.org/koji/buildinfo?buildID=1540254

Mind you, its hard-coding to use java-1.8.0-openjdk for building. See below.


If you want to reproduce the failure you'd likely need to revert this:
https://src.fedoraproject.org/rpms/javamail/c/63f97136fecf964e791a9ad65604e28899b29526?branch=master

and rebuild with --scratch (and possibly --srpm). Note: The --target f33-java11 is no longer needed as the f33-java11 builds got merged into f33.

Comment 5 Severin Gehwolf 2020-07-22 07:00:35 UTC
(In reply to Stuart D Gathman from comment #3)
> mock now uses java11 to build javamail, and it succeeds (with some warnings
> about implementing deprecated APIs).

Are you sure it's using JDK 11 to build? https://src.fedoraproject.org/rpms/javamail/c/63f97136fecf964e791a9ad65604e28899b29526?branch=master and https://koji.fedoraproject.org/koji/buildinfo?buildID=1540254 suggests it's building with java-1.8.0-openjdk (hard coded). The logs indicate both JDKs are installed. JDK 8 is being selected as build JDK.

Comment 6 Severin Gehwolf 2020-07-22 13:37:11 UTC
Scratch build for latest master works:
https://koji.fedoraproject.org/koji/taskinfo?taskID=47614124

As expected it's using JDK 8 to build:

+ export JAVA_HOME=/usr/lib/jvm/java-1.8.0
+ JAVA_HOME=/usr/lib/jvm/java-1.8.0
+ /usr/bin/python3 /usr/share/java-utils/mvn_build.py --xmvn-javadoc -- -Dmaven.test.failure.ignore=true

Getting in to build without hard-coding is another matter. Closing this bug, though.