[Yazlist] Linux compiler failures for V3.0.34

Adam Dickmeiss adam at indexdata.dk
Wed Oct 1 00:17:18 CEST 2008


Gary Anderson wrote:
> Adam,
>
> I can't supply config.log because I'm not using all of YAZ.  However, 
> I am running gcc version 4.1.0-28.4 on x86-64 hardware under Novell 
> SLES 10.1.  When I originally built the subset of your code that I use 
> under VS2005, it compiled correctly without error.  The error popped 
> up when I tried to build on the Linux system.  The changes made to 
> make it compile in Linux would not compile under VS.  The typecast to 
> (struct decoder_data*) works on both.
>
Gary,

YAZ is auto-compiled on the gcc versions 2.95.4, 3.3.4, 3.3.5, 4.1.2, 
4,3.0, 4.3.1 on Linux/FreeBSD/OpenBSD without errors.

Maybe gcc is broken on your platform (unlikely). Or, you're just using 
gcc in its C++ mode (likely). Check your makefiles. You might also - to 
test - compile vanilla YAZ on your platform and see if you get the same 
errors.

These type casts should not be necessary for C. Only for C++.

/ Adam
> Gary
>
>
> Adam Dickmeiss wrote:
>> Gary Anderson wrote:
>>> I am using gcc on SLES 10.1.  Doing the typecast as (decoder_data*) 
>>> on Linux works, but then MS Visual Studio 2005 complains.  In order 
>>> to satisfy both, I've had to use (struct decoder_data*) and (struct 
>>> encoder_data*) as typecasts.
>>>
>>>   
>> The code without the type cases compiles with on VC from 6 to 2008 
>> and as far as we know with all gcc versions. If we're to fix type 
>> cast errors reported by gcc, we need to have that gcc version here. 
>> If not these errors will pop up in future releases.. Please send 
>> config.log that is generated by YAZ' configure (it will tell which 
>> version of gcc you are using).
>>
>> / Adam
>>
>>> Gary
>>>
>>> Adam Dickmeiss wrote:
>>>  
>>>> Gary Anderson wrote:
>>>>   
>>>>> With my Linux c++ compiler, I am getting invalid conversion errors 
>>>>> (void to decoder_data*) on lines 54, 113, 246, 255, and 269 in 
>>>>> iconv_decode_marc8.c.  If I explicitly type cast these, the errors 
>>>>> go away. A similar problem exists in iconv_encode_iso_8859_1.c on 
>>>>> lines 138, 196, 216, and 231.  Again, explicit type casting solves 
>>>>> the problem.
>>>>> iconv_encode_marc8.c shows the problem on lines 53., 337, 385, 
>>>>> 392, 399 and 423.
>>>>>
>>>>> May I suggest that in each of these cases, an explicit type cast 
>>>>> be added to the code to get rid of these errors?
>>>>>         
>>>> I don't know if are using g++.. Why not use gcc?
>>>>
>>>> By the way, in the very old days some people had to use c++ mode 
>>>> for Sun Studio.
>>>>
>>>> / Adam
>>>>
>>>>   
>>>>> Regards
>>>>> Gary L. Anderson
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Yazlist mailing list
>>>>> Yazlist at lists.indexdata.dk
>>>>> http://lists.indexdata.dk/cgi-bin/mailman/listinfo/yazlist
>>>>>
>>>>>         
>>>>     
>>>
>>>
>>> _______________________________________________
>>> Yazlist mailing list
>>> Yazlist at lists.indexdata.dk
>>> http://lists.indexdata.dk/cgi-bin/mailman/listinfo/yazlist
>>>
>>>   
>>
>>
>
>




More information about the Yazlist mailing list