Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running 32 bit of dart sdk failed. #45222

Open
liudonghua123 opened this issue Mar 6, 2021 · 5 comments
Open

Running 32 bit of dart sdk failed. #45222

liudonghua123 opened this issue Mar 6, 2021 · 5 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.

Comments

@liudonghua123
Copy link

liudonghua123 commented Mar 6, 2021

Thank you for taking the time to file an issue!

This tracker is for issues related to:

  • Dart VM

  • dev_compiler

  • Dart SDK Version (dart --version): 1.12.0

  • Whether you are using Windows, MacOSX, or Linux (if applicable): Windows

I want to compile and generate some 32-bit executable. So I download the sdk from https://storage.googleapis.com/dart-archive/channels/stable/release/2.12.0/sdk/dartsdk-windows-ia32-release.zip. Then I tried with a hello world example.
But the dart compile exe failed with the following errors.

Microsoft Windows [Version 10.0.19042.844]
(c) 2020 Microsoft Corporation. All rights reserved.

C:\Users\Liu.D.H>set path=D:\apps\dart\dart-sdk-windows-ia32-1.12.0\bin;%path%

C:\Users\Liu.D.H>d:

D:\>cd code\dart\hello-world

D:\code\dart\hello-world>dart --version
Dart SDK version: 2.12.0 (stable) (Thu Feb 25 19:50:53 2021 +0100) on "windows_ia32"

D:\code\dart\hello-world>dart compile exe hello.dart
Could not find D:\apps\dart\dart-sdk-windows-ia32-1.12.0\bin\snapshots\gen_kernel.dart.snapshot. Have you built the full Dart SDK?

D:\code\dart\hello-world>dir D:\apps\dart\dart-sdk-windows-ia32-1.12.0\bin\snapshots
 Volume in drive D is Programs
 Volume Serial Number is CEF0-10CA

 Directory of D:\apps\dart\dart-sdk-windows-ia32-1.12.0\bin\snapshots

2021-03-06  11:25    <DIR>          .
2021-03-06  11:25    <DIR>          ..
2021-02-26  03:13        15,575,192 analysis_server.dart.snapshot
2021-02-26  03:13        11,783,328 dart2js.dart.snapshot
2021-02-26  03:13         8,718,896 dartanalyzer.dart.snapshot
2021-02-26  03:14        21,237,600 dartdev.dart.snapshot
2021-02-26  03:14        21,237,600 dartdev.dill
2021-02-26  03:13         7,277,504 dartdevc.dart.snapshot
2021-02-26  03:13         9,592,568 dartdoc.dart.snapshot
2021-02-26  03:13         7,817,128 dartfmt.dart.snapshot
2021-02-26  03:13           910,312 dds.dart.snapshot
2021-02-26  03:13         7,766,432 frontend_server.dart.snapshot
2021-02-26  03:13         6,530,144 kernel_worker.dart.snapshot
2021-02-26  03:13         8,749,112 pub.dart.snapshot
              12 File(s)    127,195,816 bytes
               2 Dir(s)   8,007,573,504 bytes free

D:\code\dart\hello-world>D:\apps\dart\dart-sdk\bin\dart --version
Dart SDK version: 2.12.0 (stable) (Thu Feb 25 19:50:53 2021 +0100) on "windows_x64"
D:\code\dart\hello-world>dir D:\apps\dart\dart-sdk\bin\snapshots
 Volume in drive D is Programs
 Volume Serial Number is CEF0-10CA

 Directory of D:\apps\dart\dart-sdk\bin\snapshots

2021-03-04  08:49    <DIR>          .
2021-03-04  08:49    <DIR>          ..
2021-02-26  03:32        22,117,840 analysis_server.dart.snapshot
2021-02-26  03:35        60,825,104 dart2js.dart.snapshot
2021-02-26  03:32         6,686,736 dart2native.dart.snapshot
2021-02-26  03:32        14,675,280 dartanalyzer.dart.snapshot
2021-02-26  03:33        28,560,624 dartdev.dart.snapshot
2021-02-26  03:33        21,237,600 dartdev.dill
2021-02-26  03:33        35,942,960 dartdevc.dart.snapshot
2021-02-26  03:32        15,891,824 dartdoc.dart.snapshot
2021-02-26  03:33        18,798,288 dartfmt.dart.snapshot
2021-02-26  03:32         5,198,272 dds.dart.snapshot
2021-02-26  03:33        33,916,528 frontend_server.dart.snapshot
2021-02-26  03:33        31,821,408 gen_kernel.dart.snapshot
2021-02-26  03:31        32,620,064 kernel-service.dart.snapshot
2021-02-26  03:32        11,861,120 kernel_worker.dart.snapshot
2020-10-06  17:10         6,202,238 libtensorflowlite_c-win64.dll
2021-02-26  03:33        14,754,800 pub.dart.snapshot
              16 File(s)    361,110,686 bytes
               2 Dir(s)   8,007,573,504 bytes free

D:\code\dart\hello-world>

I download both 64-bit and 32-bit dart sdk. And I found the size is quite different. And some files like bin\snapshots\gen_kernel.dart.snapshot is missing from the 32-bit one.

@mraleph
Copy link
Member

mraleph commented Mar 7, 2021

AOT compilation is not supported on 32-bit Intel (aka ia32/x86), hence the missing pieces. We can probably make it emit a good error though.

@liudonghua123
Copy link
Author

@mraleph Thanks, I see. Are there any plans for supporting 32-bit Intel (aka ia32/x86)? Is it a lot of code porting?

@srawlins srawlins added the area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. label Mar 8, 2021
@mraleph
Copy link
Member

mraleph commented Mar 8, 2021

Are there any plans for supporting 32-bit Intel (aka ia32/x86)? Is it a lot of code porting?

No plans at the moment, because there is no clear demand. Most hardware is 64-bit at the moment already. Porting is non-trivial because it requires finding a good way to relocate IA32 code generated by our compiler (other architectures did not require that because they use object pools, which IA32 does not). It is not that hard, but given almost non-existing demand I don't think we are going to work on that.

@liudonghua123
Copy link
Author

liudonghua123 commented Mar 9, 2021

@mraleph Thanks for your helpful explanations and tips. 😄

Most hardware is 64-bit at the moment already.

In my opinion, it's true that most hardware is 64-bit compatible, however some of them maybe install a 32-bit OS, like win 7 32-bit, win 10 32-bit. And sometimes you want to just deploy only a single binary for windows users, so a x86 binary maybe more easier then x64 one because x86 binary could be run on x64 windows.

I will try to do the porting job in my spare time, but I'm new to that field, and I could not guarantee I can finish it. If you could provide me more documentations about win32 porting, that's really awesome.

@jiapengchen
Copy link

jiapengchen commented Oct 14, 2021

Are there any plans for supporting 32-bit Intel (aka ia32/x86)? Is it a lot of code porting?

No plans at the moment, because there is no clear demand. Most hardware is 64-bit at the moment already. Porting is non-trivial because it requires finding a good way to relocate IA32 code generated by our compiler (other architectures did not require that because they use object pools, which IA32 does not). It is not that hard, but given almost non-existing demand I don't think we are going to work on that.

@mraleph Nearly 10 percent of our users use Windows 7 32-bit or Windows 10 32-bit OS. Could you provide more information to help us support AOT on IA32, if you have no plan to implement it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.
Projects
None yet
Development

No branches or pull requests

4 participants