[hatari-devel] Issues with CMake/CMakeLists.txt

Eero Tamminen eerot at users.berlios.de
Tue Mar 23 00:04:10 CET 2010


Hi,

On Tuesday 23 March 2010, Thomas Huth wrote:
> > > This is certainly caused by the fact that the CMakeLists.txt in the
> > > topmost directory turns on large filesystem support via "getconf
> > > LFS_CFLAGS" - which is not done by the old Makefiles.
> > > But you should not get warning messages because of this - unless
> > > your zlib.h is broken. My zlib.h looks like this here:
> >
> > Mine looks the same.
>
> Ok, but then your "getconf LFS_CFLAGS" might be incomplete?
> When I run it, I get "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64", i.e.

I get the same.


> it defines _FILE_OFFSET_BITS=64 which should be sufficient to get the
> prototypes and #defines from zlib.h, right?

Incorrect.

That gets only these:
#if _FILE_OFFSET_BITS == 64
#  define gzopen gzopen64
#  define gzseek gzseek64
#  define gztell gztell64
#  define adler32_combine adler32_combine64
#  define crc32_combine crc32_combine64
#else

Not these:
#ifdef _LARGEFILE64_SOURCE
   ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
   ZEXTERN off64_t ZEXPORT gzseek64 OF((gzFile, off64_t, int));
   ZEXTERN off64_t ZEXPORT gztell64 OF((gzFile));
   ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off64_t));
   ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off64_t));
#endif

Compiler was complaining about missing gz*64() function declarations.


>> And:
>> $ sdl-config --cflags
>> -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
>>
 > So sdl-config brings in _GNU_SOURCE which brings in LFS, C99 etc.
>
> Ok, ... but this somehow does not feel right either. It should be up to
> the program to select this define, and not up to the library!?!

Agree.  I give "fail" for both sdl-config and CMake. :-)


	- Eero



More information about the hatari-devel mailing list