Building latest GCC on Windows
Building latest GCC on Windows
I've struggled with Cygwin, trying to build latest GCC, but I cannot build one of the three required libraries with Cygwin (MPC).
Unless there is some solution for this that I've been unable to find, it would leave two possibilities:
1. Install a Linux dual-boot on my development machines
2. Install Linux in VirtualPC
The first setup have the obvious drawback that I need to reboot from time to time since my other tools doesn't work on Linux, while the second option probably doesn't work to build GCC since running Linux in an emulator while building GCC would be a real pain.
Ideas?
Unless there is some solution for this that I've been unable to find, it would leave two possibilities:
1. Install a Linux dual-boot on my development machines
2. Install Linux in VirtualPC
The first setup have the obvious drawback that I need to reboot from time to time since my other tools doesn't work on Linux, while the second option probably doesn't work to build GCC since running Linux in an emulator while building GCC would be a real pain.
Ideas?
Re: Building latest GCC on Windows
Not quite if you have an average, recent computer, I'm running VMWare Player in office with core i5, 8GB RAM machine, I gave the linux VM 4GB RAM and it run everything pretty fine - sure you should't encode video or run Photoshop inside the VM, but building gcc is within acceptable speed(less than ten minutes).rdos wrote:running Linux in an emulator while building GCC would be a real pain.
Note that some linux distribution demand more resource than other, for instant, I wouldn't run CentOS in a VM.
By the way, if you absolutely want to run on windows, have you tried MinG?
- xenos
- Member
- Posts: 1121
- Joined: Thu Aug 11, 2005 11:00 pm
- Libera.chat IRC: xenos1984
- Location: Tartu, Estonia
- Contact:
Re: Building latest GCC on Windows
Just out of curiosity: Which tools are you using that require Windows? Is there no alternative for these tools on Linux?
Re: Building latest GCC on Windows
Could you not just install the libmpc-devel package from cygwin? AFAIK gcc requires the mpc, mpfr and gmp libraries to be compiled for the host (which I assume in this case is cygwin) rather than the target?
Regards,
John.
Regards,
John.
Re: Building latest GCC on Windows
I'm guessing that you haven't actually tried Linux in a VM. I do almost all my development work that way; compiling GCC is a breeze. VMs are only really slow when it comes to graphics; as far as processing goes they are not that much slower than the native machine.
Re: Building latest GCC on Windows
I did try to build OpenWatcom from source in virtual XP within Windows 7, and it took almost forever, which is why I think that building GCC that way would take too long. But you are right, I've not tried it.
Another possibility (at least at home), is to use one of my portable PCs that has a dual-boot between Linux and RDOS (but no Windows installed). The problem is that the executables built on Linux then must be moved to some Windows machine, and I have not managed to configure Linux samba-server so I can exchange files between Windows and Linux. OTOH, I could also move the RDOS executables generated to the FAT-partition, and test them directly on RDOS (or download them through RDOS FTP-server). At work, I have no Linux installation, but maybe I could install that on my portable there as well as a tripple-boot.
Another possibility (at least at home), is to use one of my portable PCs that has a dual-boot between Linux and RDOS (but no Windows installed). The problem is that the executables built on Linux then must be moved to some Windows machine, and I have not managed to configure Linux samba-server so I can exchange files between Windows and Linux. OTOH, I could also move the RDOS executables generated to the FAT-partition, and test them directly on RDOS (or download them through RDOS FTP-server). At work, I have no Linux installation, but maybe I could install that on my portable there as well as a tripple-boot.
Re: Building latest GCC on Windows
I use OpenWatcom IDE, but I know that at least the command-line tools should be available on Linux, but I have not tested them. In addition to that, I also need my binary builder tool, which I only have for target Win32 and RDOS, but I suppose I could build it on Linux if I provide enough of the needed classes it relies on (primarily a file-class).XenOS wrote:Just out of curiosity: Which tools are you using that require Windows? Is there no alternative for these tools on Linux?
Re: Building latest GCC on Windows
I tried to download the source for all three libraries. GMP built easily. MPFR failed on an old Cygwin, but built on the newest release. MPC doesn't build on Cygwin. I downloaded several versions, but none of them built. I think the problem is related to Cygwin using DLLs for some of these, and that something is misconfigured in MPC.jnc100 wrote:Could you not just install the libmpc-devel package from cygwin? AFAIK gcc requires the mpc, mpfr and gmp libraries to be compiled for the host (which I assume in this case is cygwin) rather than the target?
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
Re: Building latest GCC on Windows
You don't need to build mpc/mpfr/gmp yourself, just install the binaries using whatever package management system Cygwin provides, they've likely patched it to work in that environment.
Re: Building latest GCC on Windows
Not so. Cygwin doesn't provide them, and uses an old GCC version that doesn't require them.Brynet-Inc wrote:You don't need to build mpc/mpfr/gmp yourself, just install the binaries using whatever package management system Cygwin provides, they've likely patched it to work in that environment.
- Kazinsal
- Member
- Posts: 559
- Joined: Wed Jul 13, 2011 7:38 pm
- Libera.chat IRC: Kazinsal
- Location: Vancouver
- Contact:
Re: Building latest GCC on Windows
Run some flavour of Linux in VirtualBox, and make sure hardware virtualization is on. Compiling GCC through that method on my quad-core i7 takes about twenty minutes. And MPC/MPFR/GMP are available as packages that work right out of the box.
Even if the packages you need are available for Cygwin, I guarantee you that Linux in VBox will be about ten times faster. Not hyperbole.
Even if the packages you need are available for Cygwin, I guarantee you that Linux in VBox will be about ten times faster. Not hyperbole.
Re: Building latest GCC on Windows
If you run the cygwin setup.exe, you should be able to install 3 packages: libmpc-devel (ver 0.8 ), libmpfr-devel (ver 3.0.1) and libgmp-devel (ver 4.3.2) - version numbers correct as of today. You do not have to build these from source. You should then be able to configure and build gcc without issue.rdos wrote:Not so. Cygwin doesn't provide them, and uses an old GCC version that doesn't require them.Brynet-Inc wrote:You don't need to build mpc/mpfr/gmp yourself, just install the binaries using whatever package management system Cygwin provides, they've likely patched it to work in that environment.
Regards,
John.
Re: Building latest GCC on Windows
Yup - the wiki articles on building those libraries were added rather hurriedly by me when they were added as GCC dependencies. As jnc100 says, they are now all available from the Cygwin installer under the lib[x]-devel packages.
Cheers,
Adam
Cheers,
Adam
Re: Building latest GCC on Windows
OK, now I found the required libraries, and I was able to successfully build the GCC cross-compiler with the 4.7.2 source tree for RDOS. Great!