#24 Basic Installation Question

closed
None
5
2010-02-24
2010-02-19
No

I would like to install MinGW-w64 on my 64-bit Linux machine as a cross-compiler to create executables for a 64-bit Windows 7 machine.
To this end I downloaded mingw-w64-1.0.bin-x86_64-linux_20100219.tar.gz and unpacked it into my /usr/local directory (I hope that was the right thing to do!).
I am uncertain as to what my next step should be. I would appreciate it if someone would provide some clear guidance as to what my next steps should be.
Thanks.

Jim Tilton

Discussion

  • Jonathan Yong

    Jonathan Yong - 2010-02-20

    You can unpack it anywhere, /opt/mingw-w64 is fine too. Once you've unpacked it, just make sure the top level bin (eg /opt/mingw-w64/bin) directory is in your $PATH environment variable.

     
  • NightStrike

    NightStrike - 2010-02-20

    As Jon said, put the bin directory in your PATH, and then execute the desired binaries in that directory. You'll notice that all of the filenames are prefixed with the triplet corresponding to yoru selected target -- x86_64-w64-mingw32. For instance, "gcc" isn't "gcc". It's "x86_64-w64-mingw32-gcc".

    The easiest way to use these is with a package that PROPERLY uses autoconf/automake. Simply pass --host=x86_64-w64-mingw32 to configure, and you should be good to go.

    Other packages will vary.

     
  • Jonathan Yong

    Jonathan Yong - 2010-02-21

    See the article on installing the toolchain as well <http://sourceforge.net/apps/trac/mingw-w64/wiki/Installation%20of%20binary%20toolchain%20packages>

     
  • Jonathan Yong

    Jonathan Yong - 2010-02-21
    • status: open --> closed
     
  • James Tilton

    James Tilton - 2010-02-23
    • status: closed --> open
     
  • James Tilton

    James Tilton - 2010-02-23

    Thank you jon_y and nightstrike for your responses.

    Apparently more is required than just unpacking the tar file in an appropriate location. When I type the command "x86_64-w64-mingw32-gcc -v" I get the error message:

    x86_64-w64-mingw32-gcc: /lib64/libc.so.6: version `GLIBC_2.11' not found (required by x86_64-w64-mingw32-gcc)

    What do I need to do to correct this problem?

    Thanks again for your help.

     
  • Ozkan Sezer

    Ozkan Sezer - 2010-02-23

    > x86_64-w64-mingw32-gcc: /lib64/libc.so.6: version `GLIBC_2.11' not found
    > (required by x86_64-w64-mingw32-gcc)
    >
    > What do I need to do to correct this problem?

    It means that your x86_64-linux setup has an older glibc version than
    the toolchain was actually compiled against. The only thing you can do
    is updating your glibc which is **NOT** recommended. That leaves you
    the option of compiling your own toolchain, I'm afraid.

     
  • NightStrike

    NightStrike - 2010-02-23

    It would seem that the version of glibc that we dynmaically link against for our linux builds differs from what is available on your system. What do you use?

     
  • James Tilton

    James Tilton - 2010-02-23

    Apparently my system has version 2.5 of glibc.

    Looks like I'll have to compile my own toolchain. To do that it appears I should download the source tar from http://sourceforge.net/projects/mngw-64/files (mingw-64-src_20100223.tar.bz2 appears to be the latest) and go from there.

    Correct?

    Thanks.

     
  • NightStrike

    NightStrike - 2010-02-23

    We provide a make file that in one command will do everything for you. Look in the svn repo under experimental/buildsystem/makebuildroot.mk. You can give that makefile either the source tarball you referenced just now, or you can provide it nothing, and it'll download trunk versions of the toolchain (gcc, binutils, mingw-w64), and the latest release versions of GMP and MPFR. After it gets the sources (via d/l or tarball), it'll build the whole thing for you.

    It supports -j, and it takes a while. Just fire and forget.

     
  • James Tilton

    James Tilton - 2010-02-23

    I would like to build mingw-w64 as a cross-compiler with a Linux host and Windows target. Shouldn't I use your makebuildroot.sh for that? I'm not familiar with how I would use your makebuildroot.mk on my Linux system. I apologize for not being current on these build technologies.

    Not sure what your are referring to with your "It supports -j" comment.

    Thanks again.

     
  • Jonathan Yong

    Jonathan Yong - 2010-02-23

    You can get the makefile from <http://mingw-w64.svn.sourceforge.net/svnroot/mingw-w64/experimental/buildsystem/makebuildroot.mk>.

    Once you have it, just use "make -k makebuildroot.mk" to build the mingw-w64 toolchain. You should already have a working host toolchain, autoconf/automake, wget, cvs,and svn installed first.

    If you want to use the released tarball, just use "make -f makebuildroot.mk SRC_ARCHIVE=mingw-64-src_20100223.tar.bz2".

    The -j part is passed to make to make targets in parallel, good idea if you have multiple logical CPUs, eg make -j3 or make -j5.

     
  • James Tilton

    James Tilton - 2010-02-23

    OK - I downloaded makebuildroot.mk and see that its a makefile.

    It appears that I have working host toolchain installed: autoconf (version 2.59)/automake (version 1.9.6), wget (version 1.11.4), cvs (1.11.22), and svn (version 1.4.2).

    Are the cited versions adequate?

    Thanks.

     
  • James Tilton

    James Tilton - 2010-02-23

    One more question - and I think I should be good to go:

    In using makebuildroot.mk, how do I specify where I want to have the resulting libraries, binaries, include files, etc. installed??

    Thanks again for your help.

     
  • Jonathan Yong

    Jonathan Yong - 2010-02-24

    makebuildroot.mk will build a tarball called mingw-w64-bin_$(shell uname -s).tar.bz2, it is similar in structure to the downloads provided.

    The installation instruction is also similar.

     
  • James Tilton

    James Tilton - 2010-02-24

    OK - Thanks! I think I've got it now! I really appreciate all the help I've received here!

     
  • NightStrike

    NightStrike - 2010-02-24

    You're welcome. Don't hestitate to ask for anything else.

    Issue closed.

     
  • NightStrike

    NightStrike - 2010-02-24
    • assigned_to: nobody --> jon_y
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks