Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#22 "toolchains targeting 64-bit" do not execute on 32-bit OS

closed
NightStrike
None
5
2010-02-05
2010-01-26
Jim Michaels
No

I want real 64-bit and real 32-bit executables generated by my 32-bit machine.
Currently the "Toolchains targeting 64-bit" do not execute on a 32-bit OS. If you execute g++, you get "This is not a valid win32 application" like I get with any other 64-bit executable.

You shouldn't be worried about 32-bit code executing on a 64-bit OS. it will execute just fine. I tested it on Windows 7, and I have been told by others that is is not a problem on their machines.

I should be able to cross-compile. specifically, I should be able to generate real 64-bit executables on a 32-bit machine, and I should be able to generate real 32-bit executables as well.

so what I am saying is the 64-bit toolchain AND the 32-bit toolchain should both be 32-bit but generate either 64-bit or 32-bit code.

With Windows Vista and Windows 7 though, you must have an XML manifest compiled in if it is put in C:\Program Files or it will be moved into the Virtual Store, which is somewhere in AppData.

see my web page at http://jesusnjim.com/code/mingw.html
if you need information on the XML format and a batch file for making executables with a manifest using various flavors of mingw.

If you want, you can include the batch file with the compiler. It is fine with me. If you do, you might also want to include a .URL (internet shortcut) file along with it that points to the web page you got it from. (see URL above)

Discussion

1 2 3 > >> (Page 1 of 3)
  • Kai Tietz
    Kai Tietz
    2010-01-26

    • status: open --> pending-invalid
     
  • Kai Tietz
    Kai Tietz
    2010-01-26

    If you are using a 32-bit OS, then you should use a toolchain compiled for this host. The toolchain mingw-w64-bin_i686-mingw_20100125.zip should be what you are searching for (https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Automated%20Builds/mingw-w64-bin_i686-mingw_20100125.zip/download).
    For building 32-bit Windows executable use mingw-w32-bin_i686-mingw_20100125.zip, also to be found on our download sections under targeting Win32.

    We don't provide at the moment multilib toolchains (32-bit and 64-bit code generation within one toolchain) as there are at the moment some disturbing nits about shared libary colission.

    I tested this version on my XP32 and it works just happily.

    Regards,
    Kai

     
  • Jim Michaels
    Jim Michaels
    2010-01-26

    • status: pending-invalid --> open-invalid
     
  • Jim Michaels
    Jim Michaels
    2010-01-26

    but the "toolchains targeting 32-bit" generate 32-bit executables. I can execute them on my 32-bit OS (that's a 32-bit output compiler). no different than using sf.net/projects/mingw except that it uses a dll. if the output executes in your 32-bit OS, it is not a true 64-bit executable.

    When executed, a real 64-bit app should give you the error "not a valid win32 application" and then "access denied". just like when you try to execute the 64-bit toolchain on a 32-bit OS.

    I would be happy with downloading different compilers and putting them in different directories if I could only get the proper output.

    one of the problems is that in the files download area the title says ""targeting 64-bit" rather than "for 64-bit" which say 2 very different things.

     
  • NightStrike
    NightStrike
    2010-01-26

    • status: open-invalid --> open-accepted
     
  • NightStrike
    NightStrike
    2010-01-26

    (I have moved this into the "Support Requests" tracker, since what you really need is support with navigating our site.)

    I think I should clarify some terms here:

    "Build" is the machine type on which you are you building a program
    "Host" is the machine type on which the program you are building *runs*
    "Target" is the machine type on which the program BUILT by the program you are building runs

    In our context, when we say "Toolchains targetting Win64" or "Win32", what that means is that the toolchains in those directories will generate code for the stated machine type. So if you download a toolchain in the directory "Toolchains targetting Win64", all of those will generate executables that are 64-bit and will only run on a Win64 system. If you instead download a toolchain in the directory "Toolchains targetting Win32", all of those will generate executables that are 32-bit, and will run on a Win32 system.

    Within each directory are a bunch of choices for which toolchain to download. The filename convention will explain to you what *HOST* machine the toolchain will run on. This allows cross compiling from any of half a dozen different architectures to either Win32 or Win64.

    So, to restate where we are thus far:
    The *directory* tells you what the *target* system is
    The *filename* tells you what the *host* system is.

    Now.... what system are you trying to run the compiler on, and what system do you want the compiler to generate executables for? Answer me those two questions, and I'll tell you what to download.

     
  • NightStrike
    NightStrike
    2010-01-26

    • assigned_to: nobody --> nightstrike
    • status: open-accepted --> open
     
  • Jim Michaels
    Jim Michaels
    2010-01-27

    I tried the toolchain you gave and I got the following crash (seen this before with automated builds):
    Windows - No Disk
    Exception processing Message c0000013 Parameters 75b6bf7c 4 75b6bf7c 75b6bf7c

    C:\mingw-w64-bin_i686-mingw_20100125\bin>x86_64-w64-mingw32-g++.exe
    x86_64-w64-mingw32-g++.exe: no input files
    so at least it is executing, but it is limping.

     
  • NightStrike
    NightStrike
    2010-01-27

    Please tell me:

    1) What file did you download?
    2) What is the host triplet architecture on which you are running?

     
  • Jim Michaels
    Jim Michaels
    2010-01-30

    you changed your definition of "targeting".

    your latter definition for "targeting 64-bit" meaning "generating 64-bit code and executables" was what I originally expected/understood. that is why I downloaded both sezero compilers originally.

    However, the toolchains targeting 64-bit only execute on 64-bit machines. they do not execute on 32-bit machines.
    Please recompile it so it will run on 32-bit machines but generate 64-bit code and executables. that is what I have been trying to say with this bug report. it's currently impossible for a large percentage of users to run your 64-bit toolchain.

     
1 2 3 > >> (Page 1 of 3)