DeadSix27 / python_cross_compile_script

Easy to use Linux to Windows cross compile script.
Mozilla Public License 2.0
31 stars 9 forks source link

configure error building glib2 #117

Closed hydra3333 closed 1 year ago

hydra3333 commented 4 years ago

Hello.

I just freshly cloned this git into an Ubuntu 18.04.3 VM and ran ./cross_compiler.py --force -p ffmpeg and received an error building glib2 (log below)

Advice on how to fix that would be welcomed.

[00:17:00][INFO] Building dependency 'libelf': Done!
[00:17:00][INFO] Building dependency 'glib2'
[00:17:03][INFO] Downloading glib-2.58.3.tar.xz (https://download.gnome.org/sources/glib/2.58/glib-2.58.3.tar.xz)
[00:17:05][INFO] Requesting : https://download.gnome.org/sources/glib/2.58/glib-2.58.3.tar.xz - 4.6MiB
Downloading: glib-2.58.3.tar.xz        N/A% []   0.0 B/  4.6 MiB |  0.0 s/B | ETA:  --:--:--
Downloading: glib-2.58.3.tar.xz          0% []  13.0 KiB/  4.6 MiB | 27.9 KiB/s | ETA:   0:02:49
Downloading: glib-2.58.3.tar.xz          0% []  42.0 KiB/  4.6 MiB | 45.0 KiB/s | ETA:   0:01:44
Downloading: glib-2.58.3.tar.xz          2% []  98.0 KiB/  4.6 MiB | 70.0 KiB/s | ETA:   0:01:06
Downloading: glib-2.58.3.tar.xz          4% [] 211.0 KiB/  4.6 MiB |113.1 KiB/s | ETA:   0:00:40
Downloading: glib-2.58.3.tar.xz          9% [] 438.0 KiB/  4.6 MiB |187.5 KiB/s | ETA:   0:00:22
Downloading: glib-2.58.3.tar.xz         18% [] 890.0 KiB/  4.6 MiB |375.1 KiB/s | ETA:   0:00:12
Downloading: glib-2.58.3.tar.xz         32% []   1.5 MiB/  4.6 MiB |375.1 KiB/s | ETA:   0:00:05
Downloading: glib-2.58.3.tar.xz         37% []   1.8 MiB/  4.6 MiB |749.8 KiB/s | ETA:   0:00:05
Downloading: glib-2.58.3.tar.xz         50% []   2.3 MiB/  4.6 MiB |749.8 KiB/s | ETA:   0:00:03
Downloading: glib-2.58.3.tar.xz         65% []   3.1 MiB/  4.6 MiB |  1.2 MiB/s | ETA:   0:00:01
Downloading: glib-2.58.3.tar.xz         71% []   3.3 MiB/  4.6 MiB |  1.5 MiB/s | ETA:   0:00:01
Downloading: glib-2.58.3.tar.xz         74% []   3.5 MiB/  4.6 MiB |  1.4 MiB/s | ETA:   0:00:01
Downloading: glib-2.58.3.tar.xz        100% []   4.6 MiB/  4.6 MiB |  1.4 MiB/s | Time:  0:00:04
[00:17:10][INFO] Comparing hashes..
[00:17:10][INFO] Hashes matched: 8f43c...e7481 (local) == 8f43c...e7481 (remote)
[00:17:10][INFO] Unpacking glib-2.58.3.tar.xz
[00:17:10][INFO] Copying patch from '/home/u/Desktop/ds27/patches/glib2/0001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch' to '/home/u/Desktop/ds27/workdir/x86_64/glib-2.58.3/0001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch'
[00:17:10][INFO] Patching source using: '0001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch'
patching file glib/gstdio.c
Hunk #1 succeeded at 770 (offset 12 lines).
Hunk #2 succeeded at 785 (offset 12 lines).
Hunk #3 succeeded at 940 (offset 12 lines).
Hunk #4 succeeded at 952 (offset 12 lines).
Hunk #5 succeeded at 1436 (offset 12 lines).
[00:17:10][INFO] Copying patch from '/home/u/Desktop/ds27/patches/glib2/0001-win32-Make-the-static-build-work-with-MinGW-when-pos.patch' to '/home/u/Desktop/ds27/workdir/x86_64/glib-2.58.3/0001-win32-Make-the-static-build-work-with-MinGW-when-pos.patch'
[00:17:10][INFO] Patching source using: '0001-win32-Make-the-static-build-work-with-MinGW-when-pos.patch'
patching file glib/glib-init.c
Hunk #1 succeeded at 265 (offset -3 lines).
Hunk #2 succeeded at 297 (offset -3 lines).
patching file gobject/gtype.c
[00:17:10][INFO] Copying patch from '/home/u/Desktop/ds27/patches/glib2/0001-disable-some-tests-when-static.patch' to '/home/u/Desktop/ds27/workdir/x86_64/glib-2.58.3/0001-disable-some-tests-when-static.patch'
[00:17:10][INFO] Patching source using: '0001-disable-some-tests-when-static.patch'
patching file gio/tests/meson.build
[00:17:10][INFO] Copying patch from '/home/u/Desktop/ds27/patches/glib2/0001-Revert-tests-W32-ugly-fix-for-sscanf-format.patch' to '/home/u/Desktop/ds27/workdir/x86_64/glib-2.58.3/0001-Revert-tests-W32-ugly-fix-for-sscanf-format.patch'
[00:17:10][INFO] Patching source using: '0001-Revert-tests-W32-ugly-fix-for-sscanf-format.patch'
patching file tests/type-test.c
[00:17:10][INFO] Running post-patch-command: 'if [ ! -f "INSTALL" ] ; then touch INSTALL ; fi'
[00:17:10][INFO] Running post-patch-command: 'echo '<<EOF
EXTRA_DIST =
CLEANFILES =
EOF' > gtk-doc.make'
[00:17:10][INFO] Running post-patch-command: 'sed -i.bak "s/SUBDIRS = . m4macros glib gmodule gthread gobject gio po docs tests subprojects/SUBDIRS = . m4macros glib gmodule gthread gobject gio po subprojects/" Makefile.am'
[00:17:10][INFO] Running post-patch-command: 'autoreconf -fiv'
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4macros ${ACLOCAL_FLAGS}
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4macros'.
libtoolize: copying file 'm4macros/libtool.m4'
libtoolize: copying file 'm4macros/ltoptions.m4'
libtoolize: copying file 'm4macros/ltsugar.m4'
libtoolize: copying file 'm4macros/ltversion.m4'
libtoolize: copying file 'm4macros/lt~obsolete.m4'
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:112: installing './compile'
configure.ac:118: installing './config.guess'
configure.ac:118: installing './config.sub'
configure.ac:66: installing './install-sh'
configure.ac:66: installing './missing'
parallel-tests: installing './test-driver'
gio/Makefile.am: installing './depcomp'
gio/gdbus-2.0/codegen/Makefile.am:6: installing './py-compile'
autoreconf: Leaving directory `.'
[00:17:25][INFO][AUTOCONF] Configuring 'glib2' with: --host=x86_64-w64-mingw32 --prefix=/home/u/Desktop/ds27/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32 --disable-shared --enable-static --with-pcre=external --with-threads=posix --disable-fam --disable-libmount
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for x86_64-w64-mingw32-strip... x86_64-w64-mingw32-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '1000' is supported by ustar format... yes
checking whether GID '1000' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... yes
checking whether make supports nested variables... (cached) yes
checking for x86_64-w64-mingw32-gcc... x86_64-w64-mingw32-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-w64-mingw32-gcc accepts -g... yes
checking for x86_64-w64-mingw32-gcc option to accept ISO C89... none needed
checking whether x86_64-w64-mingw32-gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of x86_64-w64-mingw32-gcc... gcc3
checking how to run the C preprocessor... x86_64-w64-mingw32-gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-w64-mingw32
checking for Win32... yes
checking for the Android... no
checking for Mac OS X Carbon support... no
checking for Mac OS X Cocoa support... no
checking for x86_64-w64-mingw32-windres... x86_64-w64-mingw32-windres
checking for x86_64-w64-mingw32-nm... x86_64-w64-mingw32-nm
checking for x86_64-w64-mingw32-ranlib... x86_64-w64-mingw32-ranlib
checking for x86_64-w64-mingw32-dlltool... x86_64-w64-mingw32-dlltool
checking for lib.exe... no
checking for x86_64-w64-mingw32-c++... x86_64-w64-mingw32-c++
checking whether we are using the GNU C++ compiler... yes
checking whether x86_64-w64-mingw32-c++ accepts -g... yes
checking dependency style of x86_64-w64-mingw32-c++... gcc3
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for x86_64-w64-mingw32-pkg-config... no
checking for pkg-config... /home/u/Desktop/ds27/workdir/toolchain/x86_64-w64-mingw32/bin/pkg-config
configure: WARNING: using cross tools not prefixed with host triplet
checking pkg-config is at least version 0.16... yes
checking how to get MSVC-compatible struct packing... -mms-bitfields
checking for gawk... (cached) mawk
checking for a Python interpreter with version >= 2.7... python
checking for python... /usr/bin/python
checking for python version... 2.7
checking for python platform... linux2
checking for python script directory... ${prefix}/lib/python2.7/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python2.7/site-packages
checking for ZLIB... yes
checking for LIBFFI... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking for LC_MESSAGES... no
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking for ngettext in libc... no
checking for bindtextdomain in -lintl... no
checking if -liconv is needed to use gettext... 
checking for ngettext in -lintl... no
configure: error: 
*** You must have either have gettext support in your C library, or use the
*** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html)

[00:17:26][ERROR] Error [1] running process: './configure --host=x86_64-w64-mingw32 --prefix=/home/u/Desktop/ds27/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32 --disable-shared --enable-static --with-pcre=external --with-threads=posix --disable-fam --disable-libmount' in '/home/u/Desktop/ds27/workdir/x86_64/glib-2.58.3'
[00:17:26][ERROR] You can try deleting the product/dependency folder: '/home/u/Desktop/ds27/workdir/x86_64/glib-2.58.3' and re-run the script
DeadSix27 commented 4 years ago

i removed glib/lensfun/gettext cuz im too lazy to fix it and never use it anyway, hadn't committed it yet, now i did. https://github.com/DeadSix27/python_cross_compile_script/commit/38cceb98008546d5535aeb7f4b82ba3305dbfd02

hydra3333 commented 4 years ago

thanks