From 35783694c625b8aa3fa641ab752650313f9ad658 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Sat, 9 Dec 2017 23:38:20 +0100 Subject: [PATCH] sigrok-cross-mingw: 64bit: Generate missing libpython34.a. This might fix (parts of) bug #1069, but tests so far have shown issues, so this might need more work. It's a start, though. --- cross-compile/mingw/README | 2 +- cross-compile/mingw/sigrok-cross-mingw | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/cross-compile/mingw/README b/cross-compile/mingw/README index 9ace134..7620f62 100644 --- a/cross-compile/mingw/README +++ b/cross-compile/mingw/README @@ -46,7 +46,7 @@ Build all required packages: $ make MXE_TARGETS=i686-w64-mingw32.static.posix \ MXE_PLUGIN_DIRS=plugins/examples/qt5-freeze \ gcc glib libzip libusb1 libftdi1 glibmm qtbase qtimageformats qtsvg \ - boost check qtbase_CONFIGURE_OPTS='-no-sql-mysql' + boost check gendef qtbase_CONFIGURE_OPTS='-no-sql-mysql' This will take a while. diff --git a/cross-compile/mingw/sigrok-cross-mingw b/cross-compile/mingw/sigrok-cross-mingw index c5c3a39..8e5a618 100755 --- a/cross-compile/mingw/sigrok-cross-mingw +++ b/cross-compile/mingw/sigrok-cross-mingw @@ -120,6 +120,19 @@ EOF $WGET http://www.sigrok.org/tmp/python34_$TARGET.dll -O $PREFIX/python34.dll $WGET http://www.sigrok.org/tmp/python34_$TARGET.zip -O $PREFIX/python34.zip +# In order to link against Python we need libpython34.a. +# The upstream Python 32bit installer ships this, the x86_64 installer +# doesn't. Thus, we generate the file manually here. +if [ $TARGET = "x86_64" ]; then + cp $PREFIX/python34.dll . + $MXE/usr/$TARGET-w64-mingw32.static.posix/bin/gendef python34.dll + $MXE/usr/bin/$TARGET-w64-mingw32.static.posix-dlltool \ + --dllname python34.dll --def python34.def \ + --output-lib libpython34.a + mv -f libpython34.a $PREFIX/Python34/libs + rm -f python34.dll +fi + # Zadig (we ship this with frontends for easy driver switching). $WGET http://zadig.akeo.ie/downloads/zadig.exe -O $PREFIX/zadig.exe $WGET http://zadig.akeo.ie/downloads/zadig_xp.exe -O $PREFIX/zadig_xp.exe -- 2.30.2