Java-build on TW fails suddenly: [javac] error: Source option 1.5 is no longer supported. Use 1.6 or later.

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Java-build on TW fails suddenly: [javac] error: Source option 1.5 is no longer supported. Use 1.6 or later.

Axel Braun-2
Hi,

maybe we have a Java-Expert around that can support: projectlibre [1] suddenly fails to build on TW, with the error message:

[   31s]
[   31s] init:
[   31s]     [mkdir] Created dir: /home/abuild/rpmbuild/BUILD/projectlibre-1.7.0/openproj_contrib/build
[   31s]     [mkdir] Created dir: /home/abuild/rpmbuild/BUILD/projectlibre-1.7.0/openproj_contrib/tmp
[   31s]
[   31s] build:
[   31s]     [javac] /home/abuild/rpmbuild/BUILD/projectlibre-1.7.0/openproj_contrib/build.xml:30: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[   31s]     [javac] Compiling 10 source files to /home/abuild/rpmbuild/BUILD/projectlibre-1.7.0/openproj_contrib/build
[   31s]     [javac] error: Source option 1.5 is no longer supported. Use 1.6 or later.
[   31s]     [javac] error: Target option 1.5 is no longer supported. Use 1.6 or later.
[   31s]
[   31s] BUILD FAILED

As the version setting is not explicit mentioned in the spec file I guess it is some implicit definition.
Anyone an idea where to look forß

Thanks
Axel

[1] https://build.opensuse.org/package/show/Office/projectlibre
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Java-build on TW fails suddenly: [javac] error: Source option 1.5 is no longer supported. Use 1.6 or later.

Robert Munteanu
Hi,


On Fri, Sep 22, 2017 at 12:08 PM, Axel Braun <[hidden email]> wrote:

> Hi,
>
> maybe we have a Java-Expert around that can support: projectlibre [1] suddenly fails to build on TW, with the error message:
>
> [   31s]
> [   31s] init:
> [   31s]     [mkdir] Created dir: /home/abuild/rpmbuild/BUILD/projectlibre-1.7.0/openproj_contrib/build
> [   31s]     [mkdir] Created dir: /home/abuild/rpmbuild/BUILD/projectlibre-1.7.0/openproj_contrib/tmp
> [   31s]
> [   31s] build:
> [   31s]     [javac] /home/abuild/rpmbuild/BUILD/projectlibre-1.7.0/openproj_contrib/build.xml:30: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
> [   31s]     [javac] Compiling 10 source files to /home/abuild/rpmbuild/BUILD/projectlibre-1.7.0/openproj_contrib/build
> [   31s]     [javac] error: Source option 1.5 is no longer supported. Use 1.6 or later.
> [   31s]     [javac] error: Target option 1.5 is no longer supported. Use 1.6 or later.
> [   31s]
> [   31s] BUILD FAILED
>
> As the version setting is not explicit mentioned in the spec file I guess it is some implicit definition.
> Anyone an idea where to look forß

Sounds like a newer version of Java is being used for compilation.

As for source/target, for ant those should be set in the build.xml
file. Look for something like <javac source="..." target="..."> .

(Approximately, haven't touched ant builds in years)

Thanks,

Robert
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Java-build on TW fails suddenly: [javac] error: Source option 1.5 is no longer supported. Use 1.6 or later.

Dominique Leuenberger / DimStar
In reply to this post by Axel Braun-2
On Fri, 2017-09-22 at 11:08 +0200, Axel Braun wrote:

> Hi,
>
> maybe we have a Java-Expert around that can support: projectlibre [1]
> suddenly fails to build on TW, with the error message:
>
> [   31s]
> [   31s] init:
> [   31s]     [mkdir] Created dir:
> /home/abuild/rpmbuild/BUILD/projectlibre-1.7.0/openproj_contrib/build
> [   31s]     [mkdir] Created dir:
> /home/abuild/rpmbuild/BUILD/projectlibre-1.7.0/openproj_contrib/tmp
> [   31s]
> [   31s] build:
> [   31s]     [javac] /home/abuild/rpmbuild/BUILD/projectlibre-
> 1.7.0/openproj_contrib/build.xml:30: warning: 'includeantruntime' was
> not set, defaulting to build.sysclasspath=last; set to false for
> repeatable builds
> [   31s]     [javac] Compiling 10 source files to
> /home/abuild/rpmbuild/BUILD/projectlibre-1.7.0/openproj_contrib/build
> [   31s]     [javac] error: Source option 1.5 is no longer supported.
> Use 1.6 or later.
> [   31s]     [javac] error: Target option 1.5 is no longer supported.
> Use 1.6 or later.
> [   31s]
> [   31s] BUILD FAILED
>
> As the version setting is not explicit mentioned in the spec file I
> guess it is some implicit definition.
> Anyone an idea where to look forß
For Tumbleweed, the default java compiler was switched to version 9, as
pre-announced at http://dominique.leuenberger.net/blog/2017/09/review-o
f-the-week-201736/ (the same always goes to the factory mailing lists
for people not following the blog)

Fridrich Strba was busy fixing all the errors he had seen (mostly what
was in Java:Packaging), but there might be things left of course.

As Robert already mentioned, in most cases switching the source and
target version to 1.6 is sufficient; in some cases, the code needs
patching if it actually violates Java 6 conventions.

Should you need help, then I'm sure Fridrich will be lending you a hand
here.

Cheers,
Dominique

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Java-build on TW fails suddenly: [javac] error: Source option 1.5 is no longer supported. Use 1.6 or later.

Axel Braun-2


Am 22. September 2017 12:42:14 OESZ schrieb Dominique Leuenberger / DimStar <[hidden email]>:

>On Fri, 2017-09-22 at 11:08 +0200, Axel Braun wrote:
>> Hi,
>>
>> maybe we have a Java-Expert around that can support: projectlibre [1]
>> suddenly fails to build on TW, with the error message:
>>
>> [   31s]
>> [   31s] init:
>> [   31s]     [mkdir] Created dir:
>> /home/abuild/rpmbuild/BUILD/projectlibre-1.7.0/openproj_contrib/build
>> [   31s]     [mkdir] Created dir:
>> /home/abuild/rpmbuild/BUILD/projectlibre-1.7.0/openproj_contrib/tmp
>> [   31s]
>> [   31s] build:
>> [   31s]     [javac] /home/abuild/rpmbuild/BUILD/projectlibre-
>> 1.7.0/openproj_contrib/build.xml:30: warning: 'includeantruntime' was
>> not set, defaulting to build.sysclasspath=last; set to false for
>> repeatable builds
>> [   31s]     [javac] Compiling 10 source files to
>> /home/abuild/rpmbuild/BUILD/projectlibre-1.7.0/openproj_contrib/build
>> [   31s]     [javac] error: Source option 1.5 is no longer supported.
>> Use 1.6 or later.
>> [   31s]     [javac] error: Target option 1.5 is no longer supported.
>> Use 1.6 or later.
>> [   31s]
>> [   31s] BUILD FAILED
>>
>> As the version setting is not explicit mentioned in the spec file I
>> guess it is some implicit definition.
>> Anyone an idea where to look forß
>
>For Tumbleweed, the default java compiler was switched to version 9, as
>pre-announced at http://dominique.leuenberger.net/blog/2017/09/review-o
>f-the-week-201736/ (the same always goes to the factory mailing lists
>for people not following the blog)
>
>Fridrich Strba was busy fixing all the errors he had seen (mostly what
>was in Java:Packaging), but there might be things left of course.
>
>As Robert already mentioned, in most cases switching the source and
>target version to 1.6 is sufficient; in some cases, the code needs
>patching if it actually violates Java 6 conventions.

The current build already requires java6 or higher, that's the funny thing...

>Should you need help, then I'm sure Fridrich will be lending you a hand
>here.

I will look into this once back from vacation, just in case, plus send his mail address as PM

Thanks
Axel
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Java-build on TW fails suddenly: [javac] error: Source option 1.5 is no longer supported. Use 1.6 or later.

Dominique Leuenberger / DimStar
On Fri, 2017-09-22 at 16:25 +0300, Axel Braun wrote:
>
> > As Robert already mentioned, in most cases switching the source and
> > target version to 1.6 is sufficient; in some cases, the code needs
> > patching if it actually violates Java 6 conventions.
>
> The current build already requires java6 or higher, that's the funny
> thing...

Maybe - but the source claims to be a java 1.5 source (or at least in
parts); up to java 8 (1.8, 1.5 sources were still interpreted; but it's
the time when Java wants to start cleaning up;

> > Should you need help, then I'm sure Fridrich will be lending you a
> > hand
> > here.
>
> I will look into this once back from vacation, just in case, plus
> send his mail address as PM

Sure - Maybe you're even lucky and one of us got around to your package
by the time you return from vacation :)

Cheers
Dominique

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Aw: Re: [opensuse-packaging] Java-build on TW fails suddenly: [javac] error: Source option 1.5 is no longer supported. Use 1.6 or later.

Axel Braun-2


> Gesendet: Freitag, 22. September 2017 um 16:06 Uhr
> Von: "Dominique Leuenberger / DimStar" <[hidden email]>
> An: [hidden email]
> Betreff: Re: [opensuse-packaging] Java-build on TW fails suddenly: [javac] error: Source option 1.5 is no longer supported. Use 1.6 or later.
>
> On Fri, 2017-09-22 at 16:25 +0300, Axel Braun wrote:
> >
> > > As Robert already mentioned, in most cases switching the source and
> > > target version to 1.6 is sufficient; in some cases, the code needs
> > > patching if it actually violates Java 6 conventions.
> >
> > The current build already requires java6 or higher, that's the funny
> > thing...
>
> Maybe - but the source claims to be a java 1.5 source (or at least in
> parts); up to java 8 (1.8, 1.5 sources were still interpreted; but it's
> the time when Java wants to start cleaning up;


Yes , the source claimed it it 1.5. I shifted this to 1.6, and immediately get a different error (rest of the source unchanged):

[   42s]     [javac] /home/abuild/rpmbuild/BUILD/projectlibre-1.7.0/openproj_contrib/src/com/projity/contrib/util/LogFactory.java:33: error: unmappable character for encoding ASCII
[   42s]     [javac] Attribution Information: Attribution Copyright Notice: Copyright ? 2006, 2007
[   42s]     [javac]                                                                  ^

where is encoding US-ASCII suddenly coming from?

Thanks
Axel
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Aw: Re: [opensuse-packaging] Java-build on TW fails suddenly: [javac] error: Source option 1.5 is no longer supported. Use 1.6 or later.

Brüns, Stefan
On Samstag, 30. September 2017 16:59:48 CEST Axel Braun wrote:

> > Gesendet: Freitag, 22. September 2017 um 16:06 Uhr
> > Von: "Dominique Leuenberger / DimStar" <[hidden email]>
> > An: [hidden email]
> > Betreff: Re: [opensuse-packaging] Java-build on TW fails suddenly: [javac]
> > error: Source option 1.5 is no longer supported. Use 1.6 or later.>
> > On Fri, 2017-09-22 at 16:25 +0300, Axel Braun wrote:
> > > > As Robert already mentioned, in most cases switching the source and
> > > > target version to 1.6 is sufficient; in some cases, the code needs
> > > > patching if it actually violates Java 6 conventions.
> > >
> > > The current build already requires java6 or higher, that's the funny
> > > thing...
> >
> > Maybe - but the source claims to be a java 1.5 source (or at least in
> > parts); up to java 8 (1.8, 1.5 sources were still interpreted; but it's
> > the time when Java wants to start cleaning up;
>
> Yes , the source claimed it it 1.5. I shifted this to 1.6, and immediately
> get a different error (rest of the source unchanged):
>
> [   42s]     [javac]
> /home/abuild/rpmbuild/BUILD/projectlibre-1.7.0/openproj_contrib/src/com/pro
> jity/contrib/util/LogFactory.java:33: error: unmappable character for
> encoding ASCII [   42s]     [javac] Attribution Information: Attribution
> Copyright Notice: Copyright ? 2006, 2007 [   42s]     [javac]              
>                                                    ^
>
> where is encoding US-ASCII suddenly coming from?

Apparently the file has a non-ASCII © character in it. ASCII is a subset of  
UTF-8, CP1252, ISO8859-15, so most characters are fine, independent of the
source encoding and the expected encoding.

Either older versions just ignored badly encoded characters or the default
encoding has changed.

Kind regards,

Stefan
--
Stefan Brüns  /  Bergstraße 21  /  52062 Aachen
home: +49 241 53809034     mobile: +49 151 50412019
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Aw: Re: [opensuse-packaging] Java-build on TW fails suddenly: [javac] error: Source option 1.5 is no longer supported. Use 1.6 or later.

Axel Braun-2
Am Samstag, 30. September 2017, 17:13:20 CEST schrieb Stefan Bruens:

> On Samstag, 30. September 2017 16:59:48 CEST Axel Braun wrote:
> > > Gesendet: Freitag, 22. September 2017 um 16:06 Uhr
> > > Von: "Dominique Leuenberger / DimStar" <[hidden email]>
> > > An: [hidden email]
> > > Betreff: Re: [opensuse-packaging] Java-build on TW fails suddenly:
> > > [javac]
> > > error: Source option 1.5 is no longer supported. Use 1.6 or later.>
> > >
> > > On Fri, 2017-09-22 at 16:25 +0300, Axel Braun wrote:
> > > > > As Robert already mentioned, in most cases switching the source and
> > > > > target version to 1.6 is sufficient; in some cases, the code needs
> > > > > patching if it actually violates Java 6 conventions.
> > > >
> > > > The current build already requires java6 or higher, that's the funny
> > > > thing...
> > >
> > > Maybe - but the source claims to be a java 1.5 source (or at least in
> > > parts); up to java 8 (1.8, 1.5 sources were still interpreted; but it's
> > > the time when Java wants to start cleaning up;
> >
> > Yes , the source claimed it it 1.5. I shifted this to 1.6, and immediately
> > get a different error (rest of the source unchanged):
> >
> > [   42s]     [javac]
> > /home/abuild/rpmbuild/BUILD/projectlibre-1.7.0/openproj_contrib/src/com/pr
> > o
> > jity/contrib/util/LogFactory.java:33: error: unmappable character for
> > encoding ASCII [   42s]     [javac] Attribution Information: Attribution
> > Copyright Notice: Copyright ? 2006, 2007 [   42s]     [javac]
> >
> >                                                    ^
> >
> > where is encoding US-ASCII suddenly coming from?
>
> Apparently the file has a non-ASCII © character in it. ASCII is a subset of
> UTF-8, CP1252, ISO8859-15, so most characters are fine, independent of the
> source encoding and the expected encoding.

I checked the source, nearly every file has the Trademark sign in.

> Either older versions just ignored badly encoded characters or the default
> encoding has changed.

Yes, thats what I'm trying to find out. Potentially there is some magic setting
in the build file to be set - but I dont know enough about Java programming for
this.

Best,
Axel
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Aw: Re: [opensuse-packaging] Java-build on TW fails suddenly: [javac] error: Source option 1.5 is no longer supported. Use 1.6 or later.

Axel Braun-2
In reply to this post by Brüns, Stefan
Hi,

.....

> > [   42s]     [javac]
> > /home/abuild/rpmbuild/BUILD/projectlibre-1.7.0/openproj_contrib/src/com/pr
> > o
> > jity/contrib/util/LogFactory.java:33: error: unmappable character for
> > encoding ASCII [   42s]     [javac] Attribution Information: Attribution
> > Copyright Notice: Copyright ? 2006, 2007 [   42s]     [javac]
> >
> >                                                    ^
> >
> > where is encoding US-ASCII suddenly coming from?
>
> Apparently the file has a non-ASCII © character in it. ASCII is a subset of
> UTF-8, CP1252, ISO8859-15, so most characters are fine, independent of the
> source encoding and the expected encoding.
>
> Either older versions just ignored badly encoded characters or the default
> encoding has changed.

Just for the records:
Next to the change in build version (1.5 -> 1.6) the issue could be solved by
manually setting the encoding of the files:

%build
export JAVA_TOOL_OPTIONS=-Dfile.encoding=cp1252

did the trick.

Best,
Axel
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]