Bug 1857991 - jericho-html fails to build with java-11-openjdk
Summary: jericho-html fails to build with java-11-openjdk
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: jericho-html
Version: rawhide
Hardware: All
OS: All
unspecified
high
Target Milestone: ---
Assignee: Terje Røsten
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: Java11
TreeView+ depends on / blocked
 
Reported: 2020-07-16 20:03 UTC by jiri vanek
Modified: 2020-07-19 07:22 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-19 07:22:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description jiri vanek 2020-07-16 20:03:55 UTC
jericho-html 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=47154707
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 jericho-html; cd jericho-html;  fedpkg build --target f33-java11; #The target is crucial.

We run two reruns your package failed both.


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:52:59 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 Terje Røsten 2020-07-17 18:05:51 UTC
From logs:

 native2ascii: command not found

where is that command located in JDK 11 stack?

Comment 3 Severin Gehwolf 2020-07-17 18:31:08 UTC
(In reply to Terje Røsten from comment #2)
> From logs:
> 
>  native2ascii: command not found
> 
> where is that command located in JDK 11 stack?

It's been removed in JDK 9. See:
https://bugs.openjdk.java.net/browse/JDK-8074431

Comment 4 Severin Gehwolf 2020-07-17 18:48:40 UTC
From the logs I see it's doing some conversion:

+ for s in src/java/net/htmlparser/jericho/{Renderer,StreamEncodingDetector}.java
+ native2ascii -encoding UTF8 src/java/net/htmlparser/jericho/Renderer.java src/java/net/htmlparser/jericho/Renderer.java

Are you sure this is needed? If it's needed try to use iconv instead, perhaps?

Comment 5 Severin Gehwolf 2020-07-17 18:59:44 UTC
Something like this should do the trick, perhaps?


diff --git a/jericho-html.spec b/jericho-html.spec
index 3d1c265..d5d378d 100644
--- a/jericho-html.spec
+++ b/jericho-html.spec
@@ -37,7 +37,8 @@ find \( -name '*.java' -o -name '*.bat' -o -name '*.txt' -o -name '*.jsp' -o -na
 
 # fix non ASCII chars
 for s in src/java/net/htmlparser/jericho/{Renderer,StreamEncodingDetector}.java ; do
-    native2ascii -encoding UTF8 ${s} ${s}
+    iconv -f WINDOWS-1252 -t UTF-8 ${s} > ${s}.new
+    mv ${s}.new ${s}
 done
 
 %build
@@ -51,7 +52,7 @@ export CLASSPATH=$(build-classpath slf4j/api commons-logging log4j)
 %javadoc -encoding UTF-8 -classpath classes:$CLASSPATH -quiet -Xdoclint:none \
     -windowtitle "Jericho HTML Parser %version" -use -d docs/javadoc \
     -subpackages net.htmlparser.jericho -exclude net.htmlparser.jericho.nodoc \
-    -noqualifier net.htmlparser.jericho -group "Core Package" \
+    -noqualifier net.htmlparser.jericho -sourcepath src/java -group "Core Package" \
     src/java/net/htmlparser/jericho/*.java \
     src/java/net/htmlparser/jericho/nodoc/*.java


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