Bug 842610 - libreoffice - compile with -target 1.5 or greater
Summary: libreoffice - compile with -target 1.5 or greater
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: libreoffice
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Caolan McNamara
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 842394
TreeView+ depends on / blocked
 
Reported: 2012-07-24 09:25 UTC by Mikolaj Izdebski
Modified: 2012-07-25 06:53 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-07-24 14:19:41 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mikolaj Izdebski 2012-07-24 09:25:40 UTC
Package libreoffice appears to be using Java generics,
but generates class files in format older than 49.0,
which corresponds to J2SE 5.0, in which generics were introduced.

Please update this package to generate classes in format 49.0 or
above. This corresponds to -target 1.5 option of javac (or ecj).

For more information, see bug #842394

Comment 1 Stephan Bergmann 2012-07-24 14:19:41 UTC
As per the jsr14-rawhide-2012-07-23.gz linked from <https://bugzilla.redhat.com/show_bug.cgi?id=842394#c0>, within libreoffice-* packages, there are class files with versions < 49.0 only in jars that are not intended to compile against (/usr/lib64/libreoffice/share/extensions/writer2latex.oxt/writer2latex-filter.jar, /usr/lib64/libreoffice/share/extensions/writer2xhtml.oxt/writer2xhtml-filter.jar, and /usr/lib64/libreoffice/program/classes/saxon9.jar).  Furthermore, upstream <http://cgit.freedesktop.org/libreoffice/core/commit/?id=26643fb59e0005f0bc83708b785d20d62d8e7411> "codemaker: write version 49 (1.5) class files," included in LibreOffice 3.6.0, already fixed this issue for LibreOffice jars that are intended to compile against (to address the same OpenJDK 7 issue discussed in bug 842394).

Comment 2 David Tardon 2012-07-25 04:40:17 UTC
(In reply to comment #1)
> (/usr/lib64/libreoffice/share/extensions/writer2latex.oxt/writer2latex-
> filter.jar,
> /usr/lib64/libreoffice/share/extensions/writer2xhtml.oxt/writer2xhtml-filter.
> jar

These are not even part of libreoffice: they belong to writer2latex extension that is maintained separately (and not by the libreoffice team).

Comment 3 Mikolaj Izdebski 2012-07-25 04:56:41 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > (/usr/lib64/libreoffice/share/extensions/writer2latex.oxt/writer2latex-
> > filter.jar,
> > /usr/lib64/libreoffice/share/extensions/writer2xhtml.oxt/writer2xhtml-filter.
> > jar
> 
> These are not even part of libreoffice: they belong to writer2latex
> extension that is maintained separately (and not by the libreoffice team).

writer2latex jars are fine. The suspicious jar file was
/usr/lib64/libreoffice/program/classes/saxon9.jar,
which belongs to libreoffice-core-1:3.6.0.2-1.fc18.x86_64,
which was built from libreoffice-3.6.0.2-1.fc18.src.rpm.
All classes in this jar have version 48.0.

Comment 4 Stephan Bergmann 2012-07-25 06:53:31 UTC
(In reply to comment #3)
> writer2latex jars are fine. The suspicious jar file was
> /usr/lib64/libreoffice/program/classes/saxon9.jar,
> which belongs to libreoffice-core-1:3.6.0.2-1.fc18.x86_64,
> which was built from libreoffice-3.6.0.2-1.fc18.src.rpm.
> All classes in this jar have version 48.0.

But that saxon9.jar is safe too.  (It is an external jar that is bundled with LibreOffice, likely because a system-wide one, if any, does not meet certain requirements---this is an exception to the rule that has most likely been discussed elsewhere already.  It is not beeing built during the LibreOffice build.)  It is only included in LibreOffice so that other parts of LibreOffice can access its services indirectly via javax.xml.transform.TransformerFactory.  The only place where LibreOffice code actually uses any saxon9.jar code during compilation is a use of net.sf.saxon.FeatureKeys.ALLOW_EXTERNAL_FUNCTIONS in filter/source/xsltfilter/com/sun/star/comp/xsltfilter/XSLTransformer.java, which should be safe (as further evidenced by the fact that LibreOffice does build fine with OpenJDK 7 already, see comment 1).


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