Skip to content

Commit

Permalink
apacheGH-36456: [R] Link to correct version of OpenSSL when using aut…
Browse files Browse the repository at this point in the history
…obrew (apache#36551)

### Rationale for this change

The r-binary-packages job (which uses autobrew) and the autobrew nightly jobs are failing because they are linking to a different version of OpenSSL than the package was built against. I believe this occurred because Arrow and its dependencies are built against the autobrew headers which included openssl. The `ssl` and `crypto` libraries weren't explicitly linked, so I think whatever LibreSSL fork MacOS installs by default was getting linked. This was perhaps compatible using the version of autobrew for High Sierra/the version of LibreSSL on High Sierra but was not compatible with the version of autobrew for Big Sur/the version of LibreSSL on Big Sur.

### What changes are included in this PR?

This PR explicitly adds OpenSSL 1.1 to the autobrew formulas and explicitly adds `-lssl -lcrypto` to the PKG_LIBS (1.1 because that's what was in the corresponding homebrew formula).

### Are these changes tested?

Existing nightly tests cover these changes.

### Are there any user-facing changes?

No.
* Closes: apache#36456

Lead-authored-by: Dewey Dunnington <dewey@voltrondata.com>
Co-authored-by: Dewey Dunnington <dewey@fishandwhistle.net>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Dewey Dunnington <dewey@fishandwhistle.net>
  • Loading branch information
2 people authored and chelseajonesr committed Jul 20, 2023
1 parent 802c77a commit b840bac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions dev/tasks/homebrew-formulae/autobrew/apache-arrow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class ApacheArrow < Formula
depends_on "aws-sdk-cpp"
depends_on "brotli"
depends_on "lz4"
depends_on "openssl@1.1"
depends_on "snappy"
depends_on "thrift"
depends_on "zstd"
Expand Down
2 changes: 1 addition & 1 deletion r/tools/autobrew
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ fi
# Hardcode this for my custom autobrew build
rm -f $BREWDIR/lib/*.dylib
AWS_LIBS="-laws-cpp-sdk-config -laws-cpp-sdk-transfer -laws-cpp-sdk-identity-management -laws-cpp-sdk-cognito-identity -laws-cpp-sdk-sts -laws-cpp-sdk-s3 -laws-cpp-sdk-core -laws-c-event-stream -laws-checksums -laws-c-common -laws-crt-cpp -laws-c-io -laws-c-s3 -laws-c-auth -laws-c-http -laws-c-cal -laws-c-compression -laws-c-mqtt -lpthread -lcurl"
PKG_LIBS="-lparquet -larrow_dataset -larrow_acero -larrow -larrow_bundled_dependencies -lthrift -lbrotlienc-static -lbrotlidec-static -lbrotlicommon-static -llz4 -lsnappy -lzstd $AWS_LIBS"
PKG_LIBS="-lparquet -larrow_dataset -larrow_acero -larrow -larrow_bundled_dependencies -lthrift -lbrotlienc-static -lbrotlidec-static -lbrotlicommon-static -llz4 -lsnappy -lzstd $AWS_LIBS -lssl -lcrypto"
PKG_DIRS="-L$BREWDIR/lib"

# Prevent CRAN builder from linking against old libs in /usr/local/lib
Expand Down

0 comments on commit b840bac

Please sign in to comment.