Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
brettrjones-github opened this issue Jun 5, 2023 · 1 comment

Comments

@brettrjones-github
Copy link

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 libsdl-org/SDL#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 brettrjones-github changed the title Mutiple issues when building mxe x86_64-w64-mingw32.static on Ubunto 22.04 (SDL2 and aubio) Mutiple issues when building mxe x86_64-w64-mingw32.static on Ubuntu 22.04 (SDL2 and aubio) Jun 5, 2023
@nikonowiczp
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants