-
Notifications
You must be signed in to change notification settings - Fork 780
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
Cleanup in OpenSSL compilation step #2270
Conversation
- The `make -j 1` workaround seems neither in effect nor necessary anymore - Assume that KERNEL_BITS workaround isn't necessary anymore - Declare more variables as local
# Default MAKE_OPTS are -j 2 which can confuse the build. Thankfully, make | ||
# gives precedence to the last -j option, so we can override that. | ||
package_option openssl make -j 1 | ||
# Skip building OpenSSL docs, which is slow. |
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.
-j 1
is still needed, except for openssl 3+.
For example I found #1791 where it's needed for 1.1
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.
@eregon During my work on #2230 I've found that our default MAKE_OPTS take precedence over the -j 1
setting, resulting in this invocation:
make -j 1 -j 8
Since make most likely only respects the last -j
option, it seems that some time in the last decade, our -j 1
workaround stopped having effect, but our users largely haven't noticed.
Furthermore, I have just built openssl-1.1.1w successfully using make -j 8
on macOS.
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.
Mmh, so the comment above was wrong then?
{ "$MAKE" "${!PACKAGE_MAKE_OPTS_ARRAY}" $MAKE_OPTS ${!PACKAGE_MAKE_OPTS}
So it depends on whether package_option openssl make -j 1
adds it to PACKAGE_MAKE_OPTS_ARRAY or PACKAGE_MAKE_OPTS. If PACKAGE_MAKE_OPTS it should be fine.
Seems it's to PACKAGE_MAKE_OPTS_ARRAY hence what you saw:
Line 555 in 1d9b4e2
variable="$(capitalize "${package_name}_${command_name}")_OPTS_ARRAY" |
IIRC some older versions of openssl don't always work with parallel make. And it's transient, sometimes it just works and sometimes not, e.g. due to missing dependencies between make targets.
I have found openssl/openssl#298 and openssl/openssl#5762 (comment), so it seems a problem for OpenSSL < 1.1.0.
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.
Also conan-io/conan-center-index#3001 (comment) so maybe some older versions happen to work with parallel builds but in general it seems not guaranteed at all for OpenSSL < 1.1.0.
So I think we should still -j1
on OpenSSL < 1.1.0.
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 for looking that up. No build definition has been using openssl-1.0 since Ruby 2.3.8. So I'd be fine with ruby-build not attempting the -j 1
workaround at all and instead offloading that to the user (by expecting them to set OPENSSL_MAKE_OPTS) if they really need to build an ancient Ruby version for some reason.
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.
Could we either handle it here and update these definitions < 2.4 to automatically set it?
I don't think it's any good if we keep definitions which are broken and need a manual workaround like this when we know the issue and it's somewhat-indirectly caused by ruby-build (which builds openssl).
For instance it would break https://github.com/ruby/ruby-builder for Ruby < 2.4 so I'm not keen on breaking this.
make -j 1
workaround seems neither in effect nor necessary anymoreRef. 959e5cb