-
Notifications
You must be signed in to change notification settings - Fork 181
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
OpenSSL: Fix compilation on windows msvc and ninja #461
base: master
Are you sure you want to change the base?
Conversation
set(log_opts "") | ||
endif() | ||
|
||
|
||
execute_process(COMMAND | ||
perl Configure @arch@ @opt@ @shared@ "--prefix=@openssl_install_dir@" "--openssldir=@openssl_dir@" RESULT_VARIABLE result) |
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've found that the perl command will fail depending on whether it is the mingw perl (failure) or the Strawberry/Windows perl (success). Can we fix that too?
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.
@rbsheth
Sure
I did not look to close into it.
But it looks like the command expects a linux bash
but in fact it is a windows cmd
Not yet sure how to solve that, but I'm also not so familiar with mingw and I need to set it up first.
@rbsheth Thanks for commenting I discovered (working on my toy project) when running So I still suspect somehow CMake or some other entity doing something funny. |
Sorry, I haven't taken a look in a while. But I suspect something more fundamental is going on here |
@rbsheth no worries, I also could not find the time to look more into this. But as the OpenSSL's perl-script is figuring things out on it's own (which does go wrong) and there is your point, that it will depend on the installed perl-version (Strawberry or mingw) maybe that is the root cause and we just need to differentiate between those two. |
I've followed this guide
step by step carefully. [Yes]
This update will fix a toolchain.
The issue boils down that
url_sha1_openssl_windows_1_1_plus.cmake
callsconfigure_1_1_plus.cmake
And CMake populates
CXX
,CC
and other environment variables.The build fails because, the content of these variables are absolute file paths without any quotes and they are not escaped.
But openssl will use them and fails upon calling them.
The same goes for many other projects (e.g. Boost during b2) and I created this PR to show it for openssl* and get a conversation going.
My guess is that CMake actually sets these variables wrong, or Hunter should set them manually.
So I'm hoping for some feedback on how this might be solved in a better more general way.
*) unfortunately since the last version of hunter, the CI does not run the builds anymore 🤷