#104 make failed for mingw on FC6

Instruction_given
closed
MinGW (23)
5
2007-10-30
2007-10-30
William
No

I am trying to build MinGW on a FC6 linux system.

I did the unattended install for a i686-pc-linux-gnu.
This is the log.

x86-mingw32-build.sh: building i686-pc-linux-gnu ...
selected components: binutils headers gcc w32api mingw-runtime
selected languages: c,ada,c++,f77,java,objc

x86-mingw32-build.sh: required packages ...
gcc-core-3.4.5-20060117-1-src.tar.gz
gcc-ada-3.4.5-20060117-1-src.tar.gz
gcc-g++-3.4.5-20060117-1-src.tar.gz
gcc-g77-3.4.5-20060117-1-src.tar.gz
gcc-java-3.4.5-20060117-1-src.tar.gz
gcc-objc-3.4.5-20060117-1-src.tar.gz
binutils-2.17.50-20060716-1-src.tar.gz
mingw-runtime-3.10-20060909-1-src.tar.gz
w32api-3.7-src.tar.gz

x86-mingw32-build.sh: general build options ...
--with-gcc
--with-gnu-as
--with-gnu-ld
--disable-nls
--disable-shared
--disable-debug

x86-mingw32-build.sh: GCC specific build options ...
--enable-threads=win32
--disable-win32-registry
--enable-sjlj-exceptions
--enable-libgcj
--disable-libgcj-debug
--disable-java-awt
--enable-java-gc=boehm
--enable-interpreter
--enable-hash-synchronization
--without-x

I get the following error during the build:

> /home/mingw/usr/local/include/time.h:187: error: syntax error before
> "char" make[1]: *** [crtbegin.o] Error 1 make[1]: Leaving directory
> `/home/tmp/mingw-3.4.5/build-gcc/gcc' make: *** [all-gcc] Error 2 x86-mingw32-build.sh: unrecoverable error building gcc

What do you need to fix it?

Discussion

  • Keith Marshall

    Keith Marshall - 2007-10-30

    Logged In: YES
    user_id=823908
    Originator: NO

    > I am trying to build MinGW on a FC6 linux system.
    >
    > I did the unattended install for a i686-pc-linux-gnu.
    > This is the log.
    >
    > x86-mingw32-build.sh: building i686-pc-linux-gnu ...

    Er, this isn't building MinGW; this is attempting to build a *Linux* targetting cross-compiler from MinGW sources, which really has zero chance of success. Quoting from the README which accompanies x86-mingw32-build.sh:

    -----8<----------
    3) Start the build, by executing the command:-

    sh x86-mingw32-build.sh [--options ...] [target-spec]

    Your choice of `target-spec' defines the class of processor, and the
    operating system, for which your cross compiler will generate code; it
    also determines how your cross compiler will eventually be invoked;
    e.g. if you choose a canonical host triplet, such as `i586-pc-mingw32'
    then you would invoke `gcc', say to compile `foo.c', as:-

    i586-pc-mingw32-gcc -c foo.c

    generating object code suitable for deployment on an Intel Pentium class
    host, running a 32-bit MS-Windows operating system.

    Do note that you cannot make an arbitrary choice for `target-spec'; it
    MUST represent, either directly or by inference, a valid canonical host
    triplet of the form `CPU-MAKER-OSTYPE'. The minimum requirement is that
    you specify the `OSTYPE', and, since you are building a MinGW compiler
    tool chain for the Win32 platform, this MUST be `mingw32'.
    -----8<----------

    You have obviously ignored this, and specified target-spec = i686-pc-linux-gnu, which is invalid; you should be specifying something like i686-pc-mingw32, (or even just i686-mingw32 would be enough).

     
  • Keith Marshall

    Keith Marshall - 2007-10-30
    • labels: --> MinGW
    • milestone: --> Instruction_given
    • assigned_to: nobody --> keithmarshall
    • status: open --> closed