libsdl-org / SDL_image

Image decoding for many popular formats for Simple Directmedia Layer.
zlib License
513 stars 174 forks source link

Build fails on MSYS2 #425

Closed MarcelskyXD closed 5 months ago

MarcelskyXD commented 5 months ago

I was trying to build SDL_image today but i get a lot of errors

Configure log:

-- Configuring SDL3_image 3.0.0
-- libavif-1.0 or compatible not found
-- libavif NOT found
-- Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR)
-- libtiff NOT found
-- Could NOT find webp (missing: webp_LIBRARY webp_INCLUDE_PATH webpdemux_LIBRARY webpdemux_INCLUDE_PATH)
-- libwebp NOT found
-- SDL3_image backends:
-- - enabled:  stb bmp gif jpg lbm pcx png pnm qoi svg tga xcf xpm xv
-- - disabled: imageio wic avif jxl tif webp
-- Configuring done (1.6s)
-- Generating done (0.1s)
-- Build files have been written to: C:/Users/Marcel/Downloads/SDL_image-main/build

Build log:

[1/27] Building C object CMakeFiles/SDL3_image-shared.dir/src/IMG_avif.c.obj
FAILED: CMakeFiles/SDL3_image-shared.dir/src/IMG_avif.c.obj
C:\msys64\ucrt64\bin\cc.exe -DBUILD_SDL -DDLL_EXPORT -DLOAD_BMP -DLOAD_GIF -DLOAD_JPG -DLOAD_LBM -DLOAD_PCX -DLOAD_PNG -DLOAD_PNM -DLOAD_QOI -DLOAD_SVG -DLOAD_TGA -DLOAD_XCF -DLOAD_XPM -DLOAD_XV -DSDL_BUILD_MAJOR_VERSION=3 -DSDL_BUILD_MICRO_VERSION=0 -DSDL_BUILD_MINOR_VERSION=0 -DSDL_IMAGE_SAVE_JPG=1 -DSDL_IMAGE_SAVE_PNG=1 -DUSE_STBIMAGE -IC:/Users/Marcel/Downloads/SDL_image-main/include -isystem "C:/Program Files (x86)/SDL3/include" -isystem "C:/Program Files (x86)/SDL3/include/SDL3" -fvisibility=hidden -Wall -Wextra -MD -MT CMakeFiles/SDL3_image-shared.dir/src/IMG_avif.c.obj -MF CMakeFiles\SDL3_image-shared.dir\src\IMG_avif.c.obj.d -o CMakeFiles/SDL3_image-shared.dir/src/IMG_avif.c.obj -c C:/Users/Marcel/Downloads/SDL_image-main/src/IMG_avif.c
In file included from C:/Program Files (x86)/SDL3/include/SDL3/SDL.h:80,
                 from C:/Users/Marcel/Downloads/SDL_image-main/include/SDL3_image/SDL_image.h:32,
                 from C:/Users/Marcel/Downloads/SDL_image-main/src/IMG_avif.c:24:
C:/Users/Marcel/Downloads/SDL_image-main/include/SDL3_image/SDL_image.h:89:23: error: unknown type name 'SDL_version_renamed_SDL_Version'
   89 | extern DECLSPEC const SDL_version * SDLCALL IMG_Linked_Version(void);
      |                       ^~~~~~~~~~~
[2/27] Building C object CMakeFiles/SDL3_image-shared.dir/src/IMG.c.obj
FAILED: CMakeFiles/SDL3_image-shared.dir/src/IMG.c.obj
C:\msys64\ucrt64\bin\cc.exe -DBUILD_SDL -DDLL_EXPORT -DLOAD_BMP -DLOAD_GIF -DLOAD_JPG -DLOAD_LBM -DLOAD_PCX -DLOAD_PNG -DLOAD_PNM -DLOAD_QOI -DLOAD_SVG -DLOAD_TGA -DLOAD_XCF -DLOAD_XPM -DLOAD_XV -DSDL_BUILD_MAJOR_VERSION=3 -DSDL_BUILD_MICRO_VERSION=0 -DSDL_BUILD_MINOR_VERSION=0 -DSDL_IMAGE_SAVE_JPG=1 -DSDL_IMAGE_SAVE_PNG=1 -DUSE_STBIMAGE -IC:/Users/Marcel/Downloads/SDL_image-main/include -isystem "C:/Program Files (x86)/SDL3/include" -isystem "C:/Program Files (x86)/SDL3/include/SDL3" -fvisibility=hidden -Wall -Wextra -MD -MT CMakeFiles/SDL3_image-shared.dir/src/IMG.c.obj -MF CMakeFiles\SDL3_image-shared.dir\src\IMG.c.obj.d -o CMakeFiles/SDL3_image-shared.dir/src/IMG.c.obj -c C:/Users/Marcel/Downloads/SDL_image-main/src/IMG.c
In file included from C:/Program Files (x86)/SDL3/include/SDL3/SDL.h:80,
                 from C:/Users/Marcel/Downloads/SDL_image-main/include/SDL3_image/SDL_image.h:32,
                 from C:/Users/Marcel/Downloads/SDL_image-main/src/IMG.c:24:
C:/Users/Marcel/Downloads/SDL_image-main/include/SDL3_image/SDL_image.h:89:23: error: unknown type name 'SDL_version_renamed_SDL_Version'
   89 | extern DECLSPEC const SDL_version * SDLCALL IMG_Linked_Version(void);
      |                       ^~~~~~~~~~~
C:/Users/Marcel/Downloads/SDL_image-main/src/IMG.c:93:7: error: unknown type name 'SDL_version_renamed_SDL_Version'
   93 | const SDL_version *IMG_Linked_Version(void)
      |       ^~~~~~~~~~~
C:/Users/Marcel/Downloads/SDL_image-main/src/IMG.c: In function 'IMG_Linked_Version':
C:/Users/Marcel/Downloads/SDL_image-main/src/IMG.c:95:12: error: unknown type name 'SDL_version_renamed_SDL_Version'
   95 |     static SDL_version linked_version;
      |            ^~~~~~~~~~~
C:/Users/Marcel/Downloads/SDL_image-main/include/SDL3_image/SDL_image.h:54:8: error: request for member 'major' in something not a structure or union
   54 |     (X)->major = SDL_IMAGE_MAJOR_VERSION;           \
      |        ^~
C:/Users/Marcel/Downloads/SDL_image-main/src/IMG.c:96:5: note: in expansion of macro 'SDL_IMAGE_VERSION'
   96 |     SDL_IMAGE_VERSION(&linked_version);
      |     ^~~~~~~~~~~~~~~~~
C:/Users/Marcel/Downloads/SDL_image-main/include/SDL3_image/SDL_image.h:55:8: error: request for member 'minor' in something not a structure or union
   55 |     (X)->minor = SDL_IMAGE_MINOR_VERSION;           \
      |        ^~
C:/Users/Marcel/Downloads/SDL_image-main/src/IMG.c:96:5: note: in expansion of macro 'SDL_IMAGE_VERSION'
   96 |     SDL_IMAGE_VERSION(&linked_version);
      |     ^~~~~~~~~~~~~~~~~
C:/Users/Marcel/Downloads/SDL_image-main/include/SDL3_image/SDL_image.h:56:8: error: request for member 'patch' in something not a structure or union
   56 |     (X)->patch = SDL_IMAGE_PATCHLEVEL;              \
      |        ^~
C:/Users/Marcel/Downloads/SDL_image-main/src/IMG.c:96:5: note: in expansion of macro 'SDL_IMAGE_VERSION'
   96 |     SDL_IMAGE_VERSION(&linked_version);
      |     ^~~~~~~~~~~~~~~~~
[3/27] Building C object CMakeFiles/SDL3_image-shared.dir/src/IMG_gif.c.obj
FAILED: CMakeFiles/SDL3_image-shared.dir/src/IMG_gif.c.obj
C:\msys64\ucrt64\bin\cc.exe -DBUILD_SDL -DDLL_EXPORT -DLOAD_BMP -DLOAD_GIF -DLOAD_JPG -DLOAD_LBM -DLOAD_PCX -DLOAD_PNG -DLOAD_PNM -DLOAD_QOI -DLOAD_SVG -DLOAD_TGA -DLOAD_XCF -DLOAD_XPM -DLOAD_XV -DSDL_BUILD_MAJOR_VERSION=3 -DSDL_BUILD_MICRO_VERSION=0 -DSDL_BUILD_MINOR_VERSION=0 -DSDL_IMAGE_SAVE_JPG=1 -DSDL_IMAGE_SAVE_PNG=1 -DUSE_STBIMAGE -IC:/Users/Marcel/Downloads/SDL_image-main/include -isystem "C:/Program Files (x86)/SDL3/include" -isystem "C:/Program Files (x86)/SDL3/include/SDL3" -fvisibility=hidden -Wall -Wextra -MD -MT CMakeFiles/SDL3_image-shared.dir/src/IMG_gif.c.obj -MF CMakeFiles\SDL3_image-shared.dir\src\IMG_gif.c.obj.d -o CMakeFiles/SDL3_image-shared.dir/src/IMG_gif.c.obj -c C:/Users/Marcel/Downloads/SDL_image-main/src/IMG_gif.c
In file included from C:/Program Files (x86)/SDL3/include/SDL3/SDL.h:80,
                 from C:/Users/Marcel/Downloads/SDL_image-main/include/SDL3_image/SDL_image.h:32,
                 from C:/Users/Marcel/Downloads/SDL_image-main/src/IMG_gif.c:24:
C:/Users/Marcel/Downloads/SDL_image-main/include/SDL3_image/SDL_image.h:89:23: error: unknown type name 'SDL_version_renamed_SDL_Version'
   89 | extern DECLSPEC const SDL_version * SDLCALL IMG_Linked_Version(void);
      |                       ^~~~~~~~~~~
[4/27] Building C object CMakeFiles/SDL3_image-shared.dir/src/IMG_bmp.c.obj
FAILED: CMakeFiles/SDL3_image-shared.dir/src/IMG_bmp.c.obj
C:\msys64\ucrt64\bin\cc.exe -DBUILD_SDL -DDLL_EXPORT -DLOAD_BMP -DLOAD_GIF -DLOAD_JPG -DLOAD_LBM -DLOAD_PCX -DLOAD_PNG -DLOAD_PNM -DLOAD_QOI -DLOAD_SVG -DLOAD_TGA -DLOAD_XCF -DLOAD_XPM -DLOAD_XV -DSDL_BUILD_MAJOR_VERSION=3 -DSDL_BUILD_MICRO_VERSION=0 -DSDL_BUILD_MINOR_VERSION=0 -DSDL_IMAGE_SAVE_JPG=1 -DSDL_IMAGE_SAVE_PNG=1 -DUSE_STBIMAGE -IC:/Users/Marcel/Downloads/SDL_image-main/include -isystem "C:/Program Files (x86)/SDL3/include" -isystem "C:/Program Files (x86)/SDL3/include/SDL3" -fvisibility=hidden -Wall -Wextra -MD -MT CMakeFiles/SDL3_image-shared.dir/src/IMG_bmp.c.obj -MF CMakeFiles\SDL3_image-shared.dir\src\IMG_bmp.c.obj.d -o CMakeFiles/SDL3_image-shared.dir/src/IMG_bmp.c.obj -c C:/Users/Marcel/Downloads/SDL_image-main/src/IMG_bmp.c
In file included from C:/Program Files (x86)/SDL3/include/SDL3/SDL.h:80,
                 from C:/Users/Marcel/Downloads/SDL_image-main/include/SDL3_image/SDL_image.h:32,
                 from C:/Users/Marcel/Downloads/SDL_image-main/src/IMG_bmp.c:33:
C:/Users/Marcel/Downloads/SDL_image-main/include/SDL3_image/SDL_image.h:89:23: error: unknown type name 'SDL_version_renamed_SDL_Version'
   89 | extern DECLSPEC const SDL_version * SDLCALL IMG_Linked_Version(void);
      |                       ^~~~~~~~~~~
[5/27] Building C object CMakeFiles/SDL3_image-shared.dir/src/IMG_jpg.c.obj
FAILED: CMakeFiles/SDL3_image-shared.dir/src/IMG_jpg.c.obj
C:\msys64\ucrt64\bin\cc.exe -DBUILD_SDL -DDLL_EXPORT -DLOAD_BMP -DLOAD_GIF -DLOAD_JPG -DLOAD_LBM -DLOAD_PCX -DLOAD_PNG -DLOAD_PNM -DLOAD_QOI -DLOAD_SVG -DLOAD_TGA -DLOAD_XCF -DLOAD_XPM -DLOAD_XV -DSDL_BUILD_MAJOR_VERSION=3 -DSDL_BUILD_MICRO_VERSION=0 -DSDL_BUILD_MINOR_VERSION=0 -DSDL_IMAGE_SAVE_JPG=1 -DSDL_IMAGE_SAVE_PNG=1 -DUSE_STBIMAGE -IC:/Users/Marcel/Downloads/SDL_image-main/include -isystem "C:/Program Files (x86)/SDL3/include" -isystem "C:/Program Files (x86)/SDL3/include/SDL3" -fvisibility=hidden -Wall -Wextra -MD -MT CMakeFiles/SDL3_image-shared.dir/src/IMG_jpg.c.obj -MF CMakeFiles\SDL3_image-shared.dir\src\IMG_jpg.c.obj.d -o CMakeFiles/SDL3_image-shared.dir/src/IMG_jpg.c.obj -c C:/Users/Marcel/Downloads/SDL_image-main/src/IMG_jpg.c
In file included from C:/Program Files (x86)/SDL3/include/SDL3/SDL.h:80,
                 from C:/Users/Marcel/Downloads/SDL_image-main/include/SDL3_image/SDL_image.h:32,
                 from C:/Users/Marcel/Downloads/SDL_image-main/src/IMG_jpg.c:24:
C:/Users/Marcel/Downloads/SDL_image-main/include/SDL3_image/SDL_image.h:89:23: error: unknown type name 'SDL_version_renamed_SDL_Version'
   89 | extern DECLSPEC const SDL_version * SDLCALL IMG_Linked_Version(void);
      |                       ^~~~~~~~~~~
[6/27] Building C object CMakeFiles/SDL3_image-shared.dir/src/IMG_jxl.c.obj
FAILED: CMakeFiles/SDL3_image-shared.dir/src/IMG_jxl.c.obj
C:\msys64\ucrt64\bin\cc.exe -DBUILD_SDL -DDLL_EXPORT -DLOAD_BMP -DLOAD_GIF -DLOAD_JPG -DLOAD_LBM -DLOAD_PCX -DLOAD_PNG -DLOAD_PNM -DLOAD_QOI -DLOAD_SVG -DLOAD_TGA -DLOAD_XCF -DLOAD_XPM -DLOAD_XV -DSDL_BUILD_MAJOR_VERSION=3 -DSDL_BUILD_MICRO_VERSION=0 -DSDL_BUILD_MINOR_VERSION=0 -DSDL_IMAGE_SAVE_JPG=1 -DSDL_IMAGE_SAVE_PNG=1 -DUSE_STBIMAGE -IC:/Users/Marcel/Downloads/SDL_image-main/include -isystem "C:/Program Files (x86)/SDL3/include" -isystem "C:/Program Files (x86)/SDL3/include/SDL3" -fvisibility=hidden -Wall -Wextra -MD -MT CMakeFiles/SDL3_image-shared.dir/src/IMG_jxl.c.obj -MF CMakeFiles\SDL3_image-shared.dir\src\IMG_jxl.c.obj.d -o CMakeFiles/SDL3_image-shared.dir/src/IMG_jxl.c.obj -c C:/Users/Marcel/Downloads/SDL_image-main/src/IMG_jxl.c
In file included from C:/Program Files (x86)/SDL3/include/SDL3/SDL.h:80,
                 from C:/Users/Marcel/Downloads/SDL_image-main/include/SDL3_image/SDL_image.h:32,
                 from C:/Users/Marcel/Downloads/SDL_image-main/src/IMG_jxl.c:24:
C:/Users/Marcel/Downloads/SDL_image-main/include/SDL3_image/SDL_image.h:89:23: error: unknown type name 'SDL_version_renamed_SDL_Version'
   89 | extern DECLSPEC const SDL_version * SDLCALL IMG_Linked_Version(void);
      |                       ^~~~~~~~~~~
ninja: build stopped: subcommand failed.

Commands i used for configuring and building: cmake -Bbuild . -G Ninja cmake --build build

sezero commented 5 months ago

MSYS is irrelevant. @slouken should update after SDL3 changes.

Possibly all satellite libraries need updating.

slouken commented 5 months ago

Updated, thanks!

sezero commented 5 months ago

SDL_net and SDL_rtf probably need updating, too.

slouken commented 5 months ago

Updated!