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

windows build broken #183

Closed
gengjiawen opened this issue Nov 3, 2020 · 18 comments
Closed

windows build broken #183

gengjiawen opened this issue Nov 3, 2020 · 18 comments

Comments

@gengjiawen
Copy link
Member

https://github.com/nodejs/node-v8/runs/1340956947

D:\a\node-v8\node-v8\out\Release\obj\global_intermediate\torque-generated\objects-body-descriptors-inl.inc(78,22): error C2027: use of undefined type 'v8::internal::InternalClass' [D:\a\node-v8\node-v8\tools\v8_gypfiles\v8_base_without_compiler.vcxproj]
D:\a\node-v8\node-v8\deps\v8\src\heap\objects-visiting.h(68): message : see declaration of 'v8::internal::InternalClass' [D:\a\node-v8\node-v8\tools\v8_gypfiles\v8_base_without_compiler.vcxproj]
D:\a\node-v8\node-v8\out\Release\obj\global_intermediate\torque-generated\objects-body-descriptors-inl.inc(78,37): error C2079: 'BodyDescriptor' uses undefined class 'v8::internal::InternalClass' [D:\a\node-v8\node-v8\tools\v8_gypfiles\v8_base_without_compiler.vcxproj]
D:\a\node-v8\node-v8\out\Release\obj\global_intermediate\torque-generated\objects-body-descriptors-inl.inc(78,37): error C2146: syntax error: missing ';' before identifier 'final' [D:\a\node-v8\node-v8\tools\v8_gypfiles\v8_base_without_compiler.vcxproj]
D:\a\node-v8\node-v8\out\Release\obj\global_intermediate\torque-generated\objects-body-descriptors-inl.inc(78,43): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\a\node-v8\node-v8\tools\v8_gypfiles\v8_base_without_compiler.vcxproj]
D:\a\node-v8\node-v8\out\Release\obj\global_intermediate\torque-generated\objects-body-descriptors-inl.inc(78,43): error C2059: syntax error: ':' [D:\a\node-v8\node-v8\tools\v8_gypfiles\v8_base_without_compiler.vcxproj]
D:\a\node-v8\node-v8\out\Release\obj\global_intermediate\torque-generated\objects-body-descriptors-inl.inc(78,45): error C2059: syntax error: 'public' [D:\a\node-v8\node-v8\tools\v8_gypfiles\v8_base_without_compiler.vcxproj]
D:\a\node-v8\node-v8\out\Release\obj\global_intermediate\torque-generated\objects-body-descriptors-inl.inc(78,81): error C2143: syntax error: missing ';' before '{' [D:\a\node-v8\node-v8\tools\v8_gypfiles\v8_base_without_compiler.vcxproj]
@targos
Copy link
Member

targos commented Nov 3, 2020

Here's the file as generated on my side:

class FixedArray::BodyDescriptor final : public SuffixRangeBodyDescriptor<8> {
 public:
  static inline int SizeOf(Map map, HeapObject raw_object) {
    return FixedArray::cast(raw_object).AllocatedSize();
  }

};
class WeakFixedArray::BodyDescriptor final : public SuffixRangeWeakBodyDescriptor<8> {
 public:
  static inline int SizeOf(Map map, HeapObject raw_object) {
    return WeakFixedArray::cast(raw_object).AllocatedSize();
  }

};
class SloppyArgumentsElements::BodyDescriptor final : public SuffixRangeBodyDescriptor<8> {
 public:
  static inline int SizeOf(Map map, HeapObject raw_object) {
    return SloppyArgumentsElements::cast(raw_object).AllocatedSize();
  }

};
class FeedbackVector::BodyDescriptor final : public SuffixRangeWeakBodyDescriptor<24> {
 public:
  static inline int SizeOf(Map map, HeapObject raw_object) {
    return FeedbackVector::cast(raw_object).AllocatedSize();
  }

};
class WeakArrayList::BodyDescriptor final : public SuffixRangeWeakBodyDescriptor<8> {
 public:
  static inline int SizeOf(Map map, HeapObject raw_object) {
    return WeakArrayList::cast(raw_object).AllocatedSize();
  }

};
class OnHeapBasicBlockProfilerData::BodyDescriptor final : public SuffixRangeBodyDescriptor<8> {
 public:
  static inline int SizeOf(Map map, HeapObject raw_object) {
    return 56;
  }

};
class ConsString::BodyDescriptor final : public SuffixRangeBodyDescriptor<16> {
 public:
  static inline int SizeOf(Map map, HeapObject raw_object) {
    return 32;
  }

};
class SeqOneByteString::BodyDescriptor final : public DataOnlyBodyDescriptor {
 public:
  static inline int SizeOf(Map map, HeapObject raw_object) {
    return SeqOneByteString::cast(raw_object).AllocatedSize();
  }

};
class SeqTwoByteString::BodyDescriptor final : public DataOnlyBodyDescriptor {
 public:
  static inline int SizeOf(Map map, HeapObject raw_object) {
    return SeqTwoByteString::cast(raw_object).AllocatedSize();
  }

};
class SlicedString::BodyDescriptor final : public SuffixRangeBodyDescriptor<16> {
 public:
  static inline int SizeOf(Map map, HeapObject raw_object) {
    return 32;
  }

};
class ThinString::BodyDescriptor final : public SuffixRangeBodyDescriptor<16> {
 public:
  static inline int SizeOf(Map map, HeapObject raw_object) {
    return 24;
  }

};
class InternalClass::BodyDescriptor final : public SuffixRangeBodyDescriptor<8> {
 public:
  static inline int SizeOf(Map map, HeapObject raw_object) {
    return 24;
  }

};
class SmiPair::BodyDescriptor final : public SuffixRangeBodyDescriptor<8> {
 public:
  static inline int SizeOf(Map map, HeapObject raw_object) {
    return 24;
  }

};
class SmiBox::BodyDescriptor final : public SuffixRangeBodyDescriptor<8> {
 public:
  static inline int SizeOf(Map map, HeapObject raw_object) {
    return 24;
  }

};
class ExportedSubClassBase::BodyDescriptor final : public SuffixRangeBodyDescriptor<8> {
 public:
  static inline int SizeOf(Map map, HeapObject raw_object) {
    return 24;
  }

};
class ExportedSubClass::BodyDescriptor final : public BodyDescriptorBase {
 public:
  static bool IsValidSlot(Map map, HeapObject obj, int offset) {
      bool valid_slots[] = {1,1,1,0,1,};
      return valid_slots[static_cast<unsigned int>(offset)/kTaggedSize];
  }

  template <typename ObjectVisitor>
  static inline void IterateBody(Map map, HeapObject obj, int object_size, ObjectVisitor* v) {
    IteratePointers(obj, 8, 24, v);
    IteratePointer(obj, 32, v);
  }

  static inline int SizeOf(Map map, HeapObject raw_object) {
    return 40;
  }

};
class AbstractInternalClassSubclass1::BodyDescriptor final : public DataOnlyBodyDescriptor {
 public:
  static inline int SizeOf(Map map, HeapObject raw_object) {
    return 8;
  }

};
class AbstractInternalClassSubclass2::BodyDescriptor final : public DataOnlyBodyDescriptor {
 public:
  static inline int SizeOf(Map map, HeapObject raw_object) {
    return 8;
  }

};
class InternalClassWithSmiElements::BodyDescriptor final : public SuffixRangeBodyDescriptor<8> {
 public:
  static inline int SizeOf(Map map, HeapObject raw_object) {
    return InternalClassWithSmiElements::cast(raw_object).AllocatedSize();
  }

};
class InternalClassWithStructElements::BodyDescriptor final : public SuffixRangeBodyDescriptor<16> {
 public:
  static inline int SizeOf(Map map, HeapObject raw_object) {
    return InternalClassWithStructElements::cast(raw_object).AllocatedSize();
  }

};
class ExportedSubClass2::BodyDescriptor final : public BodyDescriptorBase {
 public:
  static bool IsValidSlot(Map map, HeapObject obj, int offset) {
      bool valid_slots[] = {1,1,1,0,1,};
      return valid_slots[static_cast<unsigned int>(offset)/kTaggedSize];
  }

  template <typename ObjectVisitor>
  static inline void IterateBody(Map map, HeapObject obj, int object_size, ObjectVisitor* v) {
    IteratePointers(obj, 8, 24, v);
    IteratePointer(obj, 32, v);
  }

  static inline int SizeOf(Map map, HeapObject raw_object) {
    return 40;
  }

};
class SortState::BodyDescriptor final : public SuffixRangeBodyDescriptor<8> {
 public:
  static inline int SizeOf(Map map, HeapObject raw_object) {
    return 136;
  }

};

@gengjiawen
Copy link
Member Author

Looks like need extra header include for msvc.

@targos
Copy link
Member

targos commented Nov 3, 2020

What about the syntax errors?

@gengjiawen
Copy link
Member Author

Not sure, but from my experience, fix front error will be helpfully for latter error.

@targos
Copy link
Member

targos commented Nov 5, 2020

If you have an idea about which header should be included in which file(s), I'm happy to try it on my Windows machine.

@gengjiawen
Copy link
Member Author

I have not got time to debug yet. I guess this not on hurry since v8 8.8 official release take some time ?

@gengjiawen
Copy link
Member Author

Looks like something wrong with torque-gernerated

This file not generated on windows.
image

@vsemozhetbyt
Copy link

It seems all other builds are also absent for the last 5 days.

@targos
Copy link
Member

targos commented Nov 21, 2020

V8 now requires ICU 68. Canary should be fixed after nodejs/node#36187 lands.

@gengjiawen
Copy link
Member Author

@tebbi I am not familiar with torque, any special part should I check for windows ? #183 (comment)

@targos
Copy link
Member

targos commented Nov 29, 2020

@gengjiawen I checked with V8 8.8 PR (nodejs/node#36139) and the same files are present in the torque-generated directory on both Windows and Linux.

@targos
Copy link
Member

targos commented Nov 29, 2020

Found it: it's the file torque-generated/src/objects/torque-defined-classes-tq-inl.inc that's wrong. It's completely empty on Windows.

Edit: other files are wrong. For example torque-defined-classes-tq.cc

@targos
Copy link
Member

targos commented Nov 29, 2020

Okay, so the issue is in https://github.com/v8/v8/blob/7111248e40379c540ae4c0325a8fb7fc792b9d43/src/torque/source-positions.cc#L48-L55

The method is called with "src/objects/torque-defined-classes.tq" and it matches nothing because in the for loop, all strings have a backslash separator.

@targos
Copy link
Member

targos commented Nov 29, 2020

I'm trying a fix in GYP 🤞

@targos
Copy link
Member

targos commented Nov 29, 2020

I pushed the fix to nodejs/node@c220ba6
Now I'm hitting an issue with mkcodecache:

.\out\Release\mkcodecache.exe test.cc
node:lib/internal/bootstrap/loaders:4343: Uncaught SyntaxError: Identifier 'internalBinding' has already been declared
Failed to compile lib/internal/bootstrap/loaders

/cc @joyeecheung ?

@targos
Copy link
Member

targos commented Nov 29, 2020

This module is not supposed to be requireable. I don't know yet why the condition at https://github.com/nodejs/node/blob/299984561eff45bddc5bb802e5b22d47277e5ca5/tools/code_cache/cache_builder.cc#L130 is true for it.

@targos
Copy link
Member

targos commented Nov 29, 2020

Okay I found it. It's a side-effect of the gyp fix.

@targos
Copy link
Member

targos commented Nov 29, 2020

I'm closing this. We can continue to track other Windows errors in nodejs/node#36139

@targos targos closed this as completed Nov 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants