-
Notifications
You must be signed in to change notification settings - Fork 30k
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
test: --enable-static linked executable #14986
Conversation
node.gyp
Outdated
], | ||
'xcode_settings': { | ||
'OTHER_LDFLAGS': [ | ||
'-Wl,-force_load,<(PRODUCT_DIR)/libnode.a', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird indentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I'll fix that.
node.gyp
Outdated
], | ||
}, | ||
'conditions': [ | ||
['OS in "linux freebsd"', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, this does look like it's missing a couple of platforms where --whole-archive
can be used. We also need to disable the static node
build on platforms that don't support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it!
node.gyp
Outdated
{ | ||
'target_name': 'static_node', | ||
'type': 'executable', | ||
'product_name': 'node', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be <(node_core_target_name)
as well?
Also AFAICT product_name
is only supported for xcode
, MSVS
, and cmake
, so we might need to find a different trick.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I'll update that. Thanks
@danbev great idea!
|
This needs some LG @nodejs/collaborators |
Oh, I overlooked the work in progress. |
No worries, I hope to revisit this in a day or so (some other stuff got in the way). |
Just to confirm my understanding this only affects when you build a static library, and basically adds generation of an executable which bundles in that static library. If so looks good to me and I'd like the equivalent for the shared library version as well. Once we have that I think we should be building/testing nightly in the CI as well and I'm happy to help set that up. |
@danbev from the comments I think you still have some changes before people LG, but if thats not the case please let me know. |
Yeah, I still need to figure out if this will work on the various platforms. I'm currently looking (when I have a little extra time) into the windows build which is failing for me. Sounds great to have this tested on the CI after that! |
Ping @danbev |
@BridgeAR I've verified that this works on Linux but still need to figure out an issue on Windows. I've been busy with other things unfortunately, but I'm going to take another look now. |
windows compilation error>vcbuild.bat test static
...
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(39): error C2065: 'WORD': undeclared identifier [C:\User
s\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(39): error C2146: syntax error: missing ')' before ident
ifier 'wMajorVersion' [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(40): error C2143: syntax error: missing ';' before '{' [
C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(40): error C2447: '{': missing function header (old-styl
e formal list?) [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(59): error C2065: '_WIN32_WINNT_WINXP': undeclared ident
ifier [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(59): error C3861: 'HIBYTE': identifier not found [C:\Use
rs\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(59): error C3861: 'LOBYTE': identifier not found [C:\Use
rs\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(59): error C3861: 'IsWindowsVersionOrGreater': identifie
r not found [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(65): error C2065: '_WIN32_WINNT_WINXP': undeclared ident
ifier [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(65): error C3861: 'HIBYTE': identifier not found [C:\Use
rs\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(65): error C3861: 'LOBYTE': identifier not found [C:\Use
rs\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(65): error C3861: 'IsWindowsVersionOrGreater': identifie
r not found [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(71): error C2065: '_WIN32_WINNT_WINXP': undeclared ident
ifier [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(71): error C3861: 'HIBYTE': identifier not found [C:\Use
rs\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(71): error C3861: 'LOBYTE': identifier not found [C:\Use
rs\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(71): error C3861: 'IsWindowsVersionOrGreater': identifie
r not found [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(77): error C2065: '_WIN32_WINNT_WINXP': undeclared ident
ifier [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(77): error C3861: 'HIBYTE': identifier not found [C:\Use
rs\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(77): error C3861: 'LOBYTE': identifier not found [C:\Use
rs\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(77): error C3861: 'IsWindowsVersionOrGreater': identifie
r not found [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(83): error C2065: '_WIN32_WINNT_VISTA': undeclared ident
ifier [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(83): error C3861: 'HIBYTE': identifier not found [C:\Use
rs\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(83): error C3861: 'LOBYTE': identifier not found [C:\Use
rs\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(83): error C3861: 'IsWindowsVersionOrGreater': identifie
r not found [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(89): error C2065: '_WIN32_WINNT_VISTA': undeclared ident
ifier [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(89): error C3861: 'HIBYTE': identifier not found [C:\Use
rs\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(89): error C3861: 'LOBYTE': identifier not found [C:\Use
rs\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(89): error C3861: 'IsWindowsVersionOrGreater': identifie
r not found [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(95): error C2065: '_WIN32_WINNT_VISTA': undeclared ident
ifier [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(95): error C3861: 'HIBYTE': identifier not found [C:\Use
rs\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(95): error C3861: 'LOBYTE': identifier not found [C:\Use
rs\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(95): error C3861: 'IsWindowsVersionOrGreater': identifie
r not found [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(101): error C2065: '_WIN32_WINNT_WIN7': undeclared ident
ifier [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(101): error C3861: 'HIBYTE': identifier not found [C:\Us
ers\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(101): error C3861: 'LOBYTE': identifier not found [C:\Us
ers\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(101): error C3861: 'IsWindowsVersionOrGreater': identifi
er not found [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(107): error C2065: '_WIN32_WINNT_WIN7': undeclared ident
ifier [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(107): error C3861: 'HIBYTE': identifier not found [C:\Us
ers\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(107): error C3861: 'LOBYTE': identifier not found [C:\Us
ers\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(107): error C3861: 'IsWindowsVersionOrGreater': identifi
er not found [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(113): error C2065: '_WIN32_WINNT_WIN8': undeclared ident
ifier [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(113): error C3861: 'HIBYTE': identifier not found [C:\Us
ers\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(113): error C3861: 'LOBYTE': identifier not found [C:\Us
ers\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(113): error C3861: 'IsWindowsVersionOrGreater': identifi
er not found [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(119): error C2065: '_WIN32_WINNT_WINBLUE': undeclared id
entifier [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(119): error C3861: 'HIBYTE': identifier not found [C:\Us
ers\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(119): error C3861: 'LOBYTE': identifier not found [C:\Us
ers\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(119): error C3861: 'IsWindowsVersionOrGreater': identifi
er not found [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(125): error C2065: 'OSVERSIONINFOEXW': undeclared identi
fier [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(125): error C2146: syntax error: missing ';' before iden
tifier 'osvi' [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(125): error C2065: 'osvi': undeclared identifier [C:\Use
rs\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(125): error C2065: 'VER_NT_WORKSTATION': undeclared iden
tifier [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(126): error C2065: 'DWORDLONG': undeclared identifier [C
:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(126): error C2143: syntax error: missing ';' before 'con
st' [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(126): error C4430: missing type specifier - int assumed.
Note: C++ does not support default-int [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(126): error C2065: 'VER_PRODUCT_TYPE': undeclared identi
fier [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(126): error C2065: 'VER_EQUAL': undeclared identifier [C
:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(126): error C3861: 'VerSetConditionMask': identifier not
found [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(128): error C2065: 'osvi': undeclared identifier [C:\Use
rs\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(128): error C2065: 'VER_PRODUCT_TYPE': undeclared identi
fier [C:\Users\danbev\working\node\static_node.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\VersionHelpers.h(128): error C3861: 'VerifyVersionInfoW': identifier not
found [C:\Users\danbev\working\node\static_node.vcxproj]
src\node_main.cc(39): error C2065: 'DWORD': undeclared identifier [C:\Users\danbev\working\node\static_node.vcxproj]
src\node_main.cc(39): error C2146: syntax error: missing ';' before identifier 'size' [C:\Users\danbev\working\node\static_n
ode.vcxproj]
src\node_main.cc(39): error C2065: 'size': undeclared identifier [C:\Users\danbev\working\node\static_node.vcxproj]
src\node_main.cc(39): error C2065: 'CP_UTF8': undeclared identifier [C:\Users\danbev\working\node\static_node.vcxproj]
src\node_main.cc(39): error C3861: 'WideCharToMultiByte': identifier not found [C:\Users\danbev\working\node\static_node.vcx
proj]
src\node_main.cc(47): error C2065: 'size': undeclared identifier [C:\Users\danbev\working\node\static_node.vcxproj]
src\node_main.cc(53): error C2065: 'size': undeclared identifier [C:\Users\danbev\working\node\static_node.vcxproj]
src\node_main.cc(54): error C2065: 'DWORD': undeclared identifier [C:\Users\danbev\working\node\static_node.vcxproj]
src\node_main.cc(54): error C2146: syntax error: missing ';' before identifier 'result' [C:\Users\danbev\working\node\static
_node.vcxproj]
src\node_main.cc(54): error C2065: 'result': undeclared identifier [C:\Users\danbev\working\node\static_node.vcxproj]
src\node_main.cc(54): error C2065: 'CP_UTF8': undeclared identifier [C:\Users\danbev\working\node\static_node.vcxproj]
src\node_main.cc(59): error C2065: 'size': undeclared identifier [C:\Users\danbev\working\node\static_node.vcxproj]
src\node_main.cc(54): error C3861: 'WideCharToMultiByte': identifier not found [C:\Users\danbev\working\node\static_node.vcx
proj]
src\node_main.cc(62): error C2065: 'result': undeclared identifier [C:\Users\danbev\working\node\static_node.vcxproj]
I was able to work around this by including windows.h in src/node_main.cc. |
PTAL @refack @nodejs/platform-windows |
Ping @nodejs/platform-windows again. PTAL |
I've run into linking issue and I'm trying to get the |
I've tried copying various settings from Node executable target:
It kinda works - it compiles, but it won't start:
|
That's because of the |
Here is one thought based on the change:
is this feasible? |
Please correct me if I'm wrong, but this is basically what this PR is trying to achieve. When using the |
@danbev my suggestion is to directly remove Edit |
@yhwang That could certainly be done but I was under the assumption that the default would be to build just build the node executable as is currently done. Then the two other cases, building node as a static or shared library, would build a node executable that was either statically linked or dynamically linked and in both cases the tests would be run using the node executable created. My view of this is that as a user I would either want to build a normal executable for node, build node as a static library, or as a shared library. Having these separate makes sense to me. |
That currently won't work because of #14986 (comment) unless you link with Code in the src directory would need to stop using Technically you could make it work by adding a |
@danbev I agree with you that we still provide @bnoordhuis yes I was talking that we should use @danbev 's change in node executable target. |
The salient point is that it currently won't work (can't work) for the aforementioned reasons. edit: to be clear, I don't think it's a bad idea but we'll need to shuffle some code around or use (the Windows equivalent of) |
I'm using to use 'msvs_settings': {
'VCLinkerTool': {
'AdditionalOptions': ['/WHOLEARCHIVE:<(PRODUCT_DIR)/lib/node.lib'],
}, Hopefully this will be sorted out soon and we can discuss any changes to the current build like @yhwang brought up. link errorC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\link.exe /ERRORREPORT:QUEUE /OUT:"C:\Users\danbev\working
\node\Release\node.exe" /INCREMENTAL:NO /NOLOGO dbghelp.lib shlwapi.lib winmm.lib AdvAPI32.lib User32.lib gdi32.lib advapi
32.lib iphlpapi.lib psapi.lib shell32.lib user32.lib userenv.lib ws2_32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAc
cess='false'" /manifest:embed /DEBUG /PDB:"C:\Users\danbev\working\node\Release\node.pdb" /MAP /MAPINFO:EXPORTS /OPT:REF /
OPT:ICF /LTCG /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\Users\danbev\working\node\Release\node.lib" /MACHINE:X64 /WHOLEA
RCHIVE:C:\Users\danbev\working\node\Release\lib/node.lib /SubSystem:Console,"5.02" Release\obj\static_node\node_main.obj
C:\Users\danbev\working\node\Release\lib\node.lib
C:\Users\danbev\working\node\Release\lib\nghttp2.lib
C:\Users\danbev\working\node\Release\lib\v8_base_0.lib
C:\Users\danbev\working\node\Release\lib\v8_base_1.lib
C:\Users\danbev\working\node\Release\lib\v8_base_2.lib
C:\Users\danbev\working\node\Release\lib\v8_base_3.lib
C:\Users\danbev\working\node\Release\lib\v8_libbase.lib
C:\Users\danbev\working\node\Release\lib\v8_libsampler.lib
C:\Users\danbev\working\node\Release\lib\icui18n.lib
C:\Users\danbev\working\node\Release\lib\icuucx.lib
C:\Users\danbev\working\node\Release\lib\icudata.lib
C:\Users\danbev\working\node\Release\lib\icustubdata.lib
C:\Users\danbev\working\node\Release\lib\v8_snapshot.lib
C:\Users\danbev\working\node\Release\lib\v8_libplatform.lib
C:\Users\danbev\working\node\Release\lib\openssl.lib
C:\Users\danbev\working\node\Release\lib\zlib.lib
C:\Users\danbev\working\node\Release\lib\http_parser.lib
C:\Users\danbev\working\node\Release\lib\cares.lib
C:\Users\danbev\working\node\Release\lib\libuv.lib
Tracking command:
C:\Program Files (x86)\MSBuild\14.0\bin\Tracker.exe /a /d "C:\Program Files (x86)\MSBuild\14.0\bin\FileTracker32.dll" /i C
:\Users\danbev\working\node\Release\obj\static_node\static_node.tlog /r "C:\USERS\DANBEV\WORKING\NODE\RELEASE\LIB\CARES.LI
B|C:\USERS\DANBEV\WORKING\NODE\RELEASE\LIB\HTTP_PARSER.LIB|C:\USERS\DANBEV\WORKING\NODE\RELEASE\LIB\ICUDATA.LIB|C:\USERS\D
ANBEV\WORKING\NODE\RELEASE\LIB\ICUI18N.LIB|C:\USERS\DANBEV\WORKING\NODE\RELEASE\LIB\ICUSTUBDATA.LIB|C:\USERS\DANBEV\WORKIN
G\NODE\RELEASE\LIB\ICUUCX.LIB|C:\USERS\DANBEV\WORKING\NODE\RELEASE\LIB\LIBUV.LIB|C:\USERS\DANBEV\WORKING\NODE\RELEASE\LIB\
NGHTTP2.LIB|C:\USERS\DANBEV\WORKING\NODE\RELEASE\LIB\NODE.LIB|C:\USERS\DANBEV\WORKING\NODE\RELEASE\LIB\OPENSSL.LIB|C:\USER
S\DANBEV\WORKING\NODE\RELEASE\LIB\V8_BASE_0.LIB|C:\USERS\DANBEV\WORKING\NODE\RELEASE\LIB\V8_BASE_1.LIB|C:\USERS\DANBEV\WOR
KING\NODE\RELEASE\LIB\V8_BASE_2.LIB|C:\USERS\DANBEV\WORKING\NODE\RELEASE\LIB\V8_BASE_3.LIB|C:\USERS\DANBEV\WORKING\NODE\RE
LEASE\LIB\V8_LIBBASE.LIB|C:\USERS\DANBEV\WORKING\NODE\RELEASE\LIB\V8_LIBPLATFORM.LIB|C:\USERS\DANBEV\WORKING\NODE\RELEASE\
LIB\V8_LIBSAMPLER.LIB|C:\USERS\DANBEV\WORKING\NODE\RELEASE\LIB\V8_SNAPSHOT.LIB|C:\USERS\DANBEV\WORKING\NODE\RELEASE\LIB\ZL
IB.LIB|C:\USERS\DANBEV\WORKING\NODE\RELEASE\OBJ\STATIC_NODE\NODE_MAIN.OBJ" /b MSBuildConsole_CancelEventcb658c3e654c4b1e8d
911ba93f10811e /c "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\link.exe" /ERRORREPORT:QUEUE /OUT:"C
:\Users\danbev\working\node\Release\node.exe" /INCREMENTAL:NO /NOLOGO dbghelp.lib shlwapi.lib winmm.lib AdvAPI32.lib User3
2.lib gdi32.lib advapi32.lib iphlpapi.lib psapi.lib shell32.lib user32.lib userenv.lib ws2_32.lib /MANIFEST /MANIFESTUAC:"
level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:\Users\danbev\working\node\Release\node.pdb" /MAP /MAPI
NFO:EXPORTS /OPT:REF /OPT:ICF /LTCG /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\Users\danbev\working\node\Release\node.lib
" /MACHINE:X64 /WHOLEARCHIVE:C:\Users\danbev\working\node\Release\lib/node.lib /SubSystem:Console,"5.02" Release\obj\stati
c_node\node_main.obj
C:\Users\danbev\working\node\Release\lib\node.lib
C:\Users\danbev\working\node\Release\lib\nghttp2.lib
C:\Users\danbev\working\node\Release\lib\v8_base_0.lib
C:\Users\danbev\working\node\Release\lib\v8_base_1.lib
C:\Users\danbev\working\node\Release\lib\v8_base_2.lib
C:\Users\danbev\working\node\Release\lib\v8_base_3.lib
C:\Users\danbev\working\node\Release\lib\v8_libbase.lib
C:\Users\danbev\working\node\Release\lib\v8_libsampler.lib
C:\Users\danbev\working\node\Release\lib\icui18n.lib
C:\Users\danbev\working\node\Release\lib\icuucx.lib
C:\Users\danbev\working\node\Release\lib\icudata.lib
C:\Users\danbev\working\node\Release\lib\icustubdata.lib
C:\Users\danbev\working\node\Release\lib\v8_snapshot.lib
C:\Users\danbev\working\node\Release\lib\v8_libplatform.lib
C:\Users\danbev\working\node\Release\lib\openssl.lib
C:\Users\danbev\working\node\Release\lib\zlib.lib
C:\Users\danbev\working\node\Release\lib\http_parser.lib
C:\Users\danbev\working\node\Release\lib\cares.lib
C:\Users\danbev\working\node\Release\lib\libuv.lib
node.lib(node_perfctr_provider.res) : fatal error LNK1241: resource file node.lib(node.res) already specified [C:\Users\danb
ev\working\node\static_node.vcxproj]
The command exited with code 1241.
Done executing task "Link" -- FAILED.
Done building target "Link" in project "static_node.vcxproj" -- FAILED.
Done Building Project "C:\Users\danbev\working\node\static_node.vcxproj" (default targets) -- FAILED.
Done executing task "MSBuild" -- FAILED.
Done building target "Build" in project "static_node.vcxproj.metaproj" -- FAILED.
Done Building Project "C:\Users\danbev\working\node\static_node.vcxproj.metaproj" (default targets) -- FAILED.
Done executing task "MSBuild" -- FAILED.
Done building target "Build" in project "node.sln" -- FAILED.
Done Building Project "C:\Users\danbev\working\node\node.sln" (Build target(s)) -- FAILED.
Build FAILED.
Time Elapsed 00:11:23.87 |
The motivation for this commit is to enable projects embedding Node.js and building with --enable-static to be able to run the test suite and linter. Currently when building with --enable-static no node executable will be created which means that the tests (apart from the cctest) and linter cannot be run. This is currently a work in progress and works on MacOS but I need to run the CI, and manually on different environments to verify that it works as expected. PR-URL: nodejs#14986 Refs: nodejs#14158 Refs: nodejs#14892 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
This reverts commit a36b540. PR-URL: nodejs#14986 Refs: nodejs#14158 Refs: nodejs#14892 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Landed in b021403 Thanks for everyones help/feedback, and patience on this long running issue! |
thanks to you too @danbev , for your perseverance! |
The motivation for this commit is to enable projects embedding Node.js and building with --enable-static to be able to run the test suite and linter. Currently when building with --enable-static no node executable will be created which means that the tests (apart from the cctest) and linter cannot be run. This is currently a work in progress and works on MacOS but I need to run the CI, and manually on different environments to verify that it works as expected. PR-URL: #14986 Refs: #14158 Refs: #14892 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Previously, built-in modules are registered before main() via __attribute__((constructor)) mechanism in GCC and similiar mechanism in MSVC. This causes some issues when node is built as static library. Calling module registration function for built-in modules in node::Init() helps to avoid the issues. Signed-off-by: Yihong Wang <yh.wang@ibm.com> Original PR-URL: nodejs#16565 Refs: nodejs#14986 (comment) Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Previously, built-in modules are registered before main() via __attribute__((constructor)) mechanism in GCC and similiar mechanism in MSVC. This causes some issues when node is built as static library. Calling module registration function for built-in modules in node::Init() helps to avoid the issues. Signed-off-by: Yihong Wang <yh.wang@ibm.com> Refs: #14986 (comment) Backport-PR-URL: #17625 PR-URL: #16565 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Previously, built-in modules are registered before main() via __attribute__((constructor)) mechanism in GCC and similiar mechanism in MSVC. This causes some issues when node is built as static library. Calling module registration function for built-in modules in node::Init() helps to avoid the issues. Signed-off-by: Yihong Wang <yh.wang@ibm.com> Refs: #14986 (comment) Backport-PR-URL: #17625 PR-URL: #16565 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
The motivation for this commit is to enable projects embedding Node.js and building with --enable-static to be able to run the test suite and linter. Currently when building with --enable-static no node executable will be created which means that the tests (apart from the cctest) and linter cannot be run. This is currently a work in progress and works on MacOS but I need to run the CI, and manually on different environments to verify that it works as expected. PR-URL: #14986 Refs: #14158 Refs: #14892 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
This does not land cleanly in |
The motivation for this commit is to enable projects embedding Node.js and building with --enable-static to be able to run the test suite and linter. Currently when building with --enable-static no node executable will be created which means that the tests (apart from the cctest) and linter cannot be run. This is currently a work in progress and works on MacOS but I need to run the CI, and manually on different environments to verify that it works as expected. PR-URL: #14986 Refs: #14158 Refs: #14892 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Previously, built-in modules are registered before main() via __attribute__((constructor)) mechanism in GCC and similiar mechanism in MSVC. This causes some issues when node is built as static library. Calling module registration function for built-in modules in node::Init() helps to avoid the issues. Signed-off-by: Yihong Wang <yh.wang@ibm.com> PR-URL: nodejs#16565 Backport-PR-URL: nodejs#18179 Refs: nodejs#14986 (comment) Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Previously, built-in modules are registered before main() via __attribute__((constructor)) mechanism in GCC and similiar mechanism in MSVC. This causes some issues when node is built as static library. Calling module registration function for built-in modules in node::Init() helps to avoid the issues. Signed-off-by: Yihong Wang <yh.wang@ibm.com> Backport-PR-URL: #18179 PR-URL: #16565 Refs: #14986 (comment) Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Refs: #14158
Refs: #14892
The motivation for this commit is to enable projects embedding Node.js
and building with --enable-static to be able to run the test suite and
linter.
Currently when building with --enable-static no node executable
will be created which means that the tests (apart from the cctest) and
linter cannot be run.
This is currently a work in progress and works on MacOS but I need to
run the CI, and manually on different environments to verify that it
works as expected.
[refack: added refs]
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test, build