Discussion:
[Mingw-users] cross compiler for mingw on linux
Bj Raz
2011-05-03 16:06:56 UTC
Permalink
I am trying to build a cross compiler to build Windows exes on linux,
I have looked for help and found this:
http://gcc.gnu.org/ml/gcc-bugs/2009-04/msg01029.html

this messages gives a document on "mingw-w64-howto-build" that no
longer exists on sourceforge.net.

This is the error I'm getting:
In file included from ../.././gcc/tm.h:11,
                 from ../../../gcc-4.3.2/libgcc/../gcc/libgcc2.c:35:
../../../gcc-4.3.2/libgcc/../gcc/config/i386/cygming.h:68:19: error:
stdio.h: No such file or directory
make[2]: *** [_muldi3.o] Error 1
make[2]: Leaving directory
`/home/whitequill/Share/build.gcc/x86_64-w64-mingw32/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `/home/whitequill/Share/build.gcc'
make: *** [all] Error 2
Volker Grabsch
2011-05-03 22:54:46 UTC
Permalink
Post by Bj Raz
I am trying to build a cross compiler to build Windows exes on linux,
http://gcc.gnu.org/ml/gcc-bugs/2009-04/msg01029.html
this messages gives a document on "mingw-w64-howto-build" that no
longer exists on sourceforge.net.
If 32-bit and static linking are okay for you, you might want to
give the mingw-cross-env project a try:

http://mingw-cross-env.nongnu.org/

Even if the project doesn't suit your needs, its src/gcc.mk source
file demonstrates how to build a GCC 4.6.0 cross compiler for MinGW.
Also note that you should build a suitable Binutils version before
(see src/binutils.mk).



Greets,
Volker
--
Volker Grabsch
---<<(())>>---
Tomi Ollila
2011-05-04 08:39:35 UTC
Permalink
Post by Volker Grabsch
Post by Bj Raz
I am trying to build a cross compiler to build Windows exes on linux,
http://gcc.gnu.org/ml/gcc-bugs/2009-04/msg01029.html
this messages gives a document on "mingw-w64-howto-build" that no
longer exists on sourceforge.net.
If 32-bit and static linking are okay for you, you might want to
http://mingw-cross-env.nongnu.org/
Even if the project doesn't suit your needs, its src/gcc.mk source
file demonstrates how to build a GCC 4.6.0 cross compiler for MinGW.
Also note that you should build a suitable Binutils version before
(see src/binutils.mk).
Also, if 32-bit (and static linking) are okay, you could try already-made
binary packages in Linux, at least debian, ubuntu & fedora has those
available (just checked), probably many others too, try

$ apt-cache search mingw
or
$ yum search mingw

To check what packages are available.
Post by Volker Grabsch
Greets,
Volker
Tomi
Bj Raz
2011-05-05 16:41:30 UTC
Permalink
Post by Tomi Ollila
Post by Volker Grabsch
Post by Bj Raz
I am trying to build a cross compiler to build Windows exes on linux,
http://gcc.gnu.org/ml/gcc-bugs/2009-04/msg01029.html
this messages gives a document on "mingw-w64-howto-build" that no
longer exists on sourceforge.net.
If 32-bit and static linking are okay for you, you might want to
http://mingw-cross-env.nongnu.org/
Even if the project doesn't suit your needs, its src/gcc.mk source
file demonstrates how to build a GCC 4.6.0 cross compiler for MinGW.
Also note that you should build a suitable Binutils version before
(see src/binutils.mk).
Also, if 32-bit (and static linking) are okay, you could try already-made
binary packages in Linux, at least debian, ubuntu & fedora has those
available (just checked), probably many others too, try
$ apt-cache search mingw
or
$ yum search mingw
To check what packages are available.
Post by Volker Grabsch
Greets,
Volker
Tomi
which yum repositories? I don't have a lot of them configured right now. :(
Post by Tomi Ollila
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today.  Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
MinGW-users mailing list
This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.
_______________________________________________
https://lists.sourceforge.net/lists/listinfo/mingw-users
Tomi Ollila
2011-05-05 18:45:39 UTC
Permalink
Post by Bj Raz
Post by Tomi Ollila
Also, if 32-bit (and static linking) are okay, you could try already-made
binary packages in Linux, at least debian, ubuntu & fedora has those
available (just checked), probably many others too, try
$ apt-cache search mingw
or
$ yum search mingw
To check what packages are available.
Post by Volker Grabsch
Greets,
Volker
Tomi
which yum repositories? I don't have a lot of them configured right now. :(
The default should be fine -- let's see... On my Fedora 13 I have
configured:

$ ls -l /etc/yum.repos.d/
-rw-r--r--. 1 root root 1144 May 7 2010 fedora.repo
-rw-r--r--. 1 root root 1105 May 7 2010 fedora-updates.repo
-rw-r--r--. 1 root root 1163 May 7 2010 fedora-updates-testing.repo
-rw-r--r--. 1 root root 1301 Apr 16 2010 rpmfusion-free-rawhide.repo
-rw-r--r--. 1 root root 1202 Apr 16 2010 rpmfusion-free.repo
-rw-r--r--. 1 root root 1200 Apr 16 2010 rpmfusion-free-updates.repo
-rw-r--r--. 1 root root 1260 May 17 2009 rpmfusion-free-updates-testing.repo

Those might be in rpmfusion repo(s) then...

Tomi
Bj Raz
2011-05-05 21:47:00 UTC
Permalink
Post by Tomi Ollila
Post by Bj Raz
Post by Tomi Ollila
Also, if 32-bit (and static linking) are okay, you could try already-made
binary packages in Linux, at least debian, ubuntu & fedora has those
available (just checked), probably many others too, try
$ apt-cache search mingw
or
$ yum search mingw
To check what packages are available.
Post by Volker Grabsch
Greets,
Volker
Tomi
which yum repositories? I don't have a lot of them configured right now. :(
The default should be fine -- let's see... On my Fedora 13 I have
$ ls -l /etc/yum.repos.d/
-rw-r--r--. 1 root root 1144 May  7  2010 fedora.repo
-rw-r--r--. 1 root root 1105 May  7  2010 fedora-updates.repo
-rw-r--r--. 1 root root 1163 May  7  2010 fedora-updates-testing.repo
-rw-r--r--. 1 root root 1301 Apr 16  2010 rpmfusion-free-rawhide.repo
-rw-r--r--. 1 root root 1202 Apr 16  2010 rpmfusion-free.repo
-rw-r--r--. 1 root root 1200 Apr 16  2010 rpmfusion-free-updates.repo
-rw-r--r--. 1 root root 1260 May 17  2009 rpmfusion-free-updates-testing.repo
Those might be in rpmfusion repo(s) then...
Tomi
That' is probably why then, I have Suse 11.3. So I have to add repos manually.
Post by Tomi Ollila
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today.  Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
MinGW-users mailing list
This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.
_______________________________________________
https://lists.sourceforge.net/lists/listinfo/mingw-users
Bj Raz
2011-05-05 21:53:54 UTC
Permalink
Post by Tomi Ollila
Post by Bj Raz
Post by Tomi Ollila
Also, if 32-bit (and static linking) are okay, you could try already-made
binary packages in Linux, at least debian, ubuntu & fedora has those
available (just checked), probably many others too, try
$ apt-cache search mingw
or
$ yum search mingw
To check what packages are available.
Post by Volker Grabsch
Greets,
Volker
Tomi
which yum repositories? I don't have a lot of them configured right now. :(
The default should be fine -- let's see... On my Fedora 13 I have
$ ls -l /etc/yum.repos.d/
-rw-r--r--. 1 root root 1144 May  7  2010 fedora.repo
-rw-r--r--. 1 root root 1105 May  7  2010 fedora-updates.repo
-rw-r--r--. 1 root root 1163 May  7  2010 fedora-updates-testing.repo
-rw-r--r--. 1 root root 1301 Apr 16  2010 rpmfusion-free-rawhide.repo
-rw-r--r--. 1 root root 1202 Apr 16  2010 rpmfusion-free.repo
-rw-r--r--. 1 root root 1200 Apr 16  2010 rpmfusion-free-updates.repo
-rw-r--r--. 1 root root 1260 May 17  2009 rpmfusion-free-updates-testing.repo
Those might be in rpmfusion repo(s) then...
Tomi
That' is probably why then, I have Suse 11.3.  So I have to add repos manually.
I guess new errors mean progress. :)
I did succeed in getting to glibc before, but I took JonY's noting I'm
suing an older gcc, and decided to pull down the source.
So as of now, I'm getting error:

The directory that should contain system headers does not exist:
/tools/x86_64-w64-mingw32/sys-include
In file included from /mnt/network/source/gcc/libgcc/../gcc/tsystem.h:44:0,
from /mnt/network/source/gcc/libgcc/../gcc/libgcc2.c:29:
/home/lfs/build.gcc/./gcc/include/stddef.h:1:25: fatal error:
stddef.h: No such file or directory
compilation terminated.
make[2]: *** [_muldi3.o] Error 1
make[1]: *** [all-target-libgcc] Error 2
make: *** [all] Error 2

tell me what headers does it want?
Post by Tomi Ollila
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today.  Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
MinGW-users mailing list
This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.
_______________________________________________
https://lists.sourceforge.net/lists/listinfo/mingw-users
Bj Raz
2011-05-05 21:59:16 UTC
Permalink
Post by Bj Raz
Post by Tomi Ollila
Post by Bj Raz
Post by Tomi Ollila
Also, if 32-bit (and static linking) are okay, you could try already-made
binary packages in Linux, at least debian, ubuntu & fedora has those
available (just checked), probably many others too, try
$ apt-cache search mingw
or
$ yum search mingw
To check what packages are available.
Post by Volker Grabsch
Greets,
Volker
Tomi
which yum repositories? I don't have a lot of them configured right now. :(
The default should be fine -- let's see... On my Fedora 13 I have
$ ls -l /etc/yum.repos.d/
-rw-r--r--. 1 root root 1144 May  7  2010 fedora.repo
-rw-r--r--. 1 root root 1105 May  7  2010 fedora-updates.repo
-rw-r--r--. 1 root root 1163 May  7  2010 fedora-updates-testing.repo
-rw-r--r--. 1 root root 1301 Apr 16  2010 rpmfusion-free-rawhide.repo
-rw-r--r--. 1 root root 1202 Apr 16  2010 rpmfusion-free.repo
-rw-r--r--. 1 root root 1200 Apr 16  2010 rpmfusion-free-updates.repo
-rw-r--r--. 1 root root 1260 May 17  2009 rpmfusion-free-updates-testing.repo
Those might be in rpmfusion repo(s) then...
Tomi
That' is probably why then, I have Suse 11.3.  So I have to add repos manually.
I guess new errors mean progress. :)
I did succeed in getting to glibc before, but I took JonY's noting I'm
suing an older gcc, and decided to pull down the source.
 /tools/x86_64-w64-mingw32/sys-include
In file included from /mnt/network/source/gcc/libgcc/../gcc/tsystem.h:44:0,
stddef.h: No such file or directory
compilation terminated.
make[2]: *** [_muldi3.o] Error 1
make[1]: *** [all-target-libgcc] Error 2
make: *** [all] Error 2
tell me what headers does it want?
Never mind I think I just answered my own question. It wants the mingw headers.
Post by Bj Raz
Post by Tomi Ollila
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today.  Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
MinGW-users mailing list
This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.
_______________________________________________
https://lists.sourceforge.net/lists/listinfo/mingw-users
JonY
2011-05-04 01:25:47 UTC
Permalink
Post by Bj Raz
I am trying to build a cross compiler to build Windows exes on linux,
http://gcc.gnu.org/ml/gcc-bugs/2009-04/msg01029.html
this messages gives a document on "mingw-w64-howto-build" that no
longer exists on sourceforge.net.
In file included from ../.././gcc/tm.h:11,
stdio.h: No such file or directory
make[2]: *** [_muldi3.o] Error 1
make[2]: Leaving directory
`/home/whitequill/Share/build.gcc/x86_64-w64-mingw32/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `/home/whitequill/Share/build.gcc'
make: *** [all] Error 2
--Moving thread to mingw-w64 public--

Looks like you're missing mingw-w64-headers. GCC 4.3.2 is also way too
old for mingw-w64, time to move on to 4.5.x or 4.6.x.
Continue reading on narkive:
Loading...