incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis E. Hamilton" <dennis.hamil...@acm.org>
Subject RE: Compilation error when build libxml2.
Date Wed, 14 Dec 2011 06:27:09 GMT
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


Mime
View raw message