hangover icon indicating copy to clipboard operation
hangover copied to clipboard

Attempting to Build --without-x

Open cmoski opened this issue 5 years ago • 8 comments

Hey there! First off, awesome work!

I am attempting to generate a build for the NanoPC T3 running an on an aarch64 kernel to attempt to run a Windows console app written in VC++.

The only configuration change made to the makefile was adding: ../../wine/configure --enable-win64 $(TESTS) --without-x

When attempting to build on the NanoPC T3, I get: (libtool: error: unrecognised option: '-DPACKAGE_VERSION_STRING="1.15"')

libtool: compile:  gcc -I. -I../../../libiconv/lib -I../include -I../../../libiconv/lib/../include -I.. -I../../../libiconv/lib/.. -g -O2 -fvisibility=hidden -DLIBDIR=\"/root/hangover/build/x86_64-w64-mingw32/lib\" -DBUILDING_LIBICONV -DBUILDING_DLL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/root/hangover/build/x86_64-w64-mingw32/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libiconv_set_relocation_prefix -Drelocate=libiconv_relocate -DHAVE_CONFIG_H -c ../../../libiconv/lib/iconv.c -o iconv.o
/bin/bash ../libtool --mode=compile --tag=RC  `/bin/sh ../../../libiconv/lib/../windows/windres-options --escape 1.15` -i ../../../libiconv/lib/../windows/libiconv.rc -o libiconv.res.lo --output-format=coff
Usage: /root/hangover/build/libiconv64/libtool [OPTION]... [MODE-ARG]...
Try 'libtool --help' for more information.
libtool:   error: unrecognised option: '-DPACKAGE_VERSION_STRING=\"1.15\"'
Makefile:93: recipe for target 'libiconv.res.lo' failed
make[2]: *** [libiconv.res.lo] Error 1
make[2]: Leaving directory '/root/hangover/build/libiconv64/lib'
Makefile:52: recipe for target 'install' failed
make[1]: *** [install] Error 2
make[1]: Leaving directory '/root/hangover/build/libiconv64'
Makefile:49: recipe for target 'build/x86_64-w64-mingw32/bin/libcharset-1.dll' failed
make: *** [build/x86_64-w64-mingw32/bin/libcharset-1.dll] Error 2

When attempting to build on Ubuntu windows (Linux 4.4.0-17134-Microsoft #137-Microsoft Thu Jun 14 18:46:00 PST 2018 x86_64 x86_64 x86_64 GNU/Linux), I get (/usr/bin/ld: unrecognized option '--enable-auto-image-base'):

checking for simple visibility declarations... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: executing libtool commands
make -C build/libiconv64/ install
make[1]: Entering directory '/mnt/d/temp/hangover/build/libiconv64'
builddir="`pwd`"; cd libcharset && make all && make install-lib libdir="$builddir/lib" includedir="$builddir/lib"
make[2]: Entering directory '/mnt/d/temp/hangover/build/libiconv64/libcharset'
cd lib && make all
make[3]: Entering directory '/mnt/d/temp/hangover/build/libiconv64/libcharset/lib'
/bin/bash ../libtool --mode=link gcc  -g -O2 -fvisibility=hidden -o libcharset.la -rpath /mnt/d/temp/hangover/build/x86_64-w64-mingw32/lib -version-info 1:0:0 -no-undefined localcharset.lo relocatable.lo
libtool: link: gcc -shared  .libs/localcharset.o .libs/relocatable.o    -g -O2   -o .libs/libcharset-1.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libcharset.dll.a
/usr/bin/ld: unrecognized option '--enable-auto-image-base'
/usr/bin/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
Makefile:59: recipe for target 'libcharset.la' failed
make[3]: *** [libcharset.la] Error 1
make[3]: Leaving directory '/mnt/d/temp/hangover/build/libiconv64/libcharset/lib'
Makefile:34: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/mnt/d/temp/hangover/build/libiconv64/libcharset'
Makefile:42: recipe for target 'lib/localcharset.h' failed
make[1]: *** [lib/localcharset.h] Error 2
make[1]: Leaving directory '/mnt/d/temp/hangover/build/libiconv64'
Makefile:49: recipe for target 'build/x86_64-w64-mingw32/bin/libcharset-1.dll' failed
make: *** [build/x86_64-w64-mingw32/bin/libcharset-1.dll] Error 2

Is there a particular required build environment for this tool/am I missing something simple?

Thanks!

cmoski avatar Sep 26 '18 19:09 cmoski

I have never seen these issues, and I don't think they are related to the --without-x parameter passed to Wine's configure. It is the script in libiconv that generates the configure script that fails. My quick guess is that some autotools component is either missing or outdated on your aarch64 machine.

I'd suggest to try to build libiconv for your aarch64 system manually first (look at its README and INSTALL.generic files), and once that works attempt the hangover build again.

I have no idea what's wrong on the Windows side, but this is another situation I have never tested. Do you have the mingw compilers installed? I am surprised that it is trying to use /usr/bin/ld - it should use /usr/bin/x86_64-w64-mingw32-ld, or whereever mingw is installed. It is possible that because the host system and tools are kinda sorta Windows already it uses the wrong ones.

stefand avatar Sep 29 '18 09:09 stefand

Oh sorry, I misread the error on your Linux aarch64 machine and confused libtool and autotools. This is again a case where I am a bit puzzled about "libtool: compile: gcc ...". Also check if you have mingw installed (you need x86_64-w64-mingw32 and i686-w64-mingw32)

stefand avatar Sep 29 '18 09:09 stefand

I'm getting the same libtool error building on a Raspberry Pi 3+ with Gentoo aarch64. Builds wine just fine, can run wine arm applications, but doesn't get to qemu or anything.

I'm using distcc to speed up compile times, with a second Pi 3 running the same image.

CalcProgrammer1 avatar Mar 02 '19 03:03 CalcProgrammer1

I deal this by sudo apt-get install mingw-w64 sudo update-alternatives --config x86_64-w64-mingw32-gcc sudo update-alternatives --config x86_64-w64-mingw32-g++ sudo update-alternatives --config x86_64-w64-mingw32-gfortran sudo update-alternatives --config x86_64-w64-mingw32-gnat sudo update-alternatives --config i686-w64-mingw32-gcc sudo update-alternatives --config i686-w64-mingw32-g++ sudo update-alternatives --config i686-w64-mingw32-gfortran sudo update-alternatives --config i686-w64-mingw32-gnat

and git clean -xfd

huxixx avatar Sep 10 '19 02:09 huxixx

Same problem but when i tried @huxixx way to solve it and got the result "there were no gnat and gfortran" and there were 3 options for gcc and g++. What should i choose

namdeptrai2003 avatar Dec 18 '19 01:12 namdeptrai2003

problem line is

/bin/bash ../libtool --mode=compile --tag=RC /bin/sh ../../../libiconv/lib/../windows/windres-options --escape 1.15 -i ../../../libiconv/lib/../windows/libiconv.rc -o libiconv.res.lo --output-format=coff

libtool doesn't have a -D option:

libtool:   error: unrecognised option: '-DPACKAGE_VERSION_STRING="1.15"
libtool:   error: unrecognised option: '-DPACKAGE_VERSION_STRING=\"1.15\"'

removing the -D echoes from windres-options gets me to another error:

libtool:   error: unrecognised option: '-i'

"man libtool" shows no -i option is supported, and no -o option either

the version of libtool created during build is same as on my system:

$ ../libtool --version
libtool (GNU libtool) 2.4.6
$ libtool --version
libtool (GNU libtool) 2.4.6

culling more from the invocation i get

libtool:   error: unrecognised option: '-o'

culling the -o, i get

libtool:   error: unrecognised option: '--output-format'

HTH

clort81 avatar Dec 31 '19 05:12 clort81

See if you can compile libiconv by hand - for your ARM host natively first, and if that works try to cross compile it for Win32 and Win64.

stefand avatar Jan 01 '20 21:01 stefand

Can we close this issue?

AndreRH avatar Nov 01 '20 18:11 AndreRH

This should work with Hangover 9.x, open a new issue if it doesn't

AndreRH avatar Mar 01 '24 20:03 AndreRH