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

Build broken on Windows (VS2019) #126

Closed
targos opened this issue Dec 4, 2019 · 17 comments
Closed

Build broken on Windows (VS2019) #126

targos opened this issue Dec 4, 2019 · 17 comments

Comments

@targos
Copy link
Member

targos commented Dec 4, 2019

https://ci.nodejs.org/job/node-compile-windows/30296/nodes=win-vs2019-x86/console

10:57:55 mksnapshot.obj : error LNK2019: unresolved external symbol "public: static bool __cdecl v8::internal::BaseShape<class v8::internal::Handle<class v8::internal::Object> >::IsKey(class v8::internal::ReadOnlyRoots,class v8::internal::Object)" (?IsKey@?$BaseShape@V?$Handle@VObject@internal@v8@@@internal@v8@@@internal@v8@@SA_NVReadOnlyRoots@23@VObject@23@@Z) referenced in function "public: static bool __cdecl v8::internal::HashTable<class v8::internal::EphemeronHashTable,class v8::internal::EphemeronHashTableShape>::IsKey(class v8::internal::ReadOnlyRoots,class v8::internal::Object)" (?IsKey@?$HashTable@VEphemeronHashTable@internal@v8@@VEphemeronHashTableShape@23@@internal@v8@@SA_NVReadOnlyRoots@23@VObject@23@@Z) [C:\workspace\node-compile-windows\node\tools\v8_gypfiles\mksnapshot.vcxproj]
10:57:55 snapshot-empty.obj : error LNK2001: unresolved external symbol "public: static bool __cdecl v8::internal::BaseShape<class v8::internal::Handle<class v8::internal::Object> >::IsKey(class v8::internal::ReadOnlyRoots,class v8::internal::Object)" (?IsKey@?$BaseShape@V?$Handle@VObject@internal@v8@@@internal@v8@@@internal@v8@@SA_NVReadOnlyRoots@23@VObject@23@@Z) [C:\workspace\node-compile-windows\node\tools\v8_gypfiles\mksnapshot.vcxproj]
10:57:55 mksnapshot.obj : error LNK2019: unresolved external symbol "public: static bool __cdecl v8::internal::BaseShape<class v8::internal::Handle<class v8::internal::Name> >::IsKey(class v8::internal::ReadOnlyRoots,class v8::internal::Object)" (?IsKey@?$BaseShape@V?$Handle@VName@internal@v8@@@internal@v8@@@internal@v8@@SA_NVReadOnlyRoots@23@VObject@23@@Z) referenced in function "public: static bool __cdecl v8::internal::HashTable<class v8::internal::NameDictionary,class v8::internal::NameDictionaryShape>::IsKey(class v8::internal::ReadOnlyRoots,class v8::internal::Object)" (?IsKey@?$HashTable@VNameDictionary@internal@v8@@VNameDictionaryShape@23@@internal@v8@@SA_NVReadOnlyRoots@23@VObject@23@@Z) [C:\workspace\node-compile-windows\node\tools\v8_gypfiles\mksnapshot.vcxproj]
10:57:55 snapshot-empty.obj : error LNK2001: unresolved external symbol "public: static bool __cdecl v8::internal::BaseShape<class v8::internal::Handle<class v8::internal::Name> >::IsKey(class v8::internal::ReadOnlyRoots,class v8::internal::Object)" (?IsKey@?$BaseShape@V?$Handle@VName@internal@v8@@@internal@v8@@@internal@v8@@SA_NVReadOnlyRoots@23@VObject@23@@Z) [C:\workspace\node-compile-windows\node\tools\v8_gypfiles\mksnapshot.vcxproj]
10:57:55 mksnapshot.obj : error LNK2019: unresolved external symbol "public: static bool __cdecl v8::internal::GlobalDictionaryShape::IsKey(class v8::internal::ReadOnlyRoots,class v8::internal::Object)" (?IsKey@GlobalDictionaryShape@internal@v8@@SA_NVReadOnlyRoots@23@VObject@23@@Z) referenced in function "public: static bool __cdecl v8::internal::HashTable<class v8::internal::GlobalDictionary,class v8::internal::GlobalDictionaryShape>::IsKey(class v8::internal::ReadOnlyRoots,class v8::internal::Object)" (?IsKey@?$HashTable@VGlobalDictionary@internal@v8@@VGlobalDictionaryShape@23@@internal@v8@@SA_NVReadOnlyRoots@23@VObject@23@@Z) [C:\workspace\node-compile-windows\node\tools\v8_gypfiles\mksnapshot.vcxproj]
10:57:55 snapshot-empty.obj : error LNK2001: unresolved external symbol "public: static bool __cdecl v8::internal::GlobalDictionaryShape::IsKey(class v8::internal::ReadOnlyRoots,class v8::internal::Object)" (?IsKey@GlobalDictionaryShape@internal@v8@@SA_NVReadOnlyRoots@23@VObject@23@@Z) [C:\workspace\node-compile-windows\node\tools\v8_gypfiles\mksnapshot.vcxproj]
10:57:55 ..\..\out\Release\mksnapshot.exe : fatal error LNK1120: 3 unresolved externals [C:\workspace\node-compile-windows\node\tools\v8_gypfiles\mksnapshot.vcxproj]
@targos targos changed the title Build broken on Windows Build broken on Windows (VS2019) Dec 4, 2019
@targos
Copy link
Member Author

targos commented Dec 10, 2019

/cc @nodejs/platform-windows

@gengjiawen
Copy link
Member

Also you can see the error from github action.

Log from: https://github.com/nodejs/node-v8/runs/388526007

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2857,5): error MSB4018: The "AssignTargetPath" task failed unexpectedly. [D:\a\node-v8\node-v8\tools\v8_gypfiles\v8_initializers.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2857,5): error MSB4018: System.ArgumentException: Illegal characters in path. [D:\a\node-v8\node-v8\tools\v8_gypfiles\v8_initializers.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2857,5): error MSB4018:    at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional) [D:\a\node-v8\node-v8\tools\v8_gypfiles\v8_initializers.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2857,5): error MSB4018:    at System.IO.Path.IsPathRooted(String path) [D:\a\node-v8\node-v8\tools\v8_gypfiles\v8_initializers.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2857,5): error MSB4018:    at Microsoft.Build.Tasks.AssignTargetPath.Execute() [D:\a\node-v8\node-v8\tools\v8_gypfiles\v8_initializers.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2857,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [D:\a\node-v8\node-v8\tools\v8_gypfiles\v8_initializers.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2857,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() [D:\a\node-v8\node-v8\tools\v8_gypfiles\v8_initializers.vcxproj]

@gengjiawen
Copy link
Member

gengjiawen commented Jan 15, 2020

Looks like path generated not right (target v8-initializer).
Compatibility issue with node-gyp ? cc @nodejs/node-gyp

image

@richardlau
Copy link
Member

node-gyp isn't used to build Node.js. It's possible there's an issue with gyp but it's not failing on the current master.

@gengjiawen
Copy link
Member

Which part in gyp handles include directive, looks like a path format problem.

@richardlau
Copy link
Member

Aren't those #include directives written out by torque?

@gengjiawen
Copy link
Member

Looks like not the root cause, Node.js master branch with same path.

@gengjiawen
Copy link
Member

Another possible cause (right panel is current repo) :
image

@gengjiawen
Copy link
Member

If we remove the $quote in Include value , another build issue will occur

     Creating library ..\..\out\Release\mksnapshot.lib and object ..\..\out\Release\mksnapshot.exp
platform-embedded-file-writer-win.obj : error LNK2019: unresolved external symbol "public: static bool __cdecl v8::internal::BaseShape<class v8::internal::Handle<class v8::internal::Object> >::IsKey(class v8::internal::ReadOnlyRoots,class v8::internal::Object)" (?IsKey@?$BaseShape@V?$H
andle@VObject@internal@v8@@@internal@v8@@@internal@v8@@SA_NVReadOnlyRoots@23@VObject@23@@Z) referenced in function "public: static bool __cdecl v8::internal::HashTable<class v8::internal::EphemeronHashTable,class v8::internal::EphemeronHashTableShape>::IsKey(class v8::internal::ReadOnl
yRoots,class v8::internal::Object)" (?IsKey@?$HashTable@VEphemeronHashTable@internal@v8@@VEphemeronHashTableShape@23@@internal@v8@@SA_NVReadOnlyRoots@23@VObject@23@@Z) [C:\projects\appveyor-playground\node-v8\tools\v8_gypfiles\mksnapshot.vcxproj]
mksnapshot.obj : error LNK2001: unresolved external symbol "public: static bool __cdecl v8::internal::BaseShape<class v8::internal::Handle<class v8::internal::Object> >::IsKey(class v8::internal::ReadOnlyRoots,class v8::internal::Object)" (?IsKey@?$BaseShape@V?$Handle@VObject@internal@
v8@@@internal@v8@@@internal@v8@@SA_NVReadOnlyRoots@23@VObject@23@@Z) [C:\projects\appveyor-playground\node-v8\tools\v8_gypfiles\mksnapshot.vcxproj]
snapshot-empty.obj : error LNK2001: unresolved external symbol "public: static bool __cdecl v8::internal::BaseShape<class v8::internal::Handle<class v8::internal::Object> >::IsKey(class v8::internal::ReadOnlyRoots,class v8::internal::Object)" (?IsKey@?$BaseShape@V?$Handle@VObject@inter
nal@v8@@@internal@v8@@@internal@v8@@SA_NVReadOnlyRoots@23@VObject@23@@Z) [C:\projects\appveyor-playground\node-v8\tools\v8_gypfiles\mksnapshot.vcxproj]
platform-embedded-file-writer-win.obj : error LNK2019: unresolved external symbol "public: static bool __cdecl v8::internal::BaseShape<class v8::internal::Handle<class v8::internal::Name> >::IsKey(class v8::internal::ReadOnlyRoots,class v8::internal::Object)" (?IsKey@?$BaseShape@V?$Han
dle@VName@internal@v8@@@internal@v8@@@internal@v8@@SA_NVReadOnlyRoots@23@VObject@23@@Z) referenced in function "public: static bool __cdecl v8::internal::HashTable<class v8::internal::NameDictionary,class v8::internal::NameDictionaryShape>::IsKey(class v8::internal::ReadOnlyRoots,class
 v8::internal::Object)" (?IsKey@?$HashTable@VNameDictionary@internal@v8@@VNameDictionaryShape@23@@internal@v8@@SA_NVReadOnlyRoots@23@VObject@23@@Z) [C:\projects\appveyor-playground\node-v8\tools\v8_gypfiles\mksnapshot.vcxproj]
mksnapshot.obj : error LNK2001: unresolved external symbol "public: static bool __cdecl v8::internal::BaseShape<class v8::internal::Handle<class v8::internal::Name> >::IsKey(class v8::internal::ReadOnlyRoots,class v8::internal::Object)" (?IsKey@?$BaseShape@V?$Handle@VName@internal@v8@@
@internal@v8@@@internal@v8@@SA_NVReadOnlyRoots@23@VObject@23@@Z) [C:\projects\appveyor-playground\node-v8\tools\v8_gypfiles\mksnapshot.vcxproj]
snapshot-empty.obj : error LNK2001: unresolved external symbol "public: static bool __cdecl v8::internal::BaseShape<class v8::internal::Handle<class v8::internal::Name> >::IsKey(class v8::internal::ReadOnlyRoots,class v8::internal::Object)" (?IsKey@?$BaseShape@V?$Handle@VName@internal@
v8@@@internal@v8@@@internal@v8@@SA_NVReadOnlyRoots@23@VObject@23@@Z) [C:\projects\appveyor-playground\node-v8\tools\v8_gypfiles\mksnapshot.vcxproj]
platform-embedded-file-writer-win.obj : error LNK2019: unresolved external symbol "public: static bool __cdecl v8::internal::GlobalDictionaryShape::IsKey(class v8::internal::ReadOnlyRoots,class v8::internal::Object)" (?IsKey@GlobalDictionaryShape@internal@v8@@SA_NVReadOnlyRoots@23@VObj
ect@23@@Z) referenced in function "public: static bool __cdecl v8::internal::HashTable<class v8::internal::GlobalDictionary,class v8::internal::GlobalDictionaryShape>::IsKey(class v8::internal::ReadOnlyRoots,class v8::internal::Object)" (?IsKey@?$HashTable@VGlobalDictionary@internal@v8
@@VGlobalDictionaryShape@23@@internal@v8@@SA_NVReadOnlyRoots@23@VObject@23@@Z) [C:\projects\appveyor-playground\node-v8\tools\v8_gypfiles\mksnapshot.vcxproj]
mksnapshot.obj : error LNK2001: unresolved external symbol "public: static bool __cdecl v8::internal::GlobalDictionaryShape::IsKey(class v8::internal::ReadOnlyRoots,class v8::internal::Object)" (?IsKey@GlobalDictionaryShape@internal@v8@@SA_NVReadOnlyRoots@23@VObject@23@@Z) [C:\projects
\appveyor-playground\node-v8\tools\v8_gypfiles\mksnapshot.vcxproj]
snapshot-empty.obj : error LNK2001: unresolved external symbol "public: static bool __cdecl v8::internal::GlobalDictionaryShape::IsKey(class v8::internal::ReadOnlyRoots,class v8::internal::Object)" (?IsKey@GlobalDictionaryShape@internal@v8@@SA_NVReadOnlyRoots@23@VObject@23@@Z) [C:\proj
ects\appveyor-playground\node-v8\tools\v8_gypfiles\mksnapshot.vcxproj]
..\..\out\Release\mksnapshot.exe : fatal error LNK1120: 3 unresolved externals [C:\projects\appveyor-playground\node-v8\tools\v8_gypfiles\mksnapshot.vcxproj]

@targos
Copy link
Member Author

targos commented Jan 16, 2020

I can probably handle the unresolved symbols. I did that in the past (it's about inline methods that should be moved from .h to -inl.h)
Now we need to find out what put those quotes and how to prevent that.

@targos
Copy link
Member Author

targos commented Jan 16, 2020

Thanks @gengjiawen for your help on this

@richardlau
Copy link
Member

Another possible cause (right panel is current repo) :
image

I think there should at least be a space between ..\..\deps\v8\src\torque\runtime-support.h and &quot;. @targos Looks like there's a missing comma at the end of this line

'<(V8_ROOT)/src/torque/runtime-support.h'

@richardlau
Copy link
Member

Let's see if fixing the missing comma gets the build further along: #136

@richardlau
Copy link
Member

Looks like it fixed the quote issue and gets to the same unresolved symbols.

@targos
Copy link
Member Author

targos commented Jan 17, 2020

Building on my computer to fix the unresolved symbols.

@targos
Copy link
Member Author

targos commented Jan 17, 2020

Well, I cannot reproduce the errors on my PC (VS 2019). Node builds fine now...

@targos
Copy link
Member Author

targos commented Jan 17, 2020

Actually, VS2019 is fixed 🎉

https://ci.nodejs.org/job/node-compile-windows/31309/

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