build: allow building without openssl, enables native m1 development builds#4683
Conversation
Munkybooty
left a comment
There was a problem hiding this comment.
tACK
it should be mentioned that you need to run
./configure --prefix=`pwd`/depends/aarch64-apple-darwin21.2.0 --disable-bip70
otherwise you'll be met with linker errors:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld: symbol(s) not found for architecture arm64
make check finished in 1:55 and functional tests are still sluggish
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
|
Compilation works on m1. |
UdjinM6
left a comment
There was a problem hiding this comment.
It makes sense to disable bip70 when there is no openssl (cause it's a dependency) but it feels weird to disable openssl when we simply don't want bip70 imo. How about smth like e308bef15b7214572ccac5a32868173b435ef251?
|
OpenSSL unfortunately is the main blocker for Native M1 building. I believed when I had #4612 open that we may finally be able to build on M1 because protobuf being optional gave me the assumption that without bip70 we would have no issue. We realized upon building that that's when the OpenSSL was the true blocker. We use version 1.0.1 and M1 support exists in 1.0.2 and 1.1.1. When @kittywhiskers tried to bump the version we had some nontrivial errors come up iirc. That mostly is the motivation behind disabling it |
|
@Munkybooty yes, I get it. My point is that disabling bip70 should not disable openssl cause it doesn't make sense in general (and esp. for non-M1 systems). With the patch I'm proposing you can either build depends with |
|
@UdjinM6 Very fair point, I am in favor of your patch, it makes the most sense logically, I was hoping to clear any confusion if there was any. I see what you mean though |
|
What is the use case for including openssl if you're not including bip70? @UdjinM6 |
|
@PastaPastaPasta OpenSSL removal in bitcoin bitcoin#17265 was delayed until the merge of the replacement for RNG state initializers PR bitcoin#17270. I feel like we shouldn't drop openssl that easy too. It might be ok for edge cases like M1 native builds (i.e. "I want it now and I don't care!!11" use case :) ) but I'd rather not make it a common practice for other builds. Basically, you should disable openssl explicitly (presumably) understanding all the consequences, it should NOT be disabled silently because of some internal non-obvious logic. |
…builds (dashpay#4683) * build: allow building without openssl, enables native m1 development builds * Update configure.ac, according to review Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com> * introduce `--with-openssl` Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
…builds (dashpay#4683) * build: allow building without openssl, enables native m1 development builds * Update configure.ac, according to review Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com> * introduce `--with-openssl` Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
When building on M1, inside of depends, you should use
make NO_PROTOBUF=1 NO_OPENSSL=1 -j8