Hi Gerd,

On 11/03/2017 05:19 AM, Gerd Hoffmann wrote:
>   Hi,
> 
> see $subject
> 
> make: Entering directory `/home/kraxel/projects/qemu/build-win64'
> mkdir -p dtc/libfdt
> mkdir -p dtc/tests
> make[1]: `/home/kraxel/projects/qemu/build-win64/capstone/capstone.lib' 
> is up to date.
>   LINK    qemu-ga.exe
>   LINK    qemu-img.exe
> /home/kraxel/projects/qemu/build-win64/capstone/capstone.lib: error
> adding symbols: Archive has no index; run ranlib to add one
> collect2: error: ld returned 1 exit status
>   LINK    qemu-io.exe
> make: *** [qemu-img.exe] Error 1
> make: *** Waiting for unfinished jobs....
> /home/kraxel/projects/qemu/build-win64/capstone/capstone.lib: error
> adding symbols: Archive has no index; run ranlib to add one
> collect2: error: ld returned 1 exit status
> make: *** [qemu-io.exe] Error 1
> make: Leaving directory `/home/kraxel/projects/qemu/build-win64'

I can't reproduce your error running:

$ docker run --rm -v $(pwd):$(pwd) -w $(pwd) -u $(id -u) \
  qemu:debian-win32-cross bash -c \
  'mkdir -p build/win32 && cd build/win32 && ../../configure
$QEMU_CONFIGURE_OPTS && make qemu-img.exe'
Install prefix    c:/Program Files/QEMU
BIOS directory    c:/Program Files/QEMU
...
GIT submodules    ui/keycodemapdb dtc capstone
C compiler        i686-w64-mingw32.shared-gcc
Host C compiler   cc
C++ compiler      i686-w64-mingw32.shared-g++
Objective-C compiler clang
ARFLAGS           rv
...
capstone          git
mkdir -p dtc/libfdt
mkdir -p dtc/tests
  CC      cs.o
  CC      utils.o
  CC      SStream.o
  CC      MCInstrDesc.o
  CC      MCRegisterInfo.o
  CC      arch/ARM/ARMDisassembler.o
  CC      arch/ARM/ARMInstPrinter.o
  CC      arch/ARM/ARMMapping.o
  CC      arch/ARM/ARMModule.o
  CC      arch/AArch64/AArch64BaseInfo.o
  CC      arch/AArch64/AArch64Disassembler.o
  CC      arch/AArch64/AArch64InstPrinter.o
  CC      arch/AArch64/AArch64Mapping.o
  CC      arch/AArch64/AArch64Module.o
  CC      arch/Mips/MipsDisassembler.o
  CC      arch/Mips/MipsInstPrinter.o
  CC      arch/Mips/MipsMapping.o
  CC      arch/Mips/MipsModule.o
  CC      arch/PowerPC/PPCDisassembler.o
  CC      arch/PowerPC/PPCInstPrinter.o
  CC      arch/PowerPC/PPCMapping.o
  CC      arch/PowerPC/PPCModule.o
  CC      arch/Sparc/SparcDisassembler.o
  CC      arch/Sparc/SparcInstPrinter.o
  CC      arch/Sparc/SparcMapping.o
  CC      arch/Sparc/SparcModule.o
  CC      arch/SystemZ/SystemZDisassembler.o
  CC      arch/SystemZ/SystemZInstPrinter.o
  CC      arch/SystemZ/SystemZMapping.o
  CC      arch/SystemZ/SystemZModule.o
  CC      arch/SystemZ/SystemZMCTargetDesc.o
  CC      arch/X86/X86DisassemblerDecoder.o
  CC      arch/X86/X86Disassembler.o
  CC      arch/X86/X86IntelInstPrinter.o
  CC      arch/X86/X86ATTInstPrinter.o
  CC      arch/X86/X86Mapping.o
  CC      arch/X86/X86Module.o
  CC      arch/XCore/XCoreDisassembler.o
  CC      arch/XCore/XCoreInstPrinter.o
  CC      arch/XCore/XCoreMapping.o
  CC      arch/XCore/XCoreModule.o
  CC      MCInst.o
  AR      capstone.lib
i686-w64-mingw32.shared-ar: creating
/home/phil/source/qemu/build/win32/capstone/capstone.lib
  RC      version.o
...
  GEN     nbd/trace.c
  GEN     scsi/trace.c
mkdir -p dtc/libfdt
mkdir -p dtc/tests
make[1]: '/home/phil/source/qemu/build/win32/capstone/capstone.lib' is
up to date.
  GEN     qemu-img-cmds.h
  CC      qemu-img.o
...
  CC      stubs/xen-hvm.o
  CC      stubs/pci-host-piix.o
  AR      libqemuutil.a
  LINK    qemu-img.exe

$ file build/win32/qemu-img.exe
build/win32/qemu-img.exe: PE32 executable (console) Intel 80386, for MS
Windows

and with:

$ docker run --rm -v $(pwd):$(pwd) -w $(pwd) -u $(id -u) \
  qemu:debian-win64-cross bash -c \
  'mkdir -p build/win64 && cd build/win64 && ../../configure
--cross-prefix=x86_64-w64-mingw32.shared- && make qemu-img.exe'
...
  CC      arch/XCore/XCoreMapping.o
  CC      arch/XCore/XCoreModule.o
  CC      MCInst.o
  AR      capstone.lib
x86_64-w64-mingw32.shared-ar: creating
/home/phil/source/qemu/build/win64/capstone/capstone.lib
  RC      version.o
  GEN     qemu-options.def
...
  AR      libqemuutil.a
  LINK    qemu-img.exe
$ file build/win64/qemu-img.exe
build/win64/qemu-img.exe: PE32+ executable (console) x86-64, for MS Windows

What mingw toolchain are you using?

Regards,

Phil.

Reply via email to