[physfs] [BUG] error compiling physfs

Jonas Kulla nyocurio at gmail.com
Sat Oct 10 05:00:09 EDT 2015


2015-10-10 1:54 GMT+02:00 Rm Beer <rmbeer2 at gmail.com>:

> This error occur where i compiling from linux to windows using mingw
> (x86_64 compiler).
>
> I have the ZLIB, in both side, in the default file system directory and in
> ZLIB_LIBRARY variable of shell to a personal ZLIB library from user count.
> The ZLIB_LIBRARY not recognized...
>
> $ cmake .. --host=x86_64-w64-mingw32
>       or
> $ export ZLIB_LIBRARY=../../zlib64/bin
> $ cmake .. --host=x86_64-w64-mingw32
> :
> :
> :
> -- Could NOT find ZLIB (missing:  ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
> -- Found Doxygen: /usr/bin/doxygen (found version "1.8.10")
> -- PhysicsFS will build with the following options:
> --   ZIP support: enabled
> --   7zip support: enabled
> --   GRP support: enabled
> --   WAD support: enabled
> --   HOG support: enabled
> --   MVL support: enabled
> --   QPAK support: enabled
> --   CD-ROM drive support: enabled
> --   Thread safety: enabled
> --   Build own zlib: enabled
> --   Build static library: enabled
> --   Build shared library: enabled
> --   Build wxWidgets test program: disabled
> --   Build stdio test program: enabled
> --     Use readline in test program: disabled
> :
> :
> :
> $ make
> :
> :
> :
> [ 15%] Building C object CMakeFiles/physfs.dir/archivers/lzma.obj
> ${HOME}/physfs-2.0.3/archivers/lzma.c: En la función ‘SzFileReadImp’:
> ${HOME}/physfs-2.0.3/archivers/lzma.c:133:46: error: conversión de puntero
> a entero de tamaño diferente [-Werror=pointer-to-int-cast]
>      FileInputStream *s = (FileInputStream *)((unsigned long)object -
> offsetof(F
>                                               ^
> ${HOME}/physfs-2.0.3/archivers/lzma.c: En la función ‘SzFileSeekImp’:
> ${HOME}/physfs-2.0.3/archivers/lzma.c:148:46: error: conversión de puntero
> a entero de tamaño diferente [-Werror=pointer-to-int-cast]
>      FileInputStream *s = (FileInputStream *)((unsigned long)object -
> offsetof(F
>                                               ^
> cc1: todos los avisos se tratan como errores
> CMakeFiles/physfs.dir/build.make:363: fallo en las instrucciones para el
> objetivo 'CMakeFiles/physfs.dir/archivers/lzma.obj'
> make[2]: *** [CMakeFiles/physfs.dir/archivers/lzma.obj] Error 1
> CMakeFiles/Makefile2:99: fallo en las instrucciones para el objetivo
> 'CMakeFiles/physfs.dir/all'
> make[1]: *** [CMakeFiles/physfs.dir/all] Error 2
> Makefile:127: fallo en las instrucciones para el objetivo 'all'
> make: *** [all] Error 2
>

When cmake asks for "env var looking things" in all caps, it means define
directives most of the time.
So try it like this instead:

cmake -DZLIB_LIBRARY=/path/to/lib -DZLIB_INCLUDE_DIR=/path/to/include ..

on another note, when posting your logs online, it's best to compile with
LC_ALL=C
so the warnings/errors are in English instead of your local language.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/physfs/attachments/20151010/95be139d/attachment.html>


More information about the physfs mailing list