1. Build WIN 64 Binaries on linux?
- Posted by Thomas Nov 26, 2011
- 1931 views
Hi, When trying to build Win64 i get this error make[2]: i586-mingw32msvcgcc: Command not found Is there a problem with command line parsing in the binaries i use. eubin-2011-10-28-bdfc91ed15da.zip eubin-2011-06-29-3739d931e005.tar.gz ./configure --build ../mw --eubin ~/euphoria/bin64 --plat WINDOWS --cc-prefix i586-mingw32msvc Thanks for any hint.
2. Re: Build WIN 64 Binaries on linux?
- Posted by SDPringle Nov 26, 2011
- 1866 views
So, do you actually have a cross compiler called i586-mingw32msvcgcc? I'm guessing you have one called 'i586-mingw32msvc-gcc' (note the extra dash) and you will have to specify the prefix with the dash in order for Makefile to find it.
3. Re: Build WIN 64 Binaries on linux?
- Posted by mattlewis (admin) Nov 27, 2011
- 1798 views
When trying to build Win64 i get this error
make[2]: i586-mingw32msvcgcc: Command not foundIs there a problem with command line parsing in the binaries i use.
eubin-2011-10-28-bdfc91ed15da.zip eubin-2011-06-29-3739d931e005.tar.gz ./configure --build ../mw --eubin ~/euphoria/bin64 --plat WINDOWS --cc-prefix i586-mingw32msvc
As Shawn mentioned, you actually have to specify the dash at the end of the prefix. That's probably the wrong way to do it, but when I set it up that way, it seemed more generic.
With that compiler, you're going to be compiling to a 32-bit target. The 64-bit cross compiler probably uses something more like x86_64-w64-mingw32 as its prefix.
A 64-bit version of euphoria needs a 4.1 interpreter as its "eubin" in order to translate properly. The 32-bit version of 4.1 will work, but if you use a 4.0 interpreter, it will appear to build, but it will crash. You should be able to build a 4.1 32-bit binary using a 4.0.3 interpreter. Also, you'll want to use a native binary as your eubin (so, Linux, in this case).
Matt
4. Re: Build WIN 64 Binaries on linux?
- Posted by Thomas Nov 27, 2011
- 1804 views
When trying to build Win64 i get this error
make[2]: i586-mingw32msvcgcc: Command not foundIs there a problem with command line parsing in the binaries i use.
eubin-2011-10-28-bdfc91ed15da.zip eubin-2011-06-29-3739d931e005.tar.gz ./configure --build ../mw --eubin ~/euphoria/bin64 --plat WINDOWS --cc-prefix i586-mingw32msvc
As Shawn mentioned, you actually have to specify the dash at the end of the prefix. That's probably the wrong way to do it, but when I set it up that way, it seemed more generic.
With that compiler, you're going to be compiling to a 32-bit target. The 64-bit cross compiler probably uses something more like x86_64-w64-mingw32 as its prefix.
A 64-bit version of euphoria needs a 4.1 interpreter as its "eubin" in order to translate properly. The 32-bit version of 4.1 will work, but if you use a 4.0 interpreter, it will appear to build, but it will crash. You should be able to build a 4.1 32-bit binary using a 4.0.3 interpreter. Also, you'll want to use a native binary as your eubin (so, Linux, in this case).
Matt
Sorry your advice did not change anything. My eubin/eui Euphoria Interpreter v4.1.0 development 64-bit Linux, Using System Memory Revision Date: 2011-06-30 16:06:49, Id: 5038:3739d931e005 And ./configure --build ../mw --eubin ~/euphoria/bin64 --plat WINDOWS --cc-prefix amd64-mingw32msvc- The error: amd64-mingw32msvc-gcc: Command not found
5. Re: Build WIN 64 Binaries on linux?
- Posted by mattlewis (admin) Nov 27, 2011
- 1775 views
Sorry your advice did not change anything.
...
The error:
amd64-mingw32msvc-gcc: Command not found
That sounds like you do not have the 64-bit cross compiler installed. You should have that installed into /usr/bin, and you will probably have similar directories off of /usr which hold all of the includes and libraries. For example, on my machine, I have:
$ which x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc $ ls /usr/*mingw* /usr/i686-w64-mingw32: include lib /usr/x86_64-w64-mingw32: bin include lib share
Additionally, I posted a Win64 eubin that I just cross compiled.
Matt
6. Re: Build WIN 64 Binaries on linux?
- Posted by Thomas Nov 27, 2011
- 1791 views
- Last edited Nov 28, 2011
Additionally, I posted a Win64 eubin that I just cross compiled.
OK, Thank you for your help, i do not know much about linux. I have done some cross compiling in the past 32bit with success.
Do i have to build the 64 bit cross compiler myself?
I do not want to venture that.
7. Re: Build WIN 64 Binaries on linux?
- Posted by mattlewis (admin) Nov 28, 2011
- 1788 views
OK, Thank you for your help, i do not know much about linux. I have done some cross compiling in the past 32bit with success.
Do i have to build the 64 bit cross compiler myself?
I do not want to venture that.
I suppose you could build it yourself. Ideally, your distro has it in your package management system. On Ubuntu, it's called mingw-w64. This actually installs both the 64 and 32 bit tools for me. You can also get MinGW64 for Windows.
Matt
8. Re: Build WIN 64 Binaries on linux?
- Posted by Thomas Nov 28, 2011
- 1765 views
OK, Thank you for your help, i do not know much about linux. I have done some cross compiling in the past 32bit with success.
Do i have to build the 64 bit cross compiler myself?
I do not want to venture that.
I suppose you could build it yourself. Ideally, your distro has it in your package management system. On Ubuntu, it's called mingw-w64. This actually installs both the 64 and 32 bit tools for me. You can also get MinGW64 for Windows.
Matt
I have a fresh install of debian 6.0 64 bit and i looked at the pkg repo whith the search term "Mingw and cross compiler" and installed the recomended packages. Either i am stupid or there is no 64 bit cross compiler. But i do lack the motivation to investigate further. Again thank you for your valuable help and the provided binaries.
9. Re: Build WIN 64 Binaries on linux?
- Posted by jimcbrown (admin) Nov 28, 2011
- 1794 views
OK, Thank you for your help, i do not know much about linux. I have done some cross compiling in the past 32bit with success.
Do i have to build the 64 bit cross compiler myself?
I do not want to venture that.
I suppose you could build it yourself. Ideally, your distro has it in your package management system. On Ubuntu, it's called mingw-w64. This actually installs both the 64 and 32 bit tools for me. You can also get MinGW64 for Windows.
Matt
I have a fresh install of debian 6.0 64 bit and i looked at the pkg repo whith the search term "Mingw and cross compiler" and installed the recomended packages. Either i am stupid or there is no 64 bit cross compiler. But i do lack the motivation to investigate further. Again thank you for your valuable help and the provided binaries.
Aside from the normal gcc-mingw32 package on debian (which contains the 64bit amd64-gcc cross compiler) you also need to install the mingw64 package which contains certain essential files that you won't be able to compile without.
Debian installs the compiler into /usr/amd64-mingw32msvc/bin by default, but I'm not clear on whether or not that's added to the system-wide PATH. You might need a line like this to be able to find it:
export PATH="/usr/amd64-mingw32msvc/bin:$PATH"
Some pretty good, Debian specific instructions are provided here: http://tinc-vpn.org/examples/cross-compiling-64-bit-windows-binary/