Problem compiling native GCC - cannot execute binary file error

Fri Apr 4 10:48:00 GMT 2003


I'm a newbie in the cross-compiling world, but following tips from the
ml archive & using the cross-build I built cross-compiler on my Linux
box for mingw32msvc target.

By using this toolchain I also compiled Ruby 1.6.8 and tested its
execution under Win98 platform.

Since I'm having problems cross-compiling Ruby 1.8.0 on my Linux box,
I'd like to produce native tools with the built toolchain.

The native version of binutils are built, but I have problem building

I use cross-configure & cross-make scripts, and I get the following
error when running cross-make:


make[1]: Entering directory
(cd intl && make all)
make[2]: Entering directory
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory
gcc -c  -DIN_GCC    -g -O2
-DCYGWIN_CROSS_DIR=\"/opt/pkgs/epkg/encap/MinGW/i686-mingw32msvc\" -I.
-I. -I./config -I./../include \
gcc  -DIN_GCC    -g -O2   -o gencheck \
 gencheck.o ` case "obstack.o" in ?*) echo i686-pc-linux-gnu-obstack.o
;; esac ` ` case "" in ?*) echo i686-pc-linux-gnu- ;; esac ` ` case ""
in ?*) echo i686-pc-linux-gnu- ;; esac `  ` case "" in ?*) echo
i686-pc-linux-gnu- ;; esac ` ` case "" in ?*) echo i686-pc-linux-gnu- ;;
esac `
./gencheck > tmp-check.h
/bin/sh: ./gencheck: cannot execute binary file
make[1]: *** [s-check] Error 126
make[1]: Leaving directory
make: *** [all-gcc] Error 2

gencheck binary is present, but it is a native Win application which, of
course, cannot be executed on my i686 Linux box.

What is the procedure to build GCC?

I have found several post in the ml archive with the same & or similar
problem (just another binaries), but didn't found any solution.

Any hint?


Registered Linux User #278493

Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list