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

mingw-w64-gtk3: fails to build i686 packages. "GISCAN GdkWin32-3.0.gir": .exe fails with non-zero exit status -1073741819 #845

Closed
achadwick opened this issue Oct 22, 2015 · 9 comments

Comments

@achadwick
Copy link
Contributor

After a clean start and a successful build of the mingw-w64-x86_64-gtk3-3.18.2-2-any.pkg.tar.xz in the same invocation of makepkg-mingw -sfL, I get:

  [...]
  GEN      gdkconfig.h
  CCLD     libgdk-3.la
  GISCAN   Gdk-3.0.gir
  GICOMP   Gdk-3.0.gir
  GISCAN   GdkWin32-3.0.gir
C:\msys64\mingw32\i686-w64-mingw32\include\msxml.h:362: syntax error, unexpected typedef-name, expecting ')' or ',' in '
    HRESULT (__attribute__((__stdcall__)) *get_ownerDocument)(IXMLDOMNode *This,IXMLDOMDocument **DOMDocument);' at 'DOMDo
cument'
C:\msys64\mingw32\i686-w64-mingw32\include\msxml.h:383: syntax error, unexpected '}' in '  } IXMLDOMNodeVtbl;' at '}'
C:\msys64\mingw32\i686-w64-mingw32\include\msxml.h:465: syntax error, unexpected typedef-name, expecting ')' or ',' in '
HRESULT __attribute__((__stdcall__)) IXMLDOMNode_get_ownerDocument_Proxy(IXMLDOMNode *This,IXMLDOMDocument **DOMDocument);
' at 'DOMDocument'
C:\msys64\mingw32\i686-w64-mingw32\include\msxml.h:539: syntax error, unexpected typedef-name, expecting ')' or ',' in '
    HRESULT (__attribute__((__stdcall__)) *get_ownerDocument)(IXMLDOMDocumentFragment *This,IXMLDOMDocument **DOMDocument)
;' at 'DOMDocument'
C:\msys64\mingw32\i686-w64-mingw32\include\msxml.h:560: syntax error, unexpected '}' in '  } IXMLDOMDocumentFragmentVtbl;'
 at '}'
C:\msys64\mingw32\i686-w64-mingw32\include\msxml.h:678: syntax error, unexpected typedef-name, expecting ')' or ',' in '      HRESULT (__attribute__((__stdcall__)) *get_ownerDocument)(IXMLDOMDocument *This,IXMLDOMDocument **DOMDocument);' at 'DOMDocument'
C:\msys64\mingw32\i686-w64-mingw32\include\msxml.h:732: syntax error, unexpected '}' in '  } IXMLDOMDocumentVtbl;' at '}'
C:\msys64\mingw32\i686-w64-mingw32\include\msxml.h:1067: syntax error, unexpected typedef-name, expecting ')' or ',' in '      HRESULT (__attribute__((__stdcall__)) *get_ownerDocument)(IXMLDOMCharacterData *This,IXMLDOMDocument **DOMDocument);' at 'DOMDocument'
C:\msys64\mingw32\i686-w64-mingw32\include\msxml.h:1096: syntax error, unexpected '}' in '  } IXMLDOMCharacterDataVtbl;' at '}'
C:\msys64\mingw32\i686-w64-mingw32\include\msxml.h:1208: syntax error, unexpected typedef-name, expecting ')' or ',' in '      HRESULT (__attribute__((__stdcall__)) *get_ownerDocument)(IXMLDOMAttribute *This,IXMLDOMDocument **DOMDocument);' at 'DOMDocument'
C:\msys64\mingw32\i686-w64-mingw32\include\msxml.h:1232: syntax error, unexpected '}' in '  } IXMLDOMAttributeVtbl;' at '}'
C:\msys64\mingw32\i686-w64-mingw32\include\msxml.h:1335: syntax error, unexpected typedef-name, expecting ')' or ',' in '      HRESULT (__attribute__((__stdcall__)) *get_ownerDocument)(IXMLDOMElement *This,IXMLDOMDocument **DOMDocument);' at 'DOMDocument'

[...]

C:\msys64\mingw32\i686-w64-mingw32\include\msxml.h:2510: syntax error, unexpected typedef-name, expecting ')' or ',' in '      HRESULT (__attribute__((__stdcall__)) *get_ownerDocument)(IXTLRuntime *This,IXMLDOMDocument **DOMDocument);' at 'DOMDocument'
C:\msys64\mingw32\i686-w64-mingw32\include\msxml.h:2540: syntax error, unexpected '}' in '  } IXTLRuntimeVtbl;' at '}'
C:\msys64\mingw32\i686-w64-mingw32\include\oleauto.h:548: syntax error, unexpected typedef-name, expecting identifier or '(' in 'typedef ITypeLib *LPTYPELIB;' at 'LPTYPELIB'
C:\msys64\mingw32\i686-w64-mingw32\include\oleauto.h:566: syntax error, unexpected typedef-name, expecting identifier or '(' in '# 566 "C:/msys64/mingw32/i686-w64-mingw32/include/oleauto.h" 3' at 'LPTYPEINFO'
C:\msys64\mingw32\i686-w64-mingw32\include\oleauto.h:570: syntax error, unexpected typedef-name, expecting identifier or '(' in 'typedef ITypeComp *LPTYPECOMP;' at 'LPTYPECOMP'
C:\msys64\mingw32\i686-w64-mingw32\include\oleauto.h:574: syntax error, unexpected typedef-name, expecting identifier or '(' in 'typedef ICreateTypeLib *LPCREATETYPELIB;' at 'LPCREATETYPELIB'
C:\msys64\mingw32\i686-w64-mingw32\include\oleauto.h:578: syntax error, unexpected typedef-name, expecting identifier or '(' in 'typedef ICreateTypeInfo *LPCREATETYPEINFO;' at 'LPCREATETYPEINFO'
C:\msys64\mingw32\i686-w64-mingw32\include\oleauto.h:608: syntax error, unexpected typedef-name, expecting identifier or '(' in 'typedef IDispatch *LPDISPATCH;' at 'LPDISPATCH'
win32/gdkdisplay-win32.c:32: Warning: GdkWin32: missing ":" at column 23:
 * @name: (allow-none) the name of the cursor theme to use, or %NULL to unset
                      ^
win32/gdkwin32misc.h:56: Warning: GdkWin32: symbol='WM_XBUTTONDOWN': Unknown namespace for symbol 'WM_XBUTTONDOWN'
win32/gdkwin32misc.h:59: Warning: GdkWin32: symbol='WM_XBUTTONUP': Unknown namespace for symbol 'WM_XBUTTONUP'
win32/gdkwin32misc.h:65: Warning: GdkWin32: symbol='XBUTTON1': Unknown namespace for symbol 'XBUTTON1'
win32/gdkwin32misc.h:68: Warning: GdkWin32: symbol='XBUTTON2': Unknown namespace for symbol 'XBUTTON2'
Command '['C:\\msys64\\usr\\src\\MINGW-packages\\mingw-w64-gtk3\\src\\i686-w64-mingw32\\gdk/tmp-introspectxdru0s/GdkWin32-3.0.exe', '--introspect-dump=C:\\msys64\\usr\\src\\MINGW-packages\\mingw-w64-gtk3\\src\\i686-w64-mingw32\\gdk/tmp-introspectxdru0s/functions.txt,C:\\msys64\\usr\\src\\MINGW-packages\\mingw-w64-gtk3\\src\\i686-w64-mingw32\\gdk/tmp-introspectxdru0s/dump.xml']' returned non-zero exit status -1073741819
/mingw32/share/gobject-introspection-1.0/Makefile.introspection:176: recipe for target 'GdkWin32-3.0.gir' failed
make[4]: *** [GdkWin32-3.0.gir] Error 1
make[4]: Leaving directory '/usr/src/MINGW-packages/mingw-w64-gtk3/src/i686-w64-mingw32/gdk'
Makefile:1444: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/usr/src/MINGW-packages/mingw-w64-gtk3/src/i686-w64-mingw32/gdk'
Makefile:951: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/usr/src/MINGW-packages/mingw-w64-gtk3/src/i686-w64-mingw32/gdk'
Makefile:717: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/usr/src/MINGW-packages/mingw-w64-gtk3/src/i686-w64-mingw32'
Makefile:611: recipe for target 'all' failed
make: *** [all] Error 2
ESC[1mESC[31m==> ERROR:ESC(BESC[mESC[1m A failure occurred in build().ESC(BESC[m
ESC[1m    Aborting...ESC(BESC[m

Could this be related to the unclean nature of the build noted in #811 ?

Testing to see whether rm -fr src pkg && MINGW_INSTALLS=mingw32 makepkg-mingw -sfL fixes it for i686...

@achadwick
Copy link
Contributor Author

Testing to see whether rm -fr src pkg && MINGW_INSTALLS=mingw32 makepkg-mingw -sfL fixes it for i686...

It doesn't. Same error :(

@achadwick achadwick changed the title mingw-w64-gtk3: fails to build i686 packages after successful build of x86_64. Syntax error in "GISCAN GdkWin32-3.0.gir" mingw-w64-gtk3: fails to build i686 packages. Syntax errors in "GISCAN GdkWin32-3.0.gir" Oct 22, 2015
@achadwick
Copy link
Contributor Author

From IRC:

<mclasen_> achadwick: there's a colon missing after (allow-none)
<mclasen_> pushed a fix to master

https://git.gnome.org/browse/gtk+/commit/?id=f703ea65995f4c8bd5c7e1c554a36d5ca835067d

@achadwick
Copy link
Contributor Author

Hmm. Upstream's f703ea65995f4c8bd5c7e1c554a36d5ca835067d doesn't appear to fix this.

More complete log of the failing build: https://gist.github.com/achadwick/45ba69f9c573c5309b59

@KrullBorg
Copy link
Contributor

try to reduce the length of the path with some symlinks

@achadwick achadwick changed the title mingw-w64-gtk3: fails to build i686 packages. Syntax errors in "GISCAN GdkWin32-3.0.gir" mingw-w64-gtk3: fails to build i686 packages. "GISCAN GdkWin32-3.0.gir": .exe fails with non-zero exit status -1073741819 Oct 27, 2015
@achadwick
Copy link
Contributor Author

(Title changed because the syntax errors were clearly something else)

I don't use support for native symlinks, but a copy will be a valid test. No change though:

Test User@win7test MSYS /_
$ MINGW_INSTALLS=mingw32 makepkg-mingw -sLf

[...]

C:\msys64\mingw32\i686-w64-mingw32\include\oleauto.h:578: syntax error, unexpected typedef-name, expecting identifier or '(' in 'typedef ICreateTypeInfo *LPCREATETYPEINFO;' at 'LPCREATETYPEINFO'
C:\msys64\mingw32\i686-w64-mingw32\include\oleauto.h:608: syntax error, unexpected typedef-name, expecting identifier or '(' in 'typedef IDispatch *LPDISPATCH;' at 'LPDISPATCH'
win32/gdkdisplay-win32.c:32: Warning: GdkWin32: missing ":" at column 23:
 * @name: (allow-none) the name of the cursor theme to use, or %NULL to unset
                      ^
win32/gdkwin32misc.h:56: Warning: GdkWin32: symbol='WM_XBUTTONDOWN': Unknown namespace for symbol 'WM_XBUTTONDOWN'
win32/gdkwin32misc.h:59: Warning: GdkWin32: symbol='WM_XBUTTONUP': Unknown namespace for symbol 'WM_XBUTTONUP'
win32/gdkwin32misc.h:65: Warning: GdkWin32: symbol='XBUTTON1': Unknown namespace for symbol 'XBUTTON1'
win32/gdkwin32misc.h:68: Warning: GdkWin32: symbol='XBUTTON2': Unknown namespace for symbol 'XBUTTON2'
Command '['C:\\msys64\\_\\src\\i686-w64-mingw32\\gdk/tmp-introspectqhgq47/GdkWin32-3.0.exe', '--introspect-dump=C:\\msys64\\_\\src\\i686-w64-mingw32\\gdk/tmp-introspectqhgq47/functions.txt,C:\\msys64\\_\\src\\i686-w64-mingw32\\gdk/tmp-introspectqhgq47/dump.xml']' returned non-zero exit status -1073741819
/mingw32/share/gobject-introspection-1.0/Makefile.introspection:176: recipe for target 'GdkWin32-3.0.gir' failed
make[4]: *** [GdkWin32-3.0.gir] Error 1
make[4]: Leaving directory '/_/src/i686-w64-mingw32/gdk'
Makefile:1444: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/_/src/i686-w64-mingw32/gdk'
Makefile:951: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/_/src/i686-w64-mingw32/gdk'
Makefile:717: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/_/src/i686-w64-mingw32'
Makefile:611: recipe for target 'all' failed
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

achadwick referenced this issue in achadwick/MINGW-packages Oct 28, 2015
Backport upstream's fix for a syntax error (missing colon) in the
annotations.

https://git.gnome.org/browse/gtk+/commit/?id=f703ea65995f4c8bd5c7e1c554a36d5ca835067d

This doesn't address Alexpux/MINGW-packages#845, but it's probably worth
having in our builds.
@achadwick
Copy link
Contributor Author

Building with GI_SCANNER_DEBUG="save-temps":

$ MINGW_INSTALLS=mingw32 GI_SCANNER_DEBUG="save-temps" makepkg-mingw -sfL

at least leaves the temps in place when the build fails, and allows them to be tested on the command line:

$ 'C:\\msys64\\usr\\src\\MINGW-packages\\mingw-w64-gtk3\\src\\i686-w64-mingw32\\gdk/tmp-introspectxlaqak/GdkWin32-3.0.exe' '--introspect-dump=C:\\msys64\\usr\\src\\MINGW-packages\\mingw-w64-gtk3\\src\\i686-w64-mingw32\\gdk/tmp-introspectxlaqak/functions.txt,C:\\msys64\\usr\\src\\MINGW-packages\\mingw-w64-gtk3\\src\\i686-w64-mingw32\\gdk/tmp-introspectxlaqak/dump.xml'
C:/msys64/usr/src/MINGW-packages/mingw-w64-gtk3/src/i686-w64-mingw32/gdk/tmp-introspectxlaqak/GdkWin32-3.0.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory

testuser@win7test MSYS /usr/src/MINGW-packages/mingw-w64-gtk3
$ file 'C:/msys64/usr/src/MINGW-packages/mingw-w64-gtk3/src/i686-w64-mingw32/gdk/tmp-introspectxlaqak/GdkWin32-3.0.exe'
C:/msys64/usr/src/MINGW-packages/mingw-w64-gtk3/src/i686-w64-mingw32/gdk/tmp-introspectxlaqak/GdkWin32-3.0.exe: PE32 executable (console) Intel 80386 (stripped to external PDB), for MS Windows

testuser@win7test MSYS /usr/src/MINGW-packages/mingw-w64-gtk3
$ ldd 'C:/msys64/usr/src/MINGW-packages/mingw-w64-gtk3/src/i686-w64-mingw32/gdk/tmp-introspectxlaqak/GdkWin32-3.0.exe'
        ntdll.dll => /c/Windows/SYSTEM32/ntdll.dll (0x76fe0000)
        ntdll.dll => /c/Windows/SysWOW64/ntdll.dll (0x771c0000)
        wow64.dll => /c/Windows/SYSTEM32/wow64.dll (0x74a90000)
        wow64win.dll => /c/Windows/SYSTEM32/wow64win.dll (0x74a30000)
        wow64cpu.dll => /c/Windows/SYSTEM32/wow64cpu.dll (0x74a20000)
        ??? => ??? (0x76dc0000)
        kernel32.dll => /c/Windows/syswow64/kernel32.dll (0x751d0000)
        ??? => ??? (0x76dc0000)
        ??? => ??? (0x76ee0000)
        kernel32.dll => /c/Windows/syswow64/kernel32.dll (0x751d0000)
        KERNELBASE.dll => /c/Windows/syswow64/KERNELBASE.dll (0x76d70000)
        msvcrt.dll => /c/Windows/syswow64/msvcrt.dll (0x76360000)
        USER32.dll => /c/Windows/syswow64/USER32.dll (0x76570000)
        GDI32.dll => /c/Windows/syswow64/GDI32.dll (0x754d0000)
        LPK.dll => /c/Windows/syswow64/LPK.dll (0x762a0000)
        USP10.dll => /c/Windows/syswow64/USP10.dll (0x74cf0000)
        ADVAPI32.dll => /c/Windows/syswow64/ADVAPI32.dll (0x76ac0000)
        sechost.dll => /c/Windows/SysWOW64/sechost.dll (0x74cb0000)
        RPCRT4.dll => /c/Windows/syswow64/RPCRT4.dll (0x76920000)
        SspiCli.dll => /c/Windows/syswow64/SspiCli.dll (0x74b30000)
        CRYPTBASE.dll => /c/Windows/syswow64/CRYPTBASE.dll (0x74b20000)
        IMM32.DLL => /c/Windows/system32/IMM32.DLL (0x76cd0000)
        MSCTF.dll => /c/Windows/syswow64/MSCTF.dll (0x76690000)
        SOPHOS~1.DLL => /c/PROGRA~2/Sophos/SOPHOS~1/SOPHOS~1.DLL (0x74860000)
        PSAPI.DLL => /c/Windows/syswow64/PSAPI.DLL (0x74cd0000)
        apphelp.dll => /c/Windows/system32/apphelp.dll (0x716b0000)

@achadwick
Copy link
Contributor Author

When running the temp exe under gdb, I get

$ gdb -ex r --args 'C:\\msys64\\usr\\src\\MINGW-packages\\mingw-w64-gtk3\\src\\i686-w64-mingw32\\gdk/tmp-introspectgcei6a/GdkWin32-3.0.exe' '--introspect-dump=C:\\msys64\\usr\\src\\MINGW-packages\\mingw-w64-gtk3\\src\\i686-w64-mingw32\\gdk/tmp-introspectgcei6a/functions.txt,C:\\msys64\\usr\\src\\MINGW-packages\\mingw-w64-gtk3\\src\\i686-w64-mingw32\\gdk/tmp-introspectgcei6a/dump.xml'
GNU gdb (GDB) 7.9
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-msys".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Traceback (most recent call last):
  File "<string>", line 3, in <module>
ImportError: No module named libstdcxx.v6.printers
/etc/gdbinit:6: Error in sourced command file:
Error while executing Python code.
Reading symbols from C:\\msys64\\usr\\src\\MINGW-packages\\mingw-w64-gtk3\\src\\i686-w64-mingw32\\gdk/tmp-introspectgcei6a/GdkWin32-3.0.exe...(no debugging symbols found)...done.
Starting program: /usr/src/MINGW-packages/mingw-w64-gtk3/src/i686-w64-mingw32/gdk/tmp-introspectgcei6a/GdkWin32-3.0.exe --introspect-dump=C:\\\\msys64\\\\usr\\\\src\\\\MINGW-packages\\\\mingw-w64-gtk3\\\\src\\\\i686-w64-mingw32\\\\gdk/tmp-introspectgcei6a/functions.txt,C:\\\\msys64\\\\usr\\\\src\\\\MINGW-packages\\\\mingw-w64-gtk3\\\\src\\\\i686-w64-mingw32\\\\gdk/tmp-introspectgcei6a/dump.xml
[New Thread 5044.0x84c]
warning: `/c/Windows/SYSTEM32/ntdll.dll': Shared library architecture i386:x86-64 is not compatible with target architecture i386.
warning: `/c/Windows/SYSTEM32/wow64.dll': Shared library architecture i386:x86-64 is not compatible with target architecture i386.
warning: `/c/Windows/SYSTEM32/wow64win.dll': Shared library architecture i386:x86-64 is not compatible with target architecture i386.
warning: `/c/Windows/SYSTEM32/wow64cpu.dll': Shared library architecture i386:x86-64 is not compatible with target architecture i386.
dll path too long
dll path too long
dll path too long
dll path too long
[Inferior 1 (process 5044) exited with code 030000000465]
(gdb) quit

"dll path too long" → searching around, apparently this is a hard 512B limit. I've tried trimming my user PATH, and setting CYGWIN_NOWINPATH=1 during build, but neither worked.

@Alexpux
Copy link
Member

Alexpux commented Oct 28, 2015

Seems somehow EXE is linked with wrong compiler

@Alexpux
Copy link
Member

Alexpux commented Nov 9, 2015

Fixed by updating glib to 2.46.2. This is issue with glib itself.

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

3 participants