-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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: fix openssl link error on windows #13078
Conversation
@danbev did you try to go the complete other way around? i.e. 'dependencies=': [
'<(node_core_target_name)',
], Just out of intuition... |
There is already a dependency to the node core target, the suggestion here is that it be excluded in this particular case. |
I mean use only |
Ah sorry I understand what you mean now. |
I'll test the |
deps/openssl/openssl/util/libeay.num
Outdated
@@ -75,7 +75,7 @@ BIO_new 78 EXIST::FUNCTION: | |||
BIO_new_accept 79 EXIST::FUNCTION: | |||
BIO_new_connect 80 EXIST::FUNCTION: | |||
BIO_new_fd 81 EXIST::FUNCTION: | |||
BIO_new_file 82 EXIST::FUNCTION:FP_API | |||
BIO_new_file 82 EXIST::FUNCTION: |
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.
[question] is this still neccecery?
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.
@refack Yeah I had to make that change. If this is not there that symbol will not be exported (will not end up in <PRODUCT_DIR)\obj\global_intermediate\openssl.def) and a link error will occur when linking cctest.exe. At least that is what I am seeing when building and running this. Where you able to build without this change?
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.
Doesn't adding FP_API to mkssldef_flags in node.gyp work?
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 was not aware of that. Let me give that a try. Thanks
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.
That work worked like a charm. Thanks @bnoordhuis
I'll update the PR with the changes later today.
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.
Confirmed dll
target builds with vcbuild.bat dll debug x64 vc2015
Rubber stamp libeay.num
I'll check. |
P.S. split the commits, so it could be easily floated onto |
No problems, I'll do a rebase later and also remove the first or second commit. I'll leave this as is for now so others can see the options we have to move forward and then clean up the commits. Thanks |
Confirm the need for changing
|
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.
Why renaming the conflicting symbol was never thought as a solution? Circumventing the conflict through build script is not comprehensive in my opinion. We seem to be leveraging a chance that cctest does not require symbols from node core dll - this scenario can change in future and this circuvention will break.
@gireeshpunathil it's not just a one, it's the whole openSSL that gets included twice: #12952 (comment) |
@refack - ah, I see! thanks for the clarification. |
node.gyp
Outdated
'<(node_core_target_name)', | ||
'deps/gtest/gtest.gyp:gtest', | ||
], | ||
'dependencies!': [ |
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.
Just checked, these 5 lines are unnecessary to this approach (only dll
& gtest
).
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.
Nice!
+1 for second approach (with the |
This commit attempts to fix an issue when building on windows using the following command line options: .\vcbuild.bat dll debug x64 vc2015 This will result in the following options passed to configure: configure --debug --shared --dest-cpu=x64 --tag= This commit excludes the dependency to openssl if node is configured with --shared. Also, FP_API to the categories to export in mkssldef when generating the module definition (openssl.def) allowing the build to compile and link successfully. Fixes: nodejs#12952
5f86152
to
13515e5
Compare
Rebased and squashed CI: https://ci.nodejs.org/job/node-test-pull-request/8270/ |
test/linux has completedTAP Reports Processing: FINISH
Checking ^not ok
Notifying upstream projects of job completion
Finished: SUCCESS |
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.
Wow, that's minimal!
test/linux failure does not look relatedEnvInject] - Loading node environment variables.
Building remotely on test-digitalocean-fedora23-x64-1 (fedora23) in workspace /home/iojs/build/workspace/node-test-commit-linux/nodes/fedora23
java.lang.NoClassDefFoundError: Could not initialize class com.sun.proxy.$Proxy11
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:739)
at hudson.remoting.RemoteInvocationHandler.wrap(RemoteInvocationHandler.java:143)
at hudson.remoting.Channel.export(Channel.java:618)
at hudson.remoting.Channel.export(Channel.java:587)
at org.jenkinsci.plugins.gitclient.LegacyCompatibleGitAPIImpl.writeReplace(LegacyCompatibleGitAPIImpl.java:198)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at java.io.ObjectStreamClass.invokeWriteReplace(ObjectStreamClass.java:1118)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1136)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
at hudson.remoting.UserRequest._serialize(UserRequest.java:158)
at hudson.remoting.UserRequest.serialize(UserRequest.java:167)
at hudson.remoting.UserRequest.perform(UserRequest.java:129)
at hudson.remoting.UserRequest.perform(UserRequest.java:49)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at hudson.remoting.Engine$1$1.run(Engine.java:69)
at java.lang.Thread.run(Thread.java:745)
at ......remote call to Channel to /162.243.63.132(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
at hudson.remoting.Channel.call(Channel.java:830)
Caused: java.io.IOException: Remote call on Channel to /162.243.63.132 failed
at hudson.remoting.Channel.call(Channel.java:838)
at hudson.FilePath.act(FilePath.java:985)
Caused: java.io.IOException: remote file operation failed: /home/iojs/build/workspace/node-test-commit-linux/nodes/fedora23 at hudson.remoting.Channel@16fc6ec9:Channel to /162.243.63.132
at hudson.FilePath.act(FilePath.java:992)
at hudson.FilePath.act(FilePath.java:974)
at org.jenkinsci.plugins.gitclient.Git.getClient(Git.java:137)
at hudson.plugins.git.GitSCM.createClient(GitSCM.java:751)
at hudson.plugins.git.GitSCM.createClient(GitSCM.java:743)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1101)
at hudson.scm.SCM.checkout(SCM.java:496)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1281)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
at hudson.model.Run.execute(Run.java:1728)
at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:405)
Run condition [Always] enabling perform for step [[Execute a set of scripts]]
Run condition [Always] enabling perform for step [[Execute a set of scripts]]
TAP Reports Processing: START
Looking for TAP results report in workspace using pattern: *.tap
Did not find any matching files. Setting build result to FAILURE.
Checking ^not ok
Jenkins Text Finder: File set '*.tap' is empty
Notifying upstream projects of job completion
Finished: FAILURE |
That's a Jenkins error. The other linux buildbots are green. I think this should be good to go (the more so because the mkssldef target isn't used on UNIX.) |
I'll merge later this evening or tomorrow morning (public holiday here
today)
tors 25 maj 2017 kl. 10:16 skrev Ben Noordhuis <[email protected]>:
… That's a Jenkins error. The other linux buildbots are green. I think this
should be good to go (the more so because the mkssldef target isn't used on
UNIX.)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#13078 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAaY3-uAdSSjspHbRnz2mVXkelpp6507ks5r9TjWgaJpZM4NduZz>
.
|
This commit attempts to fix an issue when building on windows using the following command line options: .\vcbuild.bat dll debug x64 vc2015 This will result in the following options passed to configure: configure --debug --shared --dest-cpu=x64 --tag= This commit excludes the dependency to openssl if node is configured with --shared. Also, FP_API to the categories to export in mkssldef when generating the module definition (openssl.def) allowing the build to compile and link successfully. Fixes: nodejs#12952 PR-URL: nodejs#13078 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
Landed in 1cde375 |
This commit attempts to fix an issue when building on windows using the following command line options: .\vcbuild.bat dll debug x64 vc2015 This will result in the following options passed to configure: configure --debug --shared --dest-cpu=x64 --tag= This commit excludes the dependency to openssl if node is configured with --shared. Also, FP_API to the categories to export in mkssldef when generating the module definition (openssl.def) allowing the build to compile and link successfully. Fixes: #12952 PR-URL: #13078 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
This commit attempts to fix an issue when building on windows using the following command line options: .\vcbuild.bat dll debug x64 vc2015 This will result in the following options passed to configure: configure --debug --shared --dest-cpu=x64 --tag= This commit excludes the dependency to openssl if node is configured with --shared. Also, FP_API to the categories to export in mkssldef when generating the module definition (openssl.def) allowing the build to compile and link successfully. Fixes: #12952 PR-URL: #13078 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
This commit attempts to fix an issue when building on windows using the following command line options: .\vcbuild.bat dll debug x64 vc2015 This will result in the following options passed to configure: configure --debug --shared --dest-cpu=x64 --tag= This commit excludes the dependency to openssl if node is configured with --shared. Also, FP_API to the categories to export in mkssldef when generating the module definition (openssl.def) allowing the build to compile and link successfully. Fixes: nodejs#12952 PR-URL: nodejs#13078 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
This commit attempts to fix an issue when building on windows using the following command line options: .\vcbuild.bat dll debug x64 vc2015 This will result in the following options passed to configure: configure --debug --shared --dest-cpu=x64 --tag= This commit excludes the dependency to openssl if node is configured with --shared. Also, FP_API to the categories to export in mkssldef when generating the module definition (openssl.def) allowing the build to compile and link successfully. Fixes: nodejs#12952 PR-URL: nodejs#13078 Backport-PR-URL: nodejs#12948 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
This commit attempts to fix an issue when building on windows using the following command line options: .\vcbuild.bat dll debug x64 vc2015 This will result in the following options passed to configure: configure --debug --shared --dest-cpu=x64 --tag= This commit excludes the dependency to openssl if node is configured with --shared. Also, FP_API to the categories to export in mkssldef when generating the module definition (openssl.def) allowing the build to compile and link successfully. Fixes: #12952 PR-URL: #13078 Backport-PR-URL: #12948 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
This commit attempts to fix an issue when building on windows using the
following command line options:
.\vcbuild.bat dll debug x64 vc2015
This will result in the following options passed to configure:
configure --debug --shared --dest-cpu=x64 --tag=
This commit excludes the dependency to openssl if node is configured
with --shared.
Also, FP_API to the categories to export in mkssldef when generating
the module definition (openssl.def) allowing the build to compile and
link successfully.
Fixes: #12952
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
build