Bug 1472834 - log4j cannot be built by jdk8
log4j cannot be built by jdk8
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: log4j (Show other bugs)
Unspecified Unspecified
unspecified Severity low
: rc
: ---
Assigned To: Java maintainers
BaseOS QE - Apps
Depends On:
  Show dependency treegraph
Reported: 2017-07-19 09:39 EDT by Lukas Zachar
Modified: 2018-07-01 18:35 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Lukas Zachar 2017-07-19 09:39:45 EDT
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):

How reproducible:

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] /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 10:02:06 EDT
You can pass --disable-doclint to javadoc to workaround this.
Comment 3 Mikolaj Izdebski 2017-07-19 10:06:25 EDT
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 10:34:57 EDT
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 10:38:32 EDT
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 10:42:27 EDT
Yes. that is right thing to do. Still the packages should be kept building by jdk7. Lukas, how did this happen?
Comment 7 Lukas Zachar 2017-07-21 03:26:03 EDT
During our rebuild test on rhel-7.
"yum-builddep log4j.spec" installs java-1.8.0-openjdk-devel in dependency chain.

Note You need to log in before you can comment on or make changes to this bug.