Re: problem configuring Amaya 11.4.4 with system raptor (or zlib-1.2.7)

Troubleshooting a different problem led me back to this one.  Amaya  
11.4.4 compiles fine against zlib 1.2.5, but for 1.2.6 or higher, a  
change in the headers leads to the error below.  The following two  
patches fix the problem.  I've just added them to my ebuild, but I  
suppose they should really be wrapped in a test for which zlib version  
is being used.  Both files to be patched are in Amaya/amaya/

Jack

::::::::::::::
Xml2thot.diff
::::::::::::::
--- Xml2thot.c.orig     2013-02-20 15:40:34.000000000 -0500
+++ Xml2thot.c  2013-02-20 15:41:23.000000000 -0500
@@ -5847,7 +5847,7 @@
    while (!endOfFile && !XMLNotWellFormed && !XMLInvalidToken)
      {
        /* read the XML file */
-      res = gzread (infile, bufferRead, COPY_BUFFER_SIZE);
+      res = gzread ((gzFile)infile, bufferRead, COPY_BUFFER_SIZE);
        if (res < 0)
          return;

::::::::::::::
/tmp/html2thot.diff
::::::::::::::
--- html2thot.c.orig    2013-02-20 15:31:26.000000000 -0500
+++ html2thot.c 2013-02-20 15:32:34.000000000 -0500
@@ -4349,7 +4349,7 @@
        WorkBuffer = FileBuffer;
      }
    // need to read a new set of characters
-  LastCharInWorkBuffer = gzread (infile, &FileBuffer[StartOfRead],
+  LastCharInWorkBuffer = gzread ((gzFile)infile,  
&FileBuffer[StartOfRead],
                                   INPUT_FILE_BUFFER_SIZE -  
StartOfRead);
    // add previous read characters not managed yet
    LastCharInWorkBuffer += StartOfRead;

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

On 2012.11.14 15:48, Laurent Carcone wrote:
> I made a quick google research, it seems to be a problem with the  
> zlib library [1], [2], [3].
> Which version are you running ?
> 
> Laurent
> 
> 
> [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=661906
> [2] http://forum.simutrans.com/index.php?topic=9575.0
> [3] http://comments.gmane.org/gmane.linux.lfs.devel/11698
> 
> Le 14/11/12 20:28, Jack a écrit :
>> Laurent,
>> 
>> Thanks for the suggestion.  However, using --disable-annot, I get
>> 
>> ../../amaya/html2thot.c: In function 'void GetNextHTMLbuffer(FILE*,  
>> ThotBool*, char**, int*)':
>> ../../amaya/html2thot.c:4353:70: error: cannot convert 'FILE*' to  
>> 'gzFile_s*' for argument '1' to 'int gzread(gzFile_s*, void*,  
>> unsigned int)'
>> make[1]: *** [html2thot.o] Error 1
>> make[1]: Leaving directory `[full-path-to]/Amaya/LINUX-ELF/amaya'
>> make: *** [amaya_prog] Error 2
>> 
>> I haven't done much troubleshooting of this yet, but I don't find  
>> anything obvious in a quick Google.
>> 
>> Also, while Annotations are not particularly important to me, I also  
>> plan to try to figure out why it was failing when using the included  
>> raptor.
>> 
>> Thanks for any hints or suggestions.
>> 
>> Jack
>> 
>> On 2012.11.14 05:09, Laurent Carcone wrote:
>>> Hello,
>>> 
>>> If I remember correctly, raptor is used by the experimental  
>>> Annotations service. If you don't want to use this service you can  
>>> disable it when you launch the configure command: ../configure  
>>> --disable-annot
>>> 
>>> Thanks,
>>> Laurent
>>> 
>>> Le 08/11/2012 20:03, Jack a écrit :
>>>> I am trying to compile Amaya 11.4.4 on Gentoo Linux, and have run  
>>>> into a problem.  It appears that the configuration cannot find my  
>>>> system raptor, and it subsequently fails to build with the  
>>>> built-in raptor.  If anyone is interested, I will provide more  
>>>> information on this fail in a separate thread.
>>>> 
>>>> I have raptor 2.0.8 installed and it appears that as of raptor  
>>>> 2.0, raptor-config was dropped in favor of pkg-config.  I don't  
>>>> know if Amaya would work with raptor2 but if  so, it needs to  
>>>> check for pkg-config raptor2 instead of raptor-config.  If raptor2  
>>>> will work, I would much rather see a fix so it is possible.  If  
>>>> the code is still based on raptor1, then I'll pursue why the  
>>>> internal raptor is not working.
>>>> 
>>>> Thanks for any suggsetions.
>>>> 
>>>> Jack
>>>> 
>>>> 
>>> 
>> 
>> 
> 

Received on Friday, 22 February 2013 09:42:24 UTC