Hello sadistic friends.
I have given up.
I am leaving the instructions below but this is plan too difficult and I am moving on to Cygwin. This is will remain here for simply… I don’t know… warnings to others that hair loss is not a good trade-off for getting this to work under MinGW.
We are going to try to build a compiler on Winderz now. This is a follow up to installing crosstool-ng on MinGW on Winderz. You should have MinGW already installed.
- Open up your msys bash shell the batch file – C:\MinGW\msys\1.0\msys.bat as administrator. We will assume that you installed MinGW on C:\MinGW. We will be working from the instructions here. I installed mine at /home/maks/crosstool. Always, I repeat, always run the terminal as administrator or some of the decompression of packages will not occur due to permission errors.
- Export your tool location by typing
Substitute your own path because I don’t think your name is Maks. Now you should be able to run ct-ng now. In fact, if you create a .profile file in your home directory that includes this line, you will never need to type it again.
- Make a directory for your cross compiler. I called mine linux64 and I placed it in my home directory. Remember your name is not Maks. I decided that I am going to build an x86_64_unknown-linux-gnu because I want it to run on an Ubuntu built server 13.10. So in the linux64, type
You can read about using ct-ng from the link above. Then through
I moved to all the latest versions of everything, eglibc, the 3.10 kernel, binutils, etc. Also, make sure that your compiler is not linking statically. This doesn’t work on Windows (and I haven’t tracked down why).
- Ok, now run
You will get errors. We will work through them.
- The first error will be that the filesystem is not case sensitive. We will remedy this by adding the key to the registry.
Set this value to zero.
- The second will be that the OS MINGW32_NT-6.2 is not supported. We will add that. Edit ~/crosstool/lib/ct-ng.1.19.0/scripts/functions and look for a function called CT_DoForceRmdir. Find the case statement and add MINGW32* to the line. It should look like this.
- You may need to create a source directory where all of the tarballs are cached. Simply
- The next error relates to downloading the tarballs and the use of certificates. I determined this by looking at build.log. The utility wget is attempting to validate certificates. For now, we will simply remote the check. Edit ~/crosstool/lib/ct-ng.1.19.0/scripts/functions and look for CT_DoGetFile. On the line that starts with “if CT_DoExecLog ALL wget”, add –no-check-certificate to the command line. Be mindful for split lines in script using the \.
- Oh geez, there is way too much. Headers aren’t there… ugh. Too much. I have given up. I am going to now try my hand at Cygwin.