Bug 1472834

Summary: log4j cannot be built by jdk8
Product: Red Hat Enterprise Linux 7 Reporter: Lukáš Zachar <lzachar>
Component: log4jAssignee: Java maintainers <java-maint>
Status: CLOSED NOTABUG QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: low Docs Contact:
Priority: unspecified    
Version: 7.5CC: jorton, jvanek, mizdebsk
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-17 15:53:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lukáš Zachar 2017-07-19 13:39:45 UTC
Description of problem:

BuildRequires does not specify exact java version. On typical RHEL 7 java-1.8.0-openjdk is used in the end, but build fails.
If java-1.7.0-openjdk is used, build succeeds


Version-Release number of selected component (if applicable):
log4j-1.2.17-15.el7

How reproducible:
always

Steps to Reproduce:
1. install log4j srpm
2. yum-builddep log4j.spec
3. rpmbuild -ba log4j.spec

Actual results:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.9:jar (default) on project log4j: MavenReportException: Error while creating archive:
[ERROR] Exit code: 1 - /root/rpmbuild/BUILD/apache-log4j-1.2.17/src/main/java/org/apache/log4j/helpers/AppenderAttachableImpl.java:58: warning: no @param for event
[ERROR] int appendLoopOnAppenders(LoggingEvent event) {
[ERROR] ^
[ERROR] /root/rpmbuild/BUILD/apache-log4j-1.2.17/src/main/java/org/apache/log4j/helpers/AppenderAttachableImpl.java:58: warning: no @return
....
error: Bad exit status from /var/tmp/rpm-tmp.PlXhQt (%build)


Expected results:
...
+ exit 0

Additional info:

Comment 2 jiri vanek 2017-07-19 14:02:06 UTC
You can pass --disable-doclint to javadoc to workaround this.

Comment 3 Mikolaj Izdebski 2017-07-19 14:06:25 UTC
Known issue. Exactly the same problem affects hundreds of other packages too. Theoretically this fixable, but would require a lot of work for little or no benefit.

Comment 4 jiri vanek 2017-07-19 14:34:57 UTC
I recall you had a hook in maven (ant?) which was disabling doclint by default, haven't you?

Comment 5 Mikolaj Izdebski 2017-07-19 14:38:32 UTC
In Fedora, not in RHEL.

Java packages in RHEL 7 were built with OpenJDK 7. Building them with any other JDK was not tested - some builds may fail for different reasons, some may succeed, but produce wrong results.

Comment 6 jiri vanek 2017-07-19 14:42:27 UTC
Yes. that is right thing to do. Still the packages should be kept building by jdk7. Lukas, how did this happen?

Comment 7 Lukáš Zachar 2017-07-21 07:26:03 UTC
During our rebuild test on rhel-7.
"yum-builddep log4j.spec" installs java-1.8.0-openjdk-devel in dependency chain.

Comment 12 Joe Orton 2020-01-17 15:53:15 UTC
Per previous comments, building with OpenJDK >7 is not supported nor do we plan to update the packages to support this.