hangover icon indicating copy to clipboard operation
hangover copied to clipboard

I build wine-guest failed

Open GitSoftwareNow opened this issue 4 years ago • 15 comments

../../dlls/sechost/libsechost.a ../../libs/port/libwine_port.a ../../dlls/winecrt0/libwinecrt0.a(debug.o):in function ‘fallback__wine_dbg_output’: /home/kylin/hangover/build/wine-guest32/dlls/winecrt0/../../../../wine/dlls/winecrt0/debug.c:178:no reference to ‘__acrt_iob_func’ ../../dlls/winecrt0/libwinecrt0.a(debug.o):in function ‘fallback__wine_dbg_header’: /home/kylin/hangover/build/wine-guest32/dlls/winecrt0/../../../../wine/dlls/winecrt0/debug.c:203:no reference to ‘__acrt_iob_func’ collect2: error: ld returned 1 exit status winegcc: /usr/bin/i686-w64-mingw32-gcc failed Makefile:506: recipe for target 'advapi32.dll' failed make[1]: *** [advapi32.dll] Error 2 make[1]: Leaving directory '/home/kylin/hangover/build/wine-guest32/dlls/advapi32' Makefile:8081: recipe for target 'dlls/advapi32' failed make: *** [dlls/advapi32] Error 2

GitSoftwareNow avatar Jul 09 '20 10:07 GitSoftwareNow

This issue seems vaguely familiar to me, but I can't exactly recall where I have seen it before. Which mingw version are you using? What does i686-w64-mingw32-gcc --version say?

stefand avatar Jul 09 '20 10:07 stefand

Ah yes, see https://github.com/AndreRH/hangover/issues/34 . You need mingw-w64 6.0 or later.

This is what I have on my ARM box:

stefan@shield ~ $ i686-w64-mingw32-gcc --version
i686-w64-mingw32-gcc (Gentoo 10.1.0-r2 p3) 10.1.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

And this is on my Catalina Mac:

stefan@grey Documents % i686-w64-mingw32-gcc --version
i686-w64-mingw32-gcc (GCC) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

stefand avatar Jul 09 '20 10:07 stefand

on my ARM linux

i686-w64-mingw32-gcc --version i686-w64-mingw32-gcc (GCC) 5.3.1 20160225 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

GitSoftwareNow avatar Jul 09 '20 11:07 GitSoftwareNow

should I update the gcc?

GitSoftwareNow avatar Jul 09 '20 11:07 GitSoftwareNow

Yes, but not your regular system gcc, but your mingw installation. It is antiquated, from 2015...

stefand avatar Jul 09 '20 11:07 stefand

I'm having the same issue on L4T Ubuntu for the Switch. MinGW version is reported as i686-w64-mingw32-gcc (GCC) 7.3-win32 20180312 so maybe it needs a more recent version than 6.0 now?

jerbmega avatar Jul 09 '20 13:07 jerbmega

There's a difference between the mingw version and gcc version. I don't know what returns the mingw version though :-/ . See if you can get a mingw with gcc 9 or newer.

stefand avatar Jul 09 '20 13:07 stefand

L4T Ubuntu is based on 18.04 which looks like it only has MinGW 5, so that would do it.

jerbmega avatar Jul 09 '20 13:07 jerbmega

I updated i686-w64-mingw32-gcc i686-w64-mingw32-gcc (GCC) 7.3-win32 20180312 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

in the top directory run make make cd build/wine-host ; CC= ../../wine/configure --enable-win64 checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking whether make sets $(MAKE)... yes checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... configure: error: in /home/hangover/build/wine-host': configure: error: cannot run C compiled programs. If you meant to cross compile, use --host'. See `config.log' for more details make: *** [Makefile:93:build/wine-host/Makefile] error 1

GitSoftwareNow avatar Jul 09 '20 14:07 GitSoftwareNow

i686-w64-mingw32-gcc (GCC) 7.3-win32 20180312

I think this is still too old, but let's see+

cd build/wine-host ; CC= ../../wine/configure --enable-win64

This bit does not use mingw. I guess you broke your normal gcc somehow. Try to compile a hello world program with gcc by hand.

stefand avatar Jul 09 '20 16:07 stefand

to get the mingw-w64 version one way is to ask the package manager, e.g. on debian variants: apt show mingw-w64

AndreRH avatar Jul 09 '20 17:07 AndreRH

apt show mingw-w64 Package: mingw-w64 Version: 7.0.0-4 Priority: optional Section: devel Maintainer: Stephen Kitt [email protected] Installed-Size: 49.2 kB Depends: gcc-mingw-w64, g++-mingw-w64 Homepage: http://mingw-w64.sf.net Tag: role::metapackage Download-Size: 13.5 kB APT-Manual-Installed: yes APT-Sources: http://mirrors.ustc.edu.cn/debian sid/main arm64 Packages Description: Development environment targeting 32- and 64-bit Windows MinGW-w64 provides a development and runtime environment for 32- and 64-bit (x86 and x64) Windows applications using the Windows API and the GNU Compiler Collection (gcc). . This metapackage provides the MinGW-w64 development environment, including C and C++ compilers. Ada, Fortran, Objective-C and Objective-C++ compilers are available respectively in the gnat-mingw-w64, gfortran-mingw-w64, gobjc-mingw-w64 and gojbc++-mingw-w64 packages.

the Package version is 7.0.0-4 I tried use this i686-w64-mingw32-gcc but the errors stills

../../dlls/sechost/libsechost.a ../../libs/port/libwine_port.a /usr/bin/x86_64-w64-mingw32-ld: ../../dlls/winecrt0/libwinecrt0.a(debug.o): in function fallback__wine_dbg_output': /home/kylin/hangover/build/wine-guest/dlls/winecrt0/../../../../wine/dlls/winecrt0/debug.c:178: undefined reference to __acrt_iob_func' /usr/bin/x86_64-w64-mingw32-ld: ../../dlls/winecrt0/libwinecrt0.a(debug.o): in function fallback__wine_dbg_header': /home/kylin/hangover/build/wine-guest/dlls/winecrt0/../../../../wine/dlls/winecrt0/debug.c:203: undefined reference to __acrt_iob_func' collect2: error: ld returned 1 exit status winegcc: /usr/bin/x86_64-w64-mingw32-gcc failed

GitSoftwareNow avatar Jul 10 '20 04:07 GitSoftwareNow

I try to compile a test program with gcc by hand #include <stdio.h> #include <string.h>

int main() { char buf[256]="error!\n"; return fwrite(buf,1,strlen(buf),stderr); }

i686-w64-mingw32-gcc test.c

the a.exe has created

what's the reason causes hangover/build/wine-guest/dlls/winecrt0/../../../../wine/dlls/winecrt0/debug.c:203: undefined reference to __acrt_iob_func' ?

GitSoftwareNow avatar Jul 10 '20 04:07 GitSoftwareNow

Try again with current HEAD

AndreRH avatar Oct 05 '20 19:10 AndreRH

Can we close this issue?

AndreRH avatar Nov 01 '20 18:11 AndreRH

irrelevant with new Hangover approach

AndreRH avatar Feb 15 '23 20:02 AndreRH