Headers issue

Help
Aurelien
2012-11-07
2013-06-06
  • Aurelien
    Aurelien
    2012-11-07

    Hi,

    I'm trying to cross compile mingw-w64 on linux x68_64 (i686-w64-mingw32 target) from mingw-w64-src_20121106.tar.bz2 package. I followed mingw-w64-howto-build.txt, especially for the mingw link. i'm using prefix/sysroot  set to the same dir /prefix.

    But gcc build complains it cannot find system headers at /prefix/mingw/include despite the symlink. And indeed, there is no /prefix/i686-w64-mingw32/include dir. It seems  everything went to  /prefix/include when headers were installed…
    The workaround to build gcc is to create a simlink from /prefix/i686-w64-mingw32/include to /prefix/include

    Is there an issue with headers install? Do I miss something?

    Aurélien

     
  • rubenvb
    rubenvb
    2012-11-07

    It seems like you are using trunk mingw-w64, which requires you add the target triple subdirectory to -prefix yourself, which would make the invocation:

    configure ….. -prefix=/prefix/i686-w64-mingw32

    If you're absolutely sure the build process uses an old mingw-w64 source, the above is not true, but will still probably fix your issue. I also suggest using newer sources than those from 2011 autobuilds for mingw. It has been almost forever that there are no decent Windows hosted autobuilds. I provide full sources (heck, and even limited support) to compile a complete toolchain. See the "Personal Builds/rubenvb" subdirectories of the "Toolchain sources" and "Toolchains targetting win??" directories on the SF downloads page.

    There is also a makefile under /experimental in SVN which is maintained by JonY which should also work.

     
  • Aurelien
    Aurelien
    2012-11-08

    I downloaded the "Toolchains sources / Automated Builds" sources package (date: 20121106, 3 days ago), so I suspect the sources come from trunk, and adding the target triplet to prefix solves the issue.
    I took a look to your released sources, it looks great!

    I plan to use mingw-w64 cross toolchain to build a private target toolchain on linux build machine for windows host (canadian build) for production releases. So I think I shouldn't use daily trunk sources.
    Do you think I should use your released sources (for example gcc-4.7.2-release_rubenvb.tar.xz), or use minw-w64 release sources (e.g. 2.0.7)  and gcc/bintuils/… official releases ?

    Thanks for your support!
    Aurélien