Skip to content
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

GH-36456: [CI][R] Unlink system OpenSSL to avoid mixing OpenSSL versions #36522

Closed
wants to merge 8 commits into from

Conversation

kou
Copy link
Member

@kou kou commented Jul 7, 2023

Rationale for this change

If OpenSSL exists in the default path, we may mix OpenSSL in the default path and OpenSSL installed by autobrew. It may cause a link error, run-time symbol not found error and so on.

What changes are included in this PR?

Ensure unlinking OpenSSL in the default path.

Are these changes tested?

Yes.

Are there any user-facing changes?

No.

@github-actions
Copy link

github-actions bot commented Jul 7, 2023

⚠️ GitHub issue #36456 has been automatically assigned in GitHub to PR creator.

@kou
Copy link
Member Author

kou commented Jul 7, 2023

@github-actions crossbow submit r-binary-packages homebrew-r-autobrew

@github-actions github-actions bot added the awaiting committer review Awaiting committer review label Jul 7, 2023
@github-actions

This comment was marked as outdated.

@kou
Copy link
Member Author

kou commented Jul 7, 2023

@github-actions crossbow submit r-binary-packages homebrew-r-autobrew

@github-actions

This comment was marked as outdated.

@kou kou changed the title GH-36456: [CI][R] Remove system OpenSSL to avoid mixing OpenSSL versions GH-36456: [CI][R] Unlink system OpenSSL to avoid mixing OpenSSL versions Jul 7, 2023
@assignUser
Copy link
Member

This will fix our nightly build but could this not also happen when users build from scratch?

@kou
Copy link
Member Author

kou commented Jul 7, 2023

In general, it'll not be happen on user environments because Homebrew's OpenSSL packages don't put symlinks to the default path by default. (If you're interested in it, please search "keg-only".)

But GitHub Actions runs brew link openssl explicitly to put symlinks to the default path.

@assignUser
Copy link
Member

Ah interesting, thanks!

@kou
Copy link
Member Author

kou commented Jul 7, 2023

Oh... This doesn't resolve this problem...

@kou
Copy link
Member Author

kou commented Jul 7, 2023

@github-actions crossbow submit r-binary-packages homebrew-r-autobrew

@github-actions

This comment was marked as outdated.

@kou
Copy link
Member Author

kou commented Jul 9, 2023

@github-actions crossbow submit r-binary-packages homebrew-r-autobrew

@github-actions

This comment was marked as outdated.

@kou
Copy link
Member Author

kou commented Jul 9, 2023

@github-actions crossbow submit r-binary-packages homebrew-r-autobrew

@github-actions

This comment was marked as outdated.

@kou
Copy link
Member Author

kou commented Jul 10, 2023

@github-actions crossbow submit r-binary-packages homebrew-r-autobrew

@github-actions

This comment was marked as outdated.

@kou
Copy link
Member Author

kou commented Jul 10, 2023

@github-actions crossbow submit r-binary-packages homebrew-r-autobrew

@github-actions

This comment was marked as outdated.

@kou
Copy link
Member Author

kou commented Jul 10, 2023

@github-actions crossbow submit r-binary-packages homebrew-r-autobrew

@github-actions
Copy link

Revision: e79c31e

Submitted crossbow builds: ursacomputing/crossbow @ actions-32865d51a3

Task Status
homebrew-r-autobrew Github Actions
r-binary-packages Github Actions

# Ensure removing OpenSSL from the default paths to avoid
# mixing OpenSSL in the default paths and OpenSSL installed
# by autobrew.
brew unlink openssl || :
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm... can we instead make sure our build chain selects OpenSSL consistently? Users will otherwise probably encounter a similar problem if they try compiling Arrow themselves.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would also be my preference though it seems to be tricky and I haven't had the time to investigate.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that it's difficult.

For example, please consider the following case:

  • OpenSSL 1.1 is installed in /usr/local
  • OpenSSL 3 is install in /opt/openssl
  • c-ares is installed in /usr/local
  • Build bundled gRPC with c-ares and OpenSSL 3
  • gRPC uses -I/usr/local/include from c-ares and -I/opt/openssl/include from OpenSSL 3
  • -I/opt/openssl/include -I/usr/local/include will work but -I/usr/local/include -I/opt/openssl/include will not work because OpenSSl 1.1 headers in /usr/local/include are used
  • I don't think that we can always use include flags from OpenSSL 3 as the first include flag because there are more version mixable libraries such as Abseil

Comment on lines +83 to +84
find / 2>&1 | grep include/openssl || :
arrow/ci/scripts/r_test.sh arrow
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit embarassed, but I don't understand what these two lines do...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the first line is just for debug purposes printing all find hits of include/openssl or nothing. The script setup an env for r testing and then test/checks the r package.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. It's just a debug print.
I want to find OpenSSl header files in the system but I couldn't find them...

@assignUser
Copy link
Member

assignUser commented Jul 12, 2023

Oh great it looks like @paleolimbot was able to repro locally and fix the underlying issue in #36551 🎉

@kou
Copy link
Member Author

kou commented Jul 12, 2023

I close this in favor of #36551.

@kou kou closed this Jul 12, 2023
@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting committer review Awaiting committer review labels Jul 12, 2023
@kou kou deleted the ci-r-macos-openssl branch July 12, 2023 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting changes Awaiting changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[R] R package is linking to the wrong OpenSSL on MacOS BigSur?
3 participants