« Return to Thread: compilation of player fails on archlinux (zlib related?)

Re: compilation of player fails on archlinux (zlib related?)

by Rich Mattes-2 :: Rate this Message:

| View in Thread

On 3/16/2012 5:37 PM, Rich Mattes wrote:

> On 3/14/2012 11:07 AM, stefano franchi wrote:
>> Compilation of player fails on a recently updated archlinux 64 system
>> with:
>>
>> /home/stefano/builds/player/src/player-3.0.2/server/drivers/shell/readlog.cc:
>>
>> In member function ‘virtual void ReadLog::Main()’:
>> /home/stefano/builds/player/src/player-3.0.2/server/drivers/shell/readlog.cc:668:43:
>>
>> error: cannot convert ‘FILE* {aka _IO_FILE*}’ to ‘gzFile’ for argument
>> ‘1’ to ‘off_t gzseek(gzFile, off_t, int)’
>> /home/stefano/builds/player/src/player-3.0.2/server/drivers/shell/readlog.cc:714:62:
>>
>> error: cannot convert ‘FILE* {aka _IO_FILE*}’ to ‘gzFile’ for argument
>> ‘1’ to ‘char* gzgets(gzFile, char*, int)’
>> make[2]: ***
>> [server/libplayerdrivers/CMakeFiles/playerdrivers.dir/__/drivers/shell/readlog.o]
>> Error 1
>> make[1]: ***
>> [server/libplayerdrivers/CMakeFiles/playerdrivers.dir/all] Error 2
>> make: *** [all] Error 2
>>
>> This may be related to the API change in zlib from 1.2.5 to 1.2.6,
>> which is now installed on my system. According to another archlinux
>> user, there has been a change in zlib.h in 1.2.6:
>>
>> -   typedef voidp gzFile;       /* opaque gzip file descriptor */
>> + typedef struct gzFile_s *gzFile;    /* semi-opaque gzip file
>> descriptor */
>>
>>
>> However, this is as far as I got. I took a look at readlog.cc, but I
>> don't know how to fix the two offending lines (assuming I got the
>> diagnosis right).
>>
>>
>> Cheers,
>>
>> Stefano
>>
>>
> According to a patch[1] I found for a related error, it looks like you
> need to cast the FILE* pointers to gzFile.  For example, in readlog.cc
> you'd probably have to change the line
>
> ret = gzseek(this->file,0,SEEK_SET);
>
> to
>
> ret = gzseek((gzFile)this->file,0,SEEK_SET);
>
> I don't have access to an arch box at the moment, so I can't test it
> myself.  Let me know how it goes, if it works we'll put the fix into SVN.
>
> Rich
Forgot to include my citation :/

[1] http://www.paraview.org/Bug/view.php?id=12924

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Playerstage-users mailing list
Playerstage-users@...
https://lists.sourceforge.net/lists/listinfo/playerstage-users

 « Return to Thread: compilation of player fails on archlinux (zlib related?)