Need to get help: Building Groovy 1.7.5 from source gives encoding error for ReadLineTest.groovy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Need to get help: Building Groovy 1.7.5 from source gives encoding error for ReadLineTest.groovy

Ken Lam
Dear all,

This is the first time for me to use a mailing list, so sorry for
sending my question to this address [hidden email] because I am
not sure how to ask question here (the FAQ doesn't mention whether
sending email to [hidden email] would have my question reached
to anybody)

Anyway, my question is about building Groovy 1.7.5 from source giving
encoding error for ReadLineTest.groovy, and it is documented in
Stackoverflow:
https://stackoverflow.com/questions/48641468/building-groovy-1-7-5-from-source-gives-encoding-error-for-readlinetest-groovy

Thanks

--
Ken Lam
System Analyst
Mobigator Technology Group
http://www.mobigator.com
T: +852.2524.9000, ext 114
F: +852.2524.9050

Reply | Threaded
Open this post in threaded view
|

Re: Need to get help: Building Groovy 1.7.5 from source gives encoding error for ReadLineTest.groovy

Jochen Theodorou


Am 06.02.2018 um 12:27 schrieb Ken Lam:
> Dear all,
>
> This is the first time for me to use a mailing list, so sorry for
> sending my question to this address [hidden email] because I am
> not sure how to ask question here (the FAQ doesn't mention whether
> sending email to [hidden email] would have my question reached
> to anybody)

It is the mailing for users of Groovy. I think you are perfectly right here.

> Anyway, my question is about building Groovy 1.7.5 from source giving
> encoding error for ReadLineTest.groovy, and it is documented in
> Stackoverflow:
> https://stackoverflow.com/questions/48641468/building-groovy-1-7-5-from-source-gives-encoding-error-for-readlinetest-groovy 

Maybe a stupid question, but how do you set the encoding for a text file
to UTF8 without using the BOM? Problem of text files is, that they do
not contain the encoding information. So if all files are expected to be
UTF8 and you are on a non-UTF8 system, then there might be problems.

The expected encoding is UTF8 in all cases.

bye Jochen
Reply | Threaded
Open this post in threaded view
|

Re: Need to get help: Building Groovy 1.7.5 from source gives encoding error for ReadLineTest.groovy

Ken Lam
Dear Jochen,

Then why do I have to set

encoding="utf-8"

in groovyc commands in the build.xml to force it to UTF-8,

while the official source distribution can omit this and the Groovy
developers can still compile the source of Groovy 1.7.5 correctly?


Which settings in the system am I missing?

Regards,

Ken Lam
System Analyst
Mobigator Technology Group
http://www.mobigator.com
T: +852.2524.9000, ext 114
F: +852.2524.9050

-------- Original Message --------
Subject: Re: Need to get help: Building Groovy 1.7.5 from source gives
encoding error for ReadLineTest.groovy
From: Jochen Theodorou <[hidden email]>
To: [hidden email]
Date: 6/2/2018 20:19

>
>
> Am 06.02.2018 um 12:27 schrieb Ken Lam:
>> Dear all,
>>
>> This is the first time for me to use a mailing list, so sorry for
>> sending my question to this address [hidden email] because I
>> am not sure how to ask question here (the FAQ doesn't mention whether
>> sending email to [hidden email] would have my question
>> reached to anybody)
>
> It is the mailing for users of Groovy. I think you are perfectly right
> here.
>
>> Anyway, my question is about building Groovy 1.7.5 from source giving
>> encoding error for ReadLineTest.groovy, and it is documented in
>> Stackoverflow:
>> https://stackoverflow.com/questions/48641468/building-groovy-1-7-5-from-source-gives-encoding-error-for-readlinetest-groovy 
>
>
> Maybe a stupid question, but how do you set the encoding for a text
> file to UTF8 without using the BOM? Problem of text files is, that
> they do not contain the encoding information. So if all files are
> expected to be UTF8 and you are on a non-UTF8 system, then there might
> be problems.
>
> The expected encoding is UTF8 in all cases.
>
> bye Jochen

Reply | Threaded
Open this post in threaded view
|

Re: Need to get help: Building Groovy 1.7.5 from source gives encoding error for ReadLineTest.groovy

Jochen Theodorou
On 07.02.2018 07:12, Ken Lam wrote:
> Dear Jochen,
>
> Then why do I have to set
>
> encoding="utf-8"
>
> in groovyc commands in the build.xml to force it to UTF-8,

If no encoding is set, the system encoding is used and that could be for
example GB2312 or Big5 or even only ASCII

> while the official source distribution can omit this and the Groovy
> developers can still compile the source of Groovy 1.7.5 correctly?

because we work on linux and mac systems. I am using UTF8 as system
default for over 10 years now.

> Which settings in the system am I missing?

On Windows? sorry, cannot help here really. Windows is not know to be
friendly to such changes at all.

bye Jochen
Reply | Threaded
Open this post in threaded view
|

Re: Need to get help: Building Groovy 1.7.5 from source gives encoding error for ReadLineTest.groovy

Ken Lam
Dear Jochen,

Also, after compiling the groovy-all-1.7.5.jar, I extracted the jar, and
extracted the official jar distributed in grails 1.3.5, and compare
between the two extracted folders.

Out of 3371 files, 256 files (254 binary files + 2 text files) are
different, and the rest are identical.

For the 2 different text files, I have checked and they should be ok.

For the 254 binary files, however, I am not sure whether this is normal.

Of course, I haven't modified any source codes at all. At least not yet.


My question is:

Is it expected or required, to have exact binary .class files compiled
when we try to rebuild groovy? My compiled jar does have nearly 3000
binary class files being identical to the those in the official jar,
only 254 binary files are different.

Regards,

Ken Lam
System Analyst
Mobigator Technology Group
http://www.mobigator.com
T: +852.2524.9000, ext 114
F: +852.2524.9050

-------- Original Message --------
Subject: Re: Need to get help: Building Groovy 1.7.5 from source gives
encoding error for ReadLineTest.groovy
From: Jochen Theodorou <[hidden email]>
To: [hidden email]
Date: 8/2/2018 4:11

> On 07.02.2018 07:12, Ken Lam wrote:
>> Dear Jochen,
>>
>> Then why do I have to set
>>
>> encoding="utf-8"
>>
>> in groovyc commands in the build.xml to force it to UTF-8,
>
> If no encoding is set, the system encoding is used and that could be
> for example GB2312 or Big5 or even only ASCII
>
>> while the official source distribution can omit this and the Groovy
>> developers can still compile the source of Groovy 1.7.5 correctly?
>
> because we work on linux and mac systems. I am using UTF8 as system
> default for over 10 years now.
>
>> Which settings in the system am I missing?
>
> On Windows? sorry, cannot help here really. Windows is not know to be
> friendly to such changes at all.
>
> bye Jochen

Reply | Threaded
Open this post in threaded view
|

Re: Need to get help: Building Groovy 1.7.5 from source gives encoding error for ReadLineTest.groovy

Ken Lam
Dear Jochen,

More info I found from MANIFEST.MF:

I found that the official groovy-all-1.7.5.jar distributed in grails
1.3.5 was built with JDK 1.7.0-ea (Sun Microsystems Inc.). I guess the
"ea" means early access version. So I don't believe I could ever use the
exactly same JDK to compile the groovy source. How am I supposed to find
an early access version?

Anyway, this is a less important question. As mentioned in previous
email, I mainly want to know whether it's expected or required, to
compile binary .class files which are identical to the officially
distributed ones, when we try to rebuild groovy on our own.

Regards,

Ken Lam
System Analyst
Mobigator Technology Group
http://www.mobigator.com
T: +852.2524.9000, ext 114
F: +852.2524.9050

-------- Original Message --------
Subject: Re: Need to get help: Building Groovy 1.7.5 from source gives
encoding error for ReadLineTest.groovy
From: Ken Lam <[hidden email]>
To: [hidden email], Jochen Theodorou <[hidden email]>
Date: 8/2/2018 11:12

> Dear Jochen,
>
> Also, after compiling the groovy-all-1.7.5.jar, I extracted the jar,
> and extracted the official jar distributed in grails 1.3.5, and
> compare between the two extracted folders.
>
> Out of 3371 files, 256 files (254 binary files + 2 text files) are
> different, and the rest are identical.
>
> For the 2 different text files, I have checked and they should be ok.
>
> For the 254 binary files, however, I am not sure whether this is normal.
>
> Of course, I haven't modified any source codes at all. At least not yet.
>
>
> My question is:
>
> Is it expected or required, to have exact binary .class files compiled
> when we try to rebuild groovy? My compiled jar does have nearly 3000
> binary class files being identical to the those in the official jar,
> only 254 binary files are different.
>
> Regards,
>
> Ken Lam
> System Analyst
> Mobigator Technology Group
> http://www.mobigator.com
> T: +852.2524.9000, ext 114
> F: +852.2524.9050
>
> -------- Original Message --------
> Subject: Re: Need to get help: Building Groovy 1.7.5 from source gives
> encoding error for ReadLineTest.groovy
> From: Jochen Theodorou <[hidden email]>
> To: [hidden email]
> Date: 8/2/2018 4:11
>> On 07.02.2018 07:12, Ken Lam wrote:
>>> Dear Jochen,
>>>
>>> Then why do I have to set
>>>
>>> encoding="utf-8"
>>>
>>> in groovyc commands in the build.xml to force it to UTF-8,
>>
>> If no encoding is set, the system encoding is used and that could be
>> for example GB2312 or Big5 or even only ASCII
>>
>>> while the official source distribution can omit this and the Groovy
>>> developers can still compile the source of Groovy 1.7.5 correctly?
>>
>> because we work on linux and mac systems. I am using UTF8 as system
>> default for over 10 years now.
>>
>>> Which settings in the system am I missing?
>>
>> On Windows? sorry, cannot help here really. Windows is not know to be
>> friendly to such changes at all.
>>
>> bye Jochen
>

Reply | Threaded
Open this post in threaded view
|

Re: Need to get help: Building Groovy 1.7.5 from source gives encoding error for ReadLineTest.groovy

Ken Lam
Dear Groovy developers,

After experimenting with many JDK versions, I found that JDK 6 Update 13
and 21 to be able to build the jar with the least difference from the
official groovy-all-1.7.5.jar distributed in grails 1.3.5.

But I still want to know whether the difference in the binary .class
files will have impact to my system.

Attached are the samples and summary of "how different" the jar built by
me is from the official groovy-all-1.7.5.jar

JDK 6 Update 13: 190 binary files different from official version

JDK 6 Update 21: 198 binary files different from official version


Apart from the "__timeStamp__239_neverHappen" timestamp in the .class
files, there are still some other differences, and I want to know why
they are here.

I understand this is a lot to ask, but I have no choice because I don't
know how to analyze the bytecode differences and their meanings. So I
have attached some samples and I hope if you can teach me some basic
knowledge and some references to look at, I will be able to handle it
myself in the future.

Regards,

Ken Lam
System Analyst
Mobigator Technology Group
http://www.mobigator.com
T: +852.2524.9000, ext 114
F: +852.2524.9050

-------- Original Message --------
Subject: Re: Need to get help: Building Groovy 1.7.5 from source gives
encoding error for ReadLineTest.groovy
From: Ken Lam <[hidden email]>
To: [hidden email], Jochen Theodorou <[hidden email]>
Date: 8/2/2018 11:18

> Dear Jochen,
>
> More info I found from MANIFEST.MF:
>
> I found that the official groovy-all-1.7.5.jar distributed in grails
> 1.3.5 was built with JDK 1.7.0-ea (Sun Microsystems Inc.). I guess the
> "ea" means early access version. So I don't believe I could ever use
> the exactly same JDK to compile the groovy source. How am I supposed
> to find an early access version?
>
> Anyway, this is a less important question. As mentioned in previous
> email, I mainly want to know whether it's expected or required, to
> compile binary .class files which are identical to the officially
> distributed ones, when we try to rebuild groovy on our own.
>
> Regards,
>
> Ken Lam
> System Analyst
> Mobigator Technology Group
> http://www.mobigator.com
> T: +852.2524.9000, ext 114
> F: +852.2524.9050
>
> -------- Original Message --------
> Subject: Re: Need to get help: Building Groovy 1.7.5 from source gives
> encoding error for ReadLineTest.groovy
> From: Ken Lam <[hidden email]>
> To: [hidden email], Jochen Theodorou <[hidden email]>
> Date: 8/2/2018 11:12
>> Dear Jochen,
>>
>> Also, after compiling the groovy-all-1.7.5.jar, I extracted the jar,
>> and extracted the official jar distributed in grails 1.3.5, and
>> compare between the two extracted folders.
>>
>> Out of 3371 files, 256 files (254 binary files + 2 text files) are
>> different, and the rest are identical.
>>
>> For the 2 different text files, I have checked and they should be ok.
>>
>> For the 254 binary files, however, I am not sure whether this is normal.
>>
>> Of course, I haven't modified any source codes at all. At least not yet.
>>
>>
>> My question is:
>>
>> Is it expected or required, to have exact binary .class files
>> compiled when we try to rebuild groovy? My compiled jar does have
>> nearly 3000 binary class files being identical to the those in the
>> official jar, only 254 binary files are different.
>>
>> Regards,
>>
>> Ken Lam
>> System Analyst
>> Mobigator Technology Group
>> http://www.mobigator.com
>> T: +852.2524.9000, ext 114
>> F: +852.2524.9050
>>
>> -------- Original Message --------
>> Subject: Re: Need to get help: Building Groovy 1.7.5 from source
>> gives encoding error for ReadLineTest.groovy
>> From: Jochen Theodorou <[hidden email]>
>> To: [hidden email]
>> Date: 8/2/2018 4:11
>>> On 07.02.2018 07:12, Ken Lam wrote:
>>>> Dear Jochen,
>>>>
>>>> Then why do I have to set
>>>>
>>>> encoding="utf-8"
>>>>
>>>> in groovyc commands in the build.xml to force it to UTF-8,
>>>
>>> If no encoding is set, the system encoding is used and that could be
>>> for example GB2312 or Big5 or even only ASCII
>>>
>>>> while the official source distribution can omit this and the Groovy
>>>> developers can still compile the source of Groovy 1.7.5 correctly?
>>>
>>> because we work on linux and mac systems. I am using UTF8 as system
>>> default for over 10 years now.
>>>
>>>> Which settings in the system am I missing?
>>>
>>> On Windows? sorry, cannot help here really. Windows is not know to
>>> be friendly to such changes at all.
>>>
>>> bye Jochen
>>
>


diff_summary_when_built_by_JDK6_U21.html (48K) Download Attachment
different_class_file_samples_when_built_by_JDK6_U13.zip (71K) Download Attachment
different_class_file_samples_when_built_by_JDK6_U21.zip (87K) Download Attachment
diff_summary_when_built_by_JDK6_U13.html (46K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Need to get help: Building Groovy 1.7.5 from source gives encoding error for ReadLineTest.groovy

Felix Dorner
Ken, maybe I missed something obvious and sound stupid now, but anyway so here it comes: If you want to have the same binaries as the official binaries, why don't you just use the official binaries?

On Thu, Feb 8, 2018 at 12:33 PM, Ken Lam <[hidden email]> wrote:
Dear Groovy developers,

After experimenting with many JDK versions, I found that JDK 6 Update 13 and 21 to be able to build the jar with the least difference from the official groovy-all-1.7.5.jar distributed in grails 1.3.5.

But I still want to know whether the difference in the binary .class files will have impact to my system.

Attached are the samples and summary of "how different" the jar built by me is from the official groovy-all-1.7.5.jar

JDK 6 Update 13: 190 binary files different from official version

JDK 6 Update 21: 198 binary files different from official version


Apart from the "__timeStamp__239_neverHappen" timestamp in the .class files, there are still some other differences, and I want to know why they are here.

I understand this is a lot to ask, but I have no choice because I don't know how to analyze the bytecode differences and their meanings. So I have attached some samples and I hope if you can teach me some basic knowledge and some references to look at, I will be able to handle it myself in the future.

Regards,

Ken Lam
System Analyst
Mobigator Technology Group
http://www.mobigator.com
T: <a href="tel:%2B852.2524.9000%2C%20ext%20114" value="+85225249000" target="_blank">+852.2524.9000, ext 114
F: <a href="tel:%2B852.2524.9050" value="+85225249050" target="_blank">+852.2524.9050

-------- Original Message --------
Subject: Re: Need to get help: Building Groovy 1.7.5 from source gives encoding error for ReadLineTest.groovy
From: Ken Lam <[hidden email]>
To: [hidden email], Jochen Theodorou <[hidden email]>
Date: 8/2/2018 11:18
Dear Jochen,

More info I found from MANIFEST.MF:

I found that the official groovy-all-1.7.5.jar distributed in grails 1.3.5 was built with JDK 1.7.0-ea (Sun Microsystems Inc.). I guess the "ea" means early access version. So I don't believe I could ever use the exactly same JDK to compile the groovy source. How am I supposed to find an early access version?

Anyway, this is a less important question. As mentioned in previous email, I mainly want to know whether it's expected or required, to compile binary .class files which are identical to the officially distributed ones, when we try to rebuild groovy on our own.

Regards,

Ken Lam
System Analyst
Mobigator Technology Group
http://www.mobigator.com
T: <a href="tel:%2B852.2524.9000%2C%20ext%20114" value="+85225249000" target="_blank">+852.2524.9000, ext 114
F: <a href="tel:%2B852.2524.9050" value="+85225249050" target="_blank">+852.2524.9050

-------- Original Message --------
Subject: Re: Need to get help: Building Groovy 1.7.5 from source gives encoding error for ReadLineTest.groovy
From: Ken Lam <[hidden email]>
To: [hidden email], Jochen Theodorou <[hidden email]>
Date: 8/2/2018 11:12
Dear Jochen,

Also, after compiling the groovy-all-1.7.5.jar, I extracted the jar, and extracted the official jar distributed in grails 1.3.5, and compare between the two extracted folders.

Out of 3371 files, 256 files (254 binary files + 2 text files) are different, and the rest are identical.

For the 2 different text files, I have checked and they should be ok.

For the 254 binary files, however, I am not sure whether this is normal.

Of course, I haven't modified any source codes at all. At least not yet.


My question is:

Is it expected or required, to have exact binary .class files compiled when we try to rebuild groovy? My compiled jar does have nearly 3000 binary class files being identical to the those in the official jar, only 254 binary files are different.

Regards,

Ken Lam
System Analyst
Mobigator Technology Group
http://www.mobigator.com
T: <a href="tel:%2B852.2524.9000%2C%20ext%20114" value="+85225249000" target="_blank">+852.2524.9000, ext 114
F: <a href="tel:%2B852.2524.9050" value="+85225249050" target="_blank">+852.2524.9050

-------- Original Message --------
Subject: Re: Need to get help: Building Groovy 1.7.5 from source gives encoding error for ReadLineTest.groovy
From: Jochen Theodorou <[hidden email]>
To: [hidden email]
Date: 8/2/2018 4:11
On 07.02.2018 07:12, Ken Lam wrote:
Dear Jochen,

Then why do I have to set

encoding="utf-8"

in groovyc commands in the build.xml to force it to UTF-8,

If no encoding is set, the system encoding is used and that could be for example GB2312 or Big5 or even only ASCII

while the official source distribution can omit this and the Groovy developers can still compile the source of Groovy 1.7.5 correctly?

because we work on linux and mac systems. I am using UTF8 as system default for over 10 years now.

Which settings in the system am I missing?

On Windows? sorry, cannot help here really. Windows is not know to be friendly to such changes at all.

bye Jochen






--
Linux. The choice of a GNU generation.
Reply | Threaded
Open this post in threaded view
|

Re: Need to get help: Building Groovy 1.7.5 from source gives encoding error for ReadLineTest.groovy

Ken Lam

Hi Felix,

Because I need to backport the fix of https://issues.apache.org/jira/browse/GROOVY-5249 to Groovy 1.7.5, and I have to build it myself.

But before that happens, I want to make sure my procedure of rebuilding the jar is absolutely correct, so I start with unmodified source and am trying to output the same binaries, except the "__timeStamp__239_neverHappen" timestamp and the manifest files and so.

Ken Lam
System Analyst
Mobigator Technology Group
http://www.mobigator.com
T: +852.2524.9000, ext 114
F: +852.2524.9050
-------- Original Message --------
Subject: Re: Need to get help: Building Groovy 1.7.5 from source gives encoding error for ReadLineTest.groovy
From: Felix Dorner [hidden email]
To: [hidden email]
Date: 8/2/2018 19:39
Ken, maybe I missed something obvious and sound stupid now, but anyway so here it comes: If you want to have the same binaries as the official binaries, why don't you just use the official binaries?

On Thu, Feb 8, 2018 at 12:33 PM, Ken Lam <[hidden email]> wrote:
Dear Groovy developers,

After experimenting with many JDK versions, I found that JDK 6 Update 13 and 21 to be able to build the jar with the least difference from the official groovy-all-1.7.5.jar distributed in grails 1.3.5.

But I still want to know whether the difference in the binary .class files will have impact to my system.

Attached are the samples and summary of "how different" the jar built by me is from the official groovy-all-1.7.5.jar

JDK 6 Update 13: 190 binary files different from official version

JDK 6 Update 21: 198 binary files different from official version


Apart from the "__timeStamp__239_neverHappen" timestamp in the .class files, there are still some other differences, and I want to know why they are here.

I understand this is a lot to ask, but I have no choice because I don't know how to analyze the bytecode differences and their meanings. So I have attached some samples and I hope if you can teach me some basic knowledge and some references to look at, I will be able to handle it myself in the future.

Regards,

Ken Lam
System Analyst
Mobigator Technology Group
http://www.mobigator.com
T: <a href="tel:%2B852.2524.9000%2C%20ext%20114" value="+85225249000" target="_blank" moz-do-not-send="true">+852.2524.9000, ext 114
F: <a href="tel:%2B852.2524.9050" value="+85225249050" target="_blank" moz-do-not-send="true">+852.2524.9050

-------- Original Message --------
Subject: Re: Need to get help: Building Groovy 1.7.5 from source gives encoding error for ReadLineTest.groovy
From: Ken Lam <[hidden email]>
To: [hidden email], Jochen Theodorou <[hidden email]>
Date: 8/2/2018 11:18
Dear Jochen,

More info I found from MANIFEST.MF:

I found that the official groovy-all-1.7.5.jar distributed in grails 1.3.5 was built with JDK 1.7.0-ea (Sun Microsystems Inc.). I guess the "ea" means early access version. So I don't believe I could ever use the exactly same JDK to compile the groovy source. How am I supposed to find an early access version?

Anyway, this is a less important question. As mentioned in previous email, I mainly want to know whether it's expected or required, to compile binary .class files which are identical to the officially distributed ones, when we try to rebuild groovy on our own.

Regards,

Ken Lam
System Analyst
Mobigator Technology Group
http://www.mobigator.com
T: <a href="tel:%2B852.2524.9000%2C%20ext%20114" value="+85225249000" target="_blank" moz-do-not-send="true">+852.2524.9000, ext 114
F: <a href="tel:%2B852.2524.9050" value="+85225249050" target="_blank" moz-do-not-send="true">+852.2524.9050

-------- Original Message --------
Subject: Re: Need to get help: Building Groovy 1.7.5 from source gives encoding error for ReadLineTest.groovy
From: Ken Lam <[hidden email]>
To: [hidden email], Jochen Theodorou <[hidden email]>
Date: 8/2/2018 11:12
Dear Jochen,

Also, after compiling the groovy-all-1.7.5.jar, I extracted the jar, and extracted the official jar distributed in grails 1.3.5, and compare between the two extracted folders.

Out of 3371 files, 256 files (254 binary files + 2 text files) are different, and the rest are identical.

For the 2 different text files, I have checked and they should be ok.

For the 254 binary files, however, I am not sure whether this is normal.

Of course, I haven't modified any source codes at all. At least not yet.


My question is:

Is it expected or required, to have exact binary .class files compiled when we try to rebuild groovy? My compiled jar does have nearly 3000 binary class files being identical to the those in the official jar, only 254 binary files are different.

Regards,

Ken Lam
System Analyst
Mobigator Technology Group
http://www.mobigator.com
T: <a href="tel:%2B852.2524.9000%2C%20ext%20114" value="+85225249000" target="_blank" moz-do-not-send="true">+852.2524.9000, ext 114
F: <a href="tel:%2B852.2524.9050" value="+85225249050" target="_blank" moz-do-not-send="true">+852.2524.9050

-------- Original Message --------
Subject: Re: Need to get help: Building Groovy 1.7.5 from source gives encoding error for ReadLineTest.groovy
From: Jochen Theodorou <[hidden email]>
To: [hidden email]
Date: 8/2/2018 4:11
On 07.02.2018 07:12, Ken Lam wrote:
Dear Jochen,

Then why do I have to set

encoding="utf-8"

in groovyc commands in the build.xml to force it to UTF-8,

If no encoding is set, the system encoding is used and that could be for example GB2312 or Big5 or even only ASCII

while the official source distribution can omit this and the Groovy developers can still compile the source of Groovy 1.7.5 correctly?

because we work on linux and mac systems. I am using UTF8 as system default for over 10 years now.

Which settings in the system am I missing?

On Windows? sorry, cannot help here really. Windows is not know to be friendly to such changes at all.

bye Jochen






--
Linux. The choice of a GNU generation.

Reply | Threaded
Open this post in threaded view
|

Re: Need to get help: Building Groovy 1.7.5 from source gives encoding error for ReadLineTest.groovy

Ken Lam

Also, putting new versions of groovy (i.e. the minimum versions that have the fix of GROOVY-5249) to grails 1.3.5 didn't work

Ken Lam
System Analyst
Mobigator Technology Group
http://www.mobigator.com
T: +852.2524.9000, ext 114
F: +852.2524.9050
-------- Original Message --------
Subject: Re: Need to get help: Building Groovy 1.7.5 from source gives encoding error for ReadLineTest.groovy
From: Ken Lam [hidden email]
To: [hidden email], Felix Dorner [hidden email]
Date: 8/2/2018 19:43

Hi Felix,

Because I need to backport the fix of https://issues.apache.org/jira/browse/GROOVY-5249 to Groovy 1.7.5, and I have to build it myself.

But before that happens, I want to make sure my procedure of rebuilding the jar is absolutely correct, so I start with unmodified source and am trying to output the same binaries, except the "__timeStamp__239_neverHappen" timestamp and the manifest files and so.

Ken Lam
System Analyst
Mobigator Technology Group
http://www.mobigator.com
T: +852.2524.9000, ext 114
F: +852.2524.9050
-------- Original Message --------
Subject: Re: Need to get help: Building Groovy 1.7.5 from source gives encoding error for ReadLineTest.groovy
From: Felix Dorner [hidden email]
To: [hidden email]
Date: 8/2/2018 19:39
Ken, maybe I missed something obvious and sound stupid now, but anyway so here it comes: If you want to have the same binaries as the official binaries, why don't you just use the official binaries?

On Thu, Feb 8, 2018 at 12:33 PM, Ken Lam <[hidden email]> wrote:
Dear Groovy developers,

After experimenting with many JDK versions, I found that JDK 6 Update 13 and 21 to be able to build the jar with the least difference from the official groovy-all-1.7.5.jar distributed in grails 1.3.5.

But I still want to know whether the difference in the binary .class files will have impact to my system.

Attached are the samples and summary of "how different" the jar built by me is from the official groovy-all-1.7.5.jar

JDK 6 Update 13: 190 binary files different from official version

JDK 6 Update 21: 198 binary files different from official version


Apart from the "__timeStamp__239_neverHappen" timestamp in the .class files, there are still some other differences, and I want to know why they are here.

I understand this is a lot to ask, but I have no choice because I don't know how to analyze the bytecode differences and their meanings. So I have attached some samples and I hope if you can teach me some basic knowledge and some references to look at, I will be able to handle it myself in the future.

Regards,

Ken Lam
System Analyst
Mobigator Technology Group
http://www.mobigator.com
T: <a href="tel:%2B852.2524.9000%2C%20ext%20114" value="+85225249000" target="_blank" moz-do-not-send="true">+852.2524.9000, ext 114
F: <a href="tel:%2B852.2524.9050" value="+85225249050" target="_blank" moz-do-not-send="true">+852.2524.9050

-------- Original Message --------
Subject: Re: Need to get help: Building Groovy 1.7.5 from source gives encoding error for ReadLineTest.groovy
From: Ken Lam <[hidden email]>
To: [hidden email], Jochen Theodorou <[hidden email]>
Date: 8/2/2018 11:18
Dear Jochen,

More info I found from MANIFEST.MF:

I found that the official groovy-all-1.7.5.jar distributed in grails 1.3.5 was built with JDK 1.7.0-ea (Sun Microsystems Inc.). I guess the "ea" means early access version. So I don't believe I could ever use the exactly same JDK to compile the groovy source. How am I supposed to find an early access version?

Anyway, this is a less important question. As mentioned in previous email, I mainly want to know whether it's expected or required, to compile binary .class files which are identical to the officially distributed ones, when we try to rebuild groovy on our own.

Regards,

Ken Lam
System Analyst
Mobigator Technology Group
http://www.mobigator.com
T: <a href="tel:%2B852.2524.9000%2C%20ext%20114" value="+85225249000" target="_blank" moz-do-not-send="true">+852.2524.9000, ext 114
F: <a href="tel:%2B852.2524.9050" value="+85225249050" target="_blank" moz-do-not-send="true">+852.2524.9050

-------- Original Message --------
Subject: Re: Need to get help: Building Groovy 1.7.5 from source gives encoding error for ReadLineTest.groovy
From: Ken Lam <[hidden email]>
To: [hidden email], Jochen Theodorou <[hidden email]>
Date: 8/2/2018 11:12
Dear Jochen,

Also, after compiling the groovy-all-1.7.5.jar, I extracted the jar, and extracted the official jar distributed in grails 1.3.5, and compare between the two extracted folders.

Out of 3371 files, 256 files (254 binary files + 2 text files) are different, and the rest are identical.

For the 2 different text files, I have checked and they should be ok.

For the 254 binary files, however, I am not sure whether this is normal.

Of course, I haven't modified any source codes at all. At least not yet.


My question is:

Is it expected or required, to have exact binary .class files compiled when we try to rebuild groovy? My compiled jar does have nearly 3000 binary class files being identical to the those in the official jar, only 254 binary files are different.

Regards,

Ken Lam
System Analyst
Mobigator Technology Group
http://www.mobigator.com
T: <a href="tel:%2B852.2524.9000%2C%20ext%20114" value="+85225249000" target="_blank" moz-do-not-send="true">+852.2524.9000, ext 114
F: <a href="tel:%2B852.2524.9050" value="+85225249050" target="_blank" moz-do-not-send="true">+852.2524.9050

-------- Original Message --------
Subject: Re: Need to get help: Building Groovy 1.7.5 from source gives encoding error for ReadLineTest.groovy
From: Jochen Theodorou <[hidden email]>
To: [hidden email]
Date: 8/2/2018 4:11
On 07.02.2018 07:12, Ken Lam wrote:
Dear Jochen,

Then why do I have to set

encoding="utf-8"

in groovyc commands in the build.xml to force it to UTF-8,

If no encoding is set, the system encoding is used and that could be for example GB2312 or Big5 or even only ASCII

while the official source distribution can omit this and the Groovy developers can still compile the source of Groovy 1.7.5 correctly?

because we work on linux and mac systems. I am using UTF8 as system default for over 10 years now.

Which settings in the system am I missing?

On Windows? sorry, cannot help here really. Windows is not know to be friendly to such changes at all.

bye Jochen






--
Linux. The choice of a GNU generation.


12