You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by Zhe Liu <al...@gmail.com> on 2011/12/14 03:23:30 UTC
Compilation error when build libxml2.
I got compilation errors on windows in the module "libxml2".
..\testapi.c(294) : error C2001: newline in constant
..\testapi.c(295) : error C2143: syntax error : missing ')' before 'return'
The cause is that one single quotation mark is missed on the line no.
294 of testapi.c in the
ext_sources\7740a8ec23878a2f50120e1faa2730f2-libxml2-2.7.6.tar.gz.
Anybody can help to fix it? I'm not a committer.
--
Best Regards
>From aliuzhe@gmail.com
Re: Compilation error when build libxml2.
Posted by eric b <er...@free.fr>.
Le 16 déc. 11 à 09:49, Zhe Liu a écrit :
> Hi Eric,
>
Hi Zhe Liu,
> Got the error. You may miss the ext name ".patch". I changed
>
OOops, my fault :-/
> "libxml2-testapi-windows-korean.patch" to
> "libxml2-testapi-windows-korean". It works.
>
Ok, thanks a lot for your feedback !
Now we need to know the original author of the patch. On the issue
93433 ( https://issues.apache.org/ooo/show_bug.cgi?id=93433 ), the
author of the fix is "tora".
I contacted him (see the issue above), means the fix should be
commited very soon.
Thanks in advance,
Eric Bachard
--
qɔᴉɹə
Projet OOo4Kids : http://wiki.ooo4kids.org/index.php/Main_Page
L'association EducOOo : http://www.educoo.org
Blog : http://eric.bachard.org/news
Re: Compilation error when build libxml2.
Posted by Zhe Liu <al...@gmail.com>.
Hi Eric,
Got the error. You may miss the ext name ".patch". I changed
"libxml2-testapi-windows-korean.patch" to
"libxml2-testapi-windows-korean". It works.
=============
Building module libxml2
=============
Entering /cygdrive/d/aoosrc/aoo/main/libxml2
mkout -- version: 1.8
dmake: Error: -- `./libxml2-testapi-windows-korean' not found, and
can't be made
ERROR: error 65280 occurred while making /cygdrive/d/aoosrc/aoo/main/libxml2
2011/12/14 eric b <er...@free.fr>:
> Hi,
>
> Le 14 déc. 11 à 09:54, Tor Lillqvist a écrit :
>
>> Hint: i#93433
>
>
> @tml
>
> Thanks a lot, it was the right issue.
>
>
> @ Zhe Liu :
>
> Can you please add
> http://ftp.educoo.org/home/ericb/patches/apache_ooo/i94433/libxml2-testapi-windows-korean.patch
> in libxml2 directory and apply the following patch (from $SRC_ROOT) :
> http://ftp.educoo.org/home/ericb/patches/apache_ooo/i94433/i94433_libxml2_windows_korean.diff
>
> libxml2 should build normaly for you, and not break other ports with that.
>
> If it works, I'll attach them to the issue #i93433, and somebody will commit
> i94433_libxml2_windows_korean.diff in the name of Tora, and the other diff
> with me as author.
>
>
> Thanks,
>
> Eric
>
> --
> qɔᴉɹə
> Projet OOo4Kids : http://wiki.ooo4kids.org/index.php/Main_Page
> L'association EducOOo : http://www.educoo.org
> Blog : http://eric.bachard.org/news
>
>
>
>
>
--
Best Regards
>From aliuzhe@gmail.com
Re: Compilation error when build libxml2.
Posted by eric b <er...@free.fr>.
Hi,
Le 14 déc. 11 à 09:54, Tor Lillqvist a écrit :
> Hint: i#93433
@tml
Thanks a lot, it was the right issue.
@ Zhe Liu :
Can you please add http://ftp.educoo.org/home/ericb/patches/
apache_ooo/i94433/libxml2-testapi-windows-korean.patch in libxml2
directory and apply the following patch (from $SRC_ROOT) : http://
ftp.educoo.org/home/ericb/patches/apache_ooo/i94433/
i94433_libxml2_windows_korean.diff
libxml2 should build normaly for you, and not break other ports with
that.
If it works, I'll attach them to the issue #i93433, and somebody will
commit i94433_libxml2_windows_korean.diff in the name of Tora, and
the other diff with me as author.
Thanks,
Eric
--
qɔᴉɹə
Projet OOo4Kids : http://wiki.ooo4kids.org/index.php/Main_Page
L'association EducOOo : http://www.educoo.org
Blog : http://eric.bachard.org/news
Re: Compilation error when build libxml2.
Posted by Tor Lillqvist <tm...@iki.fi>.
Hint: i#93433
--tml
Re: Compilation error when build libxml2.
Posted by eric b <er...@free.fr>.
OOops ...
Answering to myself, the Unicode point is not a tilde, but something
else.
Eric
--
qɔᴉɹə
Projet OOo4Kids : http://wiki.ooo4kids.org/index.php/Main_Page
L'association EducOOo : http://www.educoo.org
Blog : http://eric.bachard.org/news
Re: Compilation error when build libxml2.
Posted by eric b <er...@free.fr>.
Hi Dennis,
Le 14 déc. 11 à 07:27, Dennis E. Hamilton a écrit :
> I found the problem. It is a little more involved. Here is the
> procedure that did not parse correctly:
>
> lines 291-296 of testapi.c:
>
> 291: static xmlChar gen_xmlChar(int no, int nr ATTRIBUTE_UNUSED) {
> 292: if (no == 0) return('a');
> 293: if (no == 1) return(' ');
> 294: if (no == 2) return((xmlChar) 'ø');
> 295: return(0);
> 296: }
Opening the file with Xcode, I see that :
291 static xmlChar gen_xmlChar(int no, int nr ATTRIBUTE_UNUSED) {
292 if (no == 0) return('a');
293 if (no == 1) return(' ');
294 if (no == 2) return((xmlChar) '¯');
295 return(0);
296 }
Means there is a "~" for me on Mac OS X, at the mentioned lines.
Create a patch + add it needs 1 minute, but what is the exact Unicode
point to be used ? :-)
Thanks,
Eric
--
qɔᴉɹə
Projet OOo4Kids : http://wiki.ooo4kids.org/index.php/Main_Page
L'association EducOOo : http://www.educoo.org
Blog : http://eric.bachard.org/news
Re: Compilation error when build libxml2.
Posted by Zhe Liu <al...@gmail.com>.
Windows XP. (My system locale is Chinese. Maybe it's the cause. The
different code page of system maybe lead compiler not to read source
code correctly.)
Microsoft Visual C++ 2008 Express Edition
Cygwin 1.7.9-1
2011/12/14 Jürgen Schmidt <jo...@googlemail.com>:
> On 12/14/11 7:27 AM, Dennis E. Hamilton wrote:
>>
>> I found the problem. It is a little more involved.
>>
>> Here is the procedure that did not parse correctly:
>>
>> lines 291-296 of testapi.c:
>>
>> 291: static xmlChar gen_xmlChar(int no, int nr ATTRIBUTE_UNUSED) {
>> 292: if (no == 0) return('a');
>> 293: if (no == 1) return(' ');
>> 294: if (no == 2) return((xmlChar) 'ø');
>> 295: return(0);
>> 296: }
>>
>> Do you see the small letter "o" with stroke in the character literal in
>> line 294?
>>
>> This is from Visual C++ 2010 Express Edition. I also opened it in jEdit,
>> which tells me when files are not in my preferred default of UTF-8. I was
>> able to confirm that this particular file is in ISO 8859-1 single-byte
>> format.
>>
>> That means the character is the same as U+00F8. I extracted that much and
>> checked in a Hex Viewer and it is indeed 0xF8 in that position.
>>
>> So here is the replacement:
>>
>> 294: if (no == 2) return((xmlChar) 0xF8); /* Small Letter O with
>> Stroke */
>>
>> That's the name for Unicode code point U+00F8.
>>
>> It is probably a matter of the compiler being de-railed by non-C-Locale
>> printable characters or other character-set encoding and detection issues.
>>
>> You might encounter more of these.
>>
>> - Dennis
>>
>> [That was the easy part. I then had to figure out how to rebuild that
>> monster tar.gz. WinZip will extract them, but not make them. Fortunately,
>> the Windows 7 Ultimate POSIX Subsystem has bash and I
>> could figure it out reading the man pages for tar and pax (my favorite
>> from many years ago).
>>
>> I notice that my file is bigger. It may well be a result of replacing
>> tabs by spaces in testapi.c, since the growth is by more than 50k bytes in
>> that 1.4MB file. I didn't attempt to fix that.
>>
>> You can safely conclude that this is the first time I ever committed
>> anything to any Apache code base.]
>>
>> -----Original Message-----
>> From: Zhe Liu [mailto:aliuzhe@gmail.com]
>> Sent: Tuesday, December 13, 2011 18:24
>> To: ooo-dev@incubator.apache.org
>> Subject: Compilation error when build libxml2.
>>
>> I got compilation errors on windows in the module "libxml2".
>> ..\testapi.c(294) : error C2001: newline in constant
>> ..\testapi.c(295) : error C2143: syntax error : missing ')' before
>> 'return'
>>
>> The cause is that one single quotation mark is missed on the line no.
>> 294 of testapi.c in the
>> ext_sources\7740a8ec23878a2f50120e1faa2730f2-libxml2-2.7.6.tar.gz.
>> Anybody can help to fix it? I'm not a committer.
>
>
> it would be good to know on which system you have the build problems. I know
> several people who built on Windows 7 frequently and it worked.
>
>
> Juergen
>
>
--
Best Regards
>From aliuzhe@gmail.com
Re: Compilation error when build libxml2.
Posted by Jürgen Schmidt <jo...@googlemail.com>.
On 12/14/11 7:27 AM, Dennis E. Hamilton wrote:
> I found the problem. It is a little more involved.
>
> Here is the procedure that did not parse correctly:
>
> lines 291-296 of testapi.c:
>
> 291: static xmlChar gen_xmlChar(int no, int nr ATTRIBUTE_UNUSED) {
> 292: if (no == 0) return('a');
> 293: if (no == 1) return(' ');
> 294: if (no == 2) return((xmlChar) 'ø');
> 295: return(0);
> 296: }
>
> Do you see the small letter "o" with stroke in the character literal in line 294?
>
> This is from Visual C++ 2010 Express Edition. I also opened it in jEdit, which tells me when files are not in my preferred default of UTF-8. I was able to confirm that this particular file is in ISO 8859-1 single-byte format.
>
> That means the character is the same as U+00F8. I extracted that much and checked in a Hex Viewer and it is indeed 0xF8 in that position.
>
> So here is the replacement:
>
> 294: if (no == 2) return((xmlChar) 0xF8); /* Small Letter O with Stroke */
>
> That's the name for Unicode code point U+00F8.
>
> It is probably a matter of the compiler being de-railed by non-C-Locale printable characters or other character-set encoding and detection issues.
>
> You might encounter more of these.
>
> - Dennis
>
> [That was the easy part. I then had to figure out how to rebuild that monster tar.gz. WinZip will extract them, but not make them. Fortunately, the Windows 7 Ultimate POSIX Subsystem has bash and I
> could figure it out reading the man pages for tar and pax (my favorite from many years ago).
>
> I notice that my file is bigger. It may well be a result of replacing tabs by spaces in testapi.c, since the growth is by more than 50k bytes in that 1.4MB file. I didn't attempt to fix that.
>
> You can safely conclude that this is the first time I ever committed anything to any Apache code base.]
>
> -----Original Message-----
> From: Zhe Liu [mailto:aliuzhe@gmail.com]
> Sent: Tuesday, December 13, 2011 18:24
> To: ooo-dev@incubator.apache.org
> Subject: Compilation error when build libxml2.
>
> I got compilation errors on windows in the module "libxml2".
> ..\testapi.c(294) : error C2001: newline in constant
> ..\testapi.c(295) : error C2143: syntax error : missing ')' before 'return'
>
> The cause is that one single quotation mark is missed on the line no.
> 294 of testapi.c in the
> ext_sources\7740a8ec23878a2f50120e1faa2730f2-libxml2-2.7.6.tar.gz.
> Anybody can help to fix it? I'm not a committer.
it would be good to know on which system you have the build problems. I
know several people who built on Windows 7 frequently and it worked.
Juergen
RE: Compilation error when build libxml2.
Posted by "Dennis E. Hamilton" <de...@acm.org>.
I found the problem. It is a little more involved.
Here is the procedure that did not parse correctly:
lines 291-296 of testapi.c:
291: static xmlChar gen_xmlChar(int no, int nr ATTRIBUTE_UNUSED) {
292: if (no == 0) return('a');
293: if (no == 1) return(' ');
294: if (no == 2) return((xmlChar) 'ø');
295: return(0);
296: }
Do you see the small letter "o" with stroke in the character literal in line 294?
This is from Visual C++ 2010 Express Edition. I also opened it in jEdit, which tells me when files are not in my preferred default of UTF-8. I was able to confirm that this particular file is in ISO 8859-1 single-byte format.
That means the character is the same as U+00F8. I extracted that much and checked in a Hex Viewer and it is indeed 0xF8 in that position.
So here is the replacement:
294: if (no == 2) return((xmlChar) 0xF8); /* Small Letter O with Stroke */
That's the name for Unicode code point U+00F8.
It is probably a matter of the compiler being de-railed by non-C-Locale printable characters or other character-set encoding and detection issues.
You might encounter more of these.
- Dennis
[That was the easy part. I then had to figure out how to rebuild that monster tar.gz. WinZip will extract them, but not make them. Fortunately, the Windows 7 Ultimate POSIX Subsystem has bash and I
could figure it out reading the man pages for tar and pax (my favorite from many years ago).
I notice that my file is bigger. It may well be a result of replacing tabs by spaces in testapi.c, since the growth is by more than 50k bytes in that 1.4MB file. I didn't attempt to fix that.
You can safely conclude that this is the first time I ever committed anything to any Apache code base.]
-----Original Message-----
From: Zhe Liu [mailto:aliuzhe@gmail.com]
Sent: Tuesday, December 13, 2011 18:24
To: ooo-dev@incubator.apache.org
Subject: Compilation error when build libxml2.
I got compilation errors on windows in the module "libxml2".
..\testapi.c(294) : error C2001: newline in constant
..\testapi.c(295) : error C2143: syntax error : missing ')' before 'return'
The cause is that one single quotation mark is missed on the line no.
294 of testapi.c in the
ext_sources\7740a8ec23878a2f50120e1faa2730f2-libxml2-2.7.6.tar.gz.
Anybody can help to fix it? I'm not a committer.
--
Best Regards
>From aliuzhe@gmail.com