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

closed
None
5
2014-08-18
2010-01-26
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 > >> (Page 1 of 2)
  • 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.

     
  • Jim Michaels

    Jim Michaels - 2010-01-30

    ""Target" is the machine type on which the program BUILT by the program you
    are building runs"
    "target" definition is relative and confusingbut your concrete example cleared it up.

    build machine (my machine) is 32-bit XP Pro.
    I think target and host are the same for both cases: I compile for both 32-bit and 64-bit platforms.

    would prefer an sezero build rather than the crashy automated builds, but will work with the automated builds if I have to.
    still, the only toolchains available in the targeting 64-bit directory are the ones I can't run. please fix. thanks.

     
  • Nobody/Anonymous

    You did not answer nightstrike's question, where did you get your download from?

    AFAIK, there are no automated win64 hosted toolchain builds. Autobuilds targeting 64-bit works fine on win32, they are built as cross compilers.

    On 32bit XP compiling for win64, you are win32 hosted, targeting win64.

     
  • Jim Michaels

    Jim Michaels - 2010-01-30

    before I could not execute the "targeting 64-bit toolchains" such as sezero (and still can't with sezero), but with the mingw-w64-1.0-bin_i686-mingw_20100129 build I can now execute both toolchains on my 32-bit system. yahoo!

    that is all I cared about (actually, if the sezero compilers could run on 32-bit too, since that is what I usually download because I consider it more stable).

    The crashes I reported earlier seem to be gone from mingw-w64-1.0-bin_i686-mingw_20100129.

    thanks in advance for any work you do and for the work you have done.

     
  • NightStrike

    NightStrike - 2010-01-30
    • status: open --> closed
     
  • NightStrike

    NightStrike - 2010-01-30

    The reason that mingw-w64-1.0-bin_i686-mingw_20100129 runs on Win32 is that the filename tells you that it runs on win32. The part that says "i686-mingw", that means 32-bit windows. Sezero follows the same naming conventions, so if you download the file with a name that matches what you want, you will succeed.

    Anyway, I'm glad you can get what you need. Take care.

    If you need more help in the future with finding the right download, please open a new support request.

     
  • Ozkan Sezer

    Ozkan Sezer - 2010-01-30

    What you are asking for is, by definition, a cross compiler: run on w32 but target w64. I'm currently try to build one using my source base from 2010-01-23, hopefully will upload in about an hour. Filename will be mingw-w64-bin_i686-mingw_20100123_sezero.zip if all goes well.

     
  • Ozkan Sezer

    Ozkan Sezer - 2010-01-30

    OK, I just uploaded my mingw-w64-bin_i686-mingw_20100123_sezero.zip to "Toolchains targetting Win64 -> Personal Builds". It is supposed to run on win32 but target (ie. create for) win64. For reference, I also included my build script and the build logs in it, too. This one, I did _not_ test myself, so I'd really like to hear whether it works fully correctly for you with all of its components.

     
  • Jim Michaels

    Jim Michaels - 2010-02-01

    the 1/30/2010 build of mingw-w64-bin_i686-mingw_20100123_sezero compiler runs fine on 32-bit OS and generates appropriate 64-bit code. works great!

    yes. a cross compiler. any microsoft or borland compiler is going to be a cross compiler: it will generate code for multiple platforms. all the compilers run on 32-bit OS's (because that means it runs on both 64-bit and 32-bit OS). Microsoft designed their 64-bit OS that way - to run 32-bit as well as 64-bit apps.

    only device drivers must be 64-bit. the nice thing about 64-bit apps is that they have access to more memory and VM than a 32-bit system would - the 32-bit 4GB limit doesn't apply anymore unless your motherboard only has or supports that much memory.

    boy, I wish the 24GB motherboards were back.

     
  • Jim Michaels

    Jim Michaels - 2010-02-01
    • status: closed --> open
     
  • Jim Michaels

    Jim Michaels - 2010-02-01

    by the way, I am not implying that one mingw compiler has to generate code for multiple platforms, I don't mind downloading 2 compilers to do the job - suits me fine :-)

     
  • NightStrike

    NightStrike - 2010-02-01

    Good, because multilib is broken right now :)

    Updating status to Closed.

     
  • NightStrike

    NightStrike - 2010-02-01
    • status: open --> closed
     
  • Jim Michaels

    Jim Michaels - 2010-02-03
    • status: closed --> open
     
  • Jim Michaels

    Jim Michaels - 2010-02-03

    "You did not answer nightstrike's question, where did you get your download
    from?"

    I have used the following in the past:
    mingw-w32-1.0-bin_i686-mingw_20091023.zip
    mingw-w32-1.0-bin_i686-mingw_20100129.zip
    mingw-w32-bin_i686-mingw_20091023.zip
    mingw-w32-bin_i686-mingw_20091117.zip
    mingw-w32-bin_i686-mingw_20091224_sezero.zip
    mingw-w32-bin_i686-mingw_20100123_sezero.zip
    mingw-w32-bin_i686-mingw_20100129.zip
    mingw-w64-1.0-bin_i686-mingw_20091023.zip
    mingw-w64-1.0-bin_i686-mingw_20100129.zip
    mingw-w64-bin_i686-mingw_20091023.zip
    mingw-w64-bin_i686-mingw_20091117.zip
    mingw-w64-bin_i686-mingw_20100123_sezero.zip
    mingw-w64-bin_i686-mingw_20100125.zip
    mingw-w64-bin_x86_64-mingw_20091224_sezero.zip
    mingw-w64-bin_x86_64-mingw_20100123_sezero.zip

    I get these from the targeting 64-bit and targeting 32-bit directories if I remember correctly.

    BTW, once again I am getting crashes from mingw-w32-1.0-bin_i686-mingw_20100129.zip and mingw-w64-1.0-bin_i686-mingw_20100129.zip saying 2 things: "Windows: no disk" and another one that looks like "Windows: no disk. exception processing message c0000013 Parameters 75b6bf7c 4 75b6bf7c

    75b6bf7c" which could be an access violation.

     
  • Ozkan Sezer

    Ozkan Sezer - 2010-02-03

    Please don't reopen entries for irrelevant problems.
    Create a new entry for new problems, instead.

    > BTW, once again I am getting crashes from
    > mingw-w32-1.0-bin_i686-mingw_20100129.zip and
    > mingw-w64-1.0-bin_i686-mingw_20100129.zip saying 2 things: "Windows: no
    > disk" and another one that looks like "Windows: no disk. exception
    > processing message c0000013 Parameters 75b6bf7c 4 75b6bf7c
    >
    > 75b6bf7c" which could be an access violation.

    USB disks attached (detached) from the system?
    (I feel that I remember something like this before,
    but can't recall where..)

     
1 2 > >> (Page 1 of 2)

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks