0

I want to cross-compile binutils (but many errors occurs during compilation). I get this error with libtool:

C:/msys2/usr/bin/sh.exe ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../binutils/./bfd -D__USE_MINGW_FSEEK     -I. -I../../binutils/./bfd -I../../binutils/./bfd/../include  -DHAVE_sh_elf32_vec -DHAVE_sh_elf32_le_vec -DHAVE_sh_coff_vec -DHAVE_sh_coff_le_vec -DHAVE_sh_coff_small_vec -DHAVE_sh_coff_small_le_vec -DHAVE_sh64_elf32_vec -DHAVE_sh64_elf32_le_vec -DHAVE_sh64_elf64_vec -DHAVE_sh64_elf64_le_vec -DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec -DHAVE_plugin_vec  -DBINDIR='"C:/Users/Yoann/Documents/compilation/sh3ebbuild/install/bin"'  -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wno-format -g -O2 -D__USE_MINGW_ACCESS -MT dwarf2.lo -MD -MP -MF .deps/dwarf2.Tpo -c -o dwarf2.lo -DDEBUGDIR=\"C:/Users/Yoann/Documents/compilation/sh3ebbuild/install/lib/debug\" ../../binutils/./bfd/dwarf2.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../binutils/./bfd -D__USE_MINGW_FSEEK -I. -I../../binutils/./bfd -I../../binutils/./bfd/../include -DHAVE_sh_elf32_vec -DHAVE_sh_elf32_le_vec -DHAVE_sh_coff_vec -DHAVE_sh_coff_le_vec -DHAVE_sh_coff_small_vec -DHAVE_sh_coff_small_le_vec -DHAVE_sh64_elf32_vec -DHAVE_sh64_elf32_le_vec -DHAVE_sh64_elf64_vec -DHAVE_sh64_elf64_le_vec -DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec -DHAVE_plugin_vec -DBINDIR=\11C:/Users/Yoann/Documents/compilation/sh3ebbuild/install/bin\11 -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wno-format -g -O2 -D__USE_MINGW_ACCESS -MT dwarf2.lo -MD -MP -MF .deps/dwarf2.Tpo -c \1-DDEBUGDIR=\11C:/Users/Yoann/Documents/compilation/sh3ebbuild/install/lib/debug\11 ../../binutils/./bfd/dwarf2.c\1 -o dwarf2.o
gcc.exe: fatal error: no input files
compilation terminated.

In libtool arguments, I can see many \1, and especially, ../../binutils/./bfd/dwarf2.c\1 which is the input file.

Do you have any ideas for fix this?

Thanks,

Intelligide
  • 279
  • 2
  • 14
  • Something went haywire; there are far too many `\1` references (from a failed sed substitution?) in the output you posted. It appears you are cross-building on Windows, possibly under cygwin. That's probably not very well tested, to say the least. – Jens Aug 28 '15 at 16:32
  • I use MSys 2 with MinGW4.8 – Intelligide Aug 28 '15 at 16:35
  • Well, I'm afraid I don't know enough about that combination. But the key is likely digging into why there are so many `\1` in the output. Enabling debug output or placing `set -x` near the top of shell scripts is likely to provide insight. – Jens Aug 28 '15 at 16:47
  • I set -x argument, i get this : http://www.hastebin.com/malasiwoga.md – Intelligide Aug 28 '15 at 17:24

0 Answers0