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

The format of dart.lib in 64-bit Dart SDK (Windows) is 32 bit #7792

Closed
DartBot opened this issue Jan 9, 2013 · 14 comments
Closed

The format of dart.lib in 64-bit Dart SDK (Windows) is 32 bit #7792

DartBot opened this issue Jan 9, 2013 · 14 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. os-windows P1 A high priority bug; for example, a single project is unusable or has many test failures

Comments

@DartBot
Copy link

DartBot commented Jan 9, 2013

This issue was originally filed by [email protected]


What steps will reproduce the problem?

  1. Download 64-bit Dart SDK (Windows) and unzip
  2. cd dart-sdk/bin
  3. dumpbin dart.lib /headers

   to check the library format
 -----
D:\Program\dart-sdk-x64\bin>dumpbin dart.lib /headers
Microsoft (R) COFF/PE Dumper Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.

Dump of file dart.lib

File Type: LIBRARY

FILE HEADER VALUES
             14C machine (x86)
  ---

What is the expected output? What do you see instead?
Expect to see (x64) version but see (x86)

What version of the product are you using? On what operating system?
dart-sdk 0.2.10.1_r16761, Win7

Please provide any additional information below.

I found this when I try to compile the sample_extension to 64 bit DLL. The MS Visual Studio complains "unresolved external symbol Dart_Null referenced in function sample_extension_Init". Yet it works perfect when I compile the sample_extension to 32 bit DLL.

@whesse
Copy link
Contributor

whesse commented Jan 9, 2013

There is no support for 64-bit windows in Dart, and building on Windows with the --arch=x64 flag builds the ia32 version instead.

It is unclear whether compiling the 64-bit version should work or not - the only bug about this has been marked fixed. (http://code.google.com/p/dart/issues/detail?id=1968).


Removed Priority-Medium label.
Added Priority-Low, Area-VM, OpSys-Windows, Triaged labels.
Marked this as being blocked by #1968.

@DartBot
Copy link
Author

DartBot commented Feb 12, 2014

This comment was originally written by [email protected]


I have the same problem of the reporter.

I noticed another thing:

dumpbin dart.lib /exports

Finds all symbols with an underscore as a first latter, e.g.,
_Dart_False
_DartExitScope

while the linker tries to find
Dart_False
Dart_ExitScope

Could that be the root course for unresolved externals?

@DartBot
Copy link
Author

DartBot commented Feb 12, 2014

This comment was originally written by [email protected]


I modified the header to use a underscore in front "_Dart_False":
Now the compiler complains about x64/x86 incompatibility.
So the root reason is in fact that the lib is not x64 but x86.

Is there any way to fix this? Could compiling the lib myself fix the issue?

This means I am not able to use our selfmade dart extension on Windows (:(, Mac/Linux works) as we definitely require 64-bit.

@anders-sandholm
Copy link
Contributor

Added C7 label.

@anders-sandholm
Copy link
Contributor

cc @iposva-google.

@iposva-google
Copy link
Contributor

Set owner to @mraleph.
Removed Priority-Low label.
Added Priority-High, Accepted labels.

@iposva-google
Copy link
Contributor

Unmarked this as being blocked by #1968.

@mraleph
Copy link
Member

mraleph commented Jun 2, 2014

Just want to give a small update on this. I have started to look at this today and I have the first working build of X64 Dart VM on Windows.

However it will still take a bit before we get into the state where it passes all the tests. There is a noticeable difference in ABI between Windows and *nix systems and ABI assumptions are scattered across different parts of runtime.

d:\src\dart\dart\build\ReleaseX64>dumpbin /headers dart.exe
Dump of file dart.exe

PE signature found

File Type: EXECUTABLE IMAGE

FILE HEADER VALUES
            8664 machine (x64)
               9 number of sections
        538CC5A3 time date stamp Mon Jun 02 20:42:43 2014
               0 file pointer to symbol table
               0 number of symbols
              F0 size of optional header
              22 characteristics
                   Executable
                   Application can handle large (>2GB) addresses

d:\src\dart\dart\build\ReleaseX64>dart test.dart
Hello from x64 version of Dart VM

@mraleph
Copy link
Member

mraleph commented Jun 2, 2014

Added Started label.

@mraleph
Copy link
Member

mraleph commented Jun 4, 2014

Fix is under review: https://codereview.chromium.org/317773002/

@mraleph
Copy link
Member

mraleph commented Jun 6, 2014

Fixed by r37078.

tools/build.py -a x64 runtime

should now correctly build a working x64 Dart VM


Added Fixed label.

@DartBot
Copy link
Author

DartBot commented Jun 6, 2014

This comment was originally written by [email protected]


Thank you very much for the fix.
Can you already tell us in which dart version the fix is in?

@mraleph
Copy link
Member

mraleph commented Jun 6, 2014

I just landed a fix so it's not yet in any released version.

I am not sure how we should proceed with this.

Bill & Rico: do we have a continuous builder that will produce a Win64 SDK? Can we / should we cherry pick the r37078 into a 1.5? Overall it's a safe change from my point of view.


cc @ricowind.
cc @whesse.

@mraleph
Copy link
Member

mraleph commented Jun 11, 2014

Bill found out that we already have continuous builds of Win64 SDK:

http://gsdview.appspot.com/dart-archive/channels/be/raw/latest/sdk/dartsdk-windows-x64-release.zip

I verified that dart.exe and dart.lib included with these builds are indeed x64 now.

@anja.gerstmair: these are the bleeding edge builds so they might not be stable yet, but you can try them out already without building your own Dart VM from source. If you decide to try them, please tell us if they work as expected. Thanks.

@DartBot DartBot added Type-Defect P1 A high priority bug; for example, a single project is unusable or has many test failures area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. os-windows labels Jun 11, 2014
This issue was closed.
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, and the AOT and JIT backends. os-windows P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

No branches or pull requests

5 participants