Cross-emerge of media-libs/libsdl2-2.0.14-r1 for target x86_64-w64-mingw32 stops with error messages (full log will be attached later): libtool: compile: x86_64-w64-mingw32-gcc -O2 -pipe -DUSING_GENERATED_CONFIG_H -I./include -idirafter ./src/video/khronos -msse3 -Wall -fno-strict-aliasing -Wdeclaration-after-statement -Werror=declaration-after-statement -I./src/hidapi/hidapi -MMD -MT build/SDL_windowsjoystick.lo -c src/joystick/windows/SDL_windowsjoystick.c -DDLL_EXPORT -DPIC -o build/.libs/SDL_windowsjoystick.o src/joystick/windows/SDL_rawinputjoystick.c:282:5: error: unknown type name ‘XINPUT_STATE_EX’ 282 | XINPUT_STATE_EX state; | ^~~~~~~~~~~~~~~ Reproducible: Always Steps to Reproduce: 1. x86_64-w64-mingw32-emerge -1 =media-libs/libsdl2-2.0.14-r1 Actual Results: Build stops with errors and does not complete. Expected Results: Build completes without errors. emerge --info: Portage 3.0.18 (python 3.9.5-final-0, embedded, gcc-11.1.0, unavailable, 5.4.72-gentoo x86_64) ================================================================= System uname: Linux-5.4.72-gentoo-x86_64-Intel-R-_Core-TM-2_CPU_U7500_@_1.06GHz-with-glibc2.33 KiB Mem: 1516756 total, 382644 free KiB Swap: 49351676 total, 49043436 free Timestamp of repository gentoo: Sat, 15 May 2021 03:05:25 +0000 sh bash 5.1_p8 ld GNU ld (Gentoo 2.36.1 p3) 2.36.1 Repositories: gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-metamanifest: yes sync-rsync-verify-jobs: 1 sync-rsync-verify-max-age: 24 sync-rsync-extra-opts: ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -fomit-frame-pointer" CHOST="x86_64-w64-mingw32" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -pipe -fomit-frame-pointer" DISTDIR="/var/cache/distfiles" FCFLAGS="-Os -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news nodoc noinfo noman parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-Os -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LDFLAGS="" LINGUAS="en" PKGDIR="/usr/x86_64-w64-mingw32/packages/" PORTAGE_CONFIGROOT="/usr/x86_64-w64-mingw32/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/usr/x86_64-w64-mingw32/tmp/" USE="amd64 kdrive minimal multicall zlib" ELIBC="mingw" INPUT_DEVICES="evdev" KERNEL="Winnt" USERLAND="GNU" VIDEO_CARDS="fbdev" Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, ENV_UNSET, INSTALL_MASK, LANG, LC_ALL, MAKEOPTS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS
Created attachment 708816 [details] Full build log
Haven't been keeping up with the libsdl2 mingw issues but =media-libs/libsdl2-2.0.12-r2 should still work meanwhile.
Created attachment 709173 [details, diff] Do not set enable_joystick_rawinput Seems to be built successfully by modifying the configure script so that it does not set the enable_joystick_rawinput variable. A patch is attached for that. As the RAWINPUT driver is a new feature from 2.0.14, I believe this patch does not cause a regression in terms of upgrading from 2.0.12.
FWIW, while this is still a problem, the newer version libsdl2/libsdl2-2.0.16 seems to build successfully without any errors.
I don't think this is a problem now. It was caused by -D__LINUX__ being erroneously added to the ebuild to fix a problem that turned out to be something completely unrelated to SDL. This was later removed, but accidentally added again. I finally removed all traces of it when I did the 2.0.16 bump.