mxe icon indicating copy to clipboard operation
mxe copied to clipboard

Mutiple issues when building mxe x86_64-w64-mingw32.static on Ubuntu 22.04 (SDL2 and aubio)

Open brettrjones-github opened this issue 1 year ago • 1 comments

steps to reproduce Ubuntu 22.04

=== install mxe dependencies === sudo apt install mingw-w64 sudo apt install build-essential libgl1-mesa-dev export DEBIAN_FRONTEND=noninteractive sudo apt update sudo apt upgrade sudo apt install
autoconf automake autopoint bash bison build-essential bzip2 flex
g++ g++-multilib gettext git gperf intltool iputils-ping libc6-dev-i386
libffi-dev libgdk-pixbuf2.0-dev libltdl-dev libssl-dev libtool-bin
libxml-parser-perl lzip make nano openssl p7zip-full patch perl
pkg-config ruby scons sed unzip wget xz-utils libgl-dev
python3 python3-mako python3-pkg-resources python3-setuptools python-is-python3

sudo apt -y autoremove sudo apt -y autoclean sudo apt -y clean sudo rm -rf /var/lib/apt/lists/*

=== compile mxe === git clone https://github.com/mxe/mxe.git cd ~/mxe

make MXE_TARGETS=x86_64-w64-mingw32.static wait a very very long time for mxe to compile

if src/joystick/windows/SDL_windows_gaming_input.c fails to compile it needs this change https://github.com/libsdl-org/SDL/issues/5589 fix sdl2 option 1 open ~/mxe/pkg/sdl2-release-2.0.20.tar.gz and edit /SDL-release-2.0.20/src/joystick/windows/SDL_windows_gaming_input.c add after header declaration #include <roapi.h>

#ifdef MINGW32 #define __FIReference_1_int __FIReference_1_INT32 #define __FIReference_1_int_get_Value __FIReference_1_INT32_get_Value #define __FIReference_1_int_Release __FIReference_1_INT32_Release #endif

save and generate a new chacksum with sha256sum sdl2-release-2.0.20.tar.gz mine was 49f9cb1ea871a7087d6a63ef8123414229668ea29f3467b0fb3ee8e1622ba781

edit mxe/src/sdl2.make change $(PKG)_CHECKSUM := 2a026753af9b03fca043824bca8341f74921a836d28729e0c31aa262202a83c6 to $(PKG)_CHECKSUM := 49f9cb1ea871a7087d6a63ef8123414229668ea29f3467b0fb3ee8e1622ba781

run make MXE_TARGETS=x86_64-w64-mingw32.static again

if aubio fails to compile c fails to compile tried this change https://github.com/mxe/mxe/issues/841 but it did not work edit ~/mxe/Makefile after line unexport $(filter-out $(ENV_WHITELIST),$(shell env | cut -d '=' -f1)) add #disable wine, see https://github.com/mxe/mxe/issues/841 export WINEPREFIX := /dev/null

save and run make MXE_TARGETS=x86_64-w64-mingw32.static again

the error still is Failed to build package aubio for target x86_64-w64-mingw32.static!


ret=[x for x in self.ant_iter(accept=accept,pats=[to_pat(incl),to_pat(excl)],maxdepth=kw.get('maxdepth',25),dir=dir,src=src,remove=kw.get('remove',True))]

File "/home/nolimit/mxe/tmp-aubio-x86_64-w64-mingw32.static/aubio-0.4.2.build_/waf-1.8.17/.waf3-1.8.17-daa67386b71d29ad7cda321d44eb497a/waflib/Node.py", line 361, in

ret=[x for x in self.ant_iter(accept=accept,pats=[to_pat(incl),to_pat(excl)],maxdepth=kw.get('maxdepth',25),dir=dir,src=src,remove=kw.get('remove',True))]

RuntimeError: generator raised StopIteration

make[1]: *** [Makefile:904: build-only-aubio_x86_64-w64-mingw32.static] Error 2

make[1]: Leaving directory '/home/nolimit/mxe'

brettrjones-github avatar Jun 05 '23 10:06 brettrjones-github

I have exactly the same issue. Hovewer if try to compile with a commit 7f7be52 it works. This is the last comming before upgrading mingw-w64 from 10.0 to 11.0, so the new version of mingw is likely a problem.

nikonowiczp avatar Jun 07 '23 08:06 nikonowiczp