build error when compiling ark libzip plugin

Patrick Spendrin ps_ml at gmx.de
Tue Feb 3 10:22:48 CET 2009


Alexander Neundorf schrieb:
> On Saturday 31 January 2009, Orville Bennett wrote:
>> I had some trouble when enabling zip support in ark. Reason seems to
>> be "off_t" defined in
>> both /usr/include/sys/types.h and kdeutils-4.2.0/ark/plugins/
>> libzipplugin/zipplugin.cpp.
>>
>> zipplugin.cpp block
>> #ifdef LIBZIP_COMPILED_WITH_32BIT_OFF_T
>> #define __off_t_defined
>> typedef quint32 off_t;
>> #endif /* LIBZIP_COMPILED_WITH_32BIT_OFF_T */
>>
>> types.h block
>> #ifndef _OFF_T
>> typedef __darwin_off_t		off_t;
>> #define _OFF_T
>> #endif
>>
>> This thread convinced me the definition in zipplugin.cpp was
>> unnecessary http://lists.apple.com/archives/Scitech/2006/Sep/msg00071.html
>> which lead to this change in kdeutils-4.2.0/ark/plugins/libzipplugin/
>> CMakeLists.txt
>>
>> @@ -4,11 +4,11 @@
>>                        ${CMAKE_CURRENT_BINARY_DIR}/../..
>>                      )
>>
>> -if(WIN32)
>> +if(APPLE OR WIN32)
>>       set (LIBZIP_COMPILED_WITH_32BIT_OFF_T OFF CACHE BOOL "Whether
>> the system libzip library is compiled with 32bits off_t" )
>> -else(WIN32)
>> +else(APPLE OR WIN32)
>>       set (LIBZIP_COMPILED_WITH_32BIT_OFF_T ON CACHE BOOL "Whether the
>> system libzip library is compiled with 32bits off_t" )
>> -endif(WIN32)
>> +endif(APPLE OR WIN32)
> 
> If it's a bool value which goes into the cache I'd recommend using OPTION() 
> instead of SET().
That doesn't make sense though - there probably is no system where both 
is possible.
> But, maybe you can come up with some configure check which tests what is 
> needed ? Maybe something with check_c_source_compiles() ?
That would be required indeed.
> 
> Alex
> _______________________________________________
> Kde-buildsystem mailing list
> Kde-buildsystem at kde.org
> https://mail.kde.org/mailman/listinfo/kde-buildsystem
> 


-- 
web:                 http://windows.kde.org
mailing list:        kde-windows at kde.org
irc:                 #kde-windows (irc.freenode.net)


More information about the Kde-buildsystem mailing list