You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[R] R package is linking to the wrong OpenSSL on MacOS BigSur? #36456
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘arrow’ in dyn.load(file, DLLpath = DLLpath, ...):
ERROR: loading failed
unable to load shared object '/Users/voltrondata/Library/R/arm64/4.1/library/00LOCK-arrow/00new/arrow/libs/arrow.so':
dlopen(/Users/voltrondata/Library/R/arm64/4.1/library/00LOCK-arrow/00new/arrow/libs/arrow.so, 6): Symbol not found: _EVP_DigestSignUpdate
* removing ‘/Users/voltrondata/Library/R/arm64/4.1/library/arrow’
Referenced from: /Users/voltrondata/Library/R/arm64/4.1/library/00LOCK-arrow/00new/arrow/libs/arrow.so
Expected in: flat namespace
in /Users/voltrondata/Library/R/arm64/4.1/library/00LOCK-arrow/00new/arrow/libs/arrow.so
Error: loading failed
Execution halted
Warning message:
In install.packages("arrow", type = "source", repos = sub("file://", :
installation of package ‘arrow’ had non-zero exit status
Error in library(arrow) : there is no package called ‘arrow’
Execution halted
Ah, this is caused by mixing multiple OpenSSL versions.
It seems that openssl/*.h of OpenSSL 1.1 is used but libcrypto.dylib of OpenSSL 3 is used when building Apache Arrow C++. (Is autobrew used to build Apache Arrow C++?)
Could you check it?
I think I'm remembering correctly that we always try to link to system openssl on MacOS and not the one provided by homebrew/autobrew... @assignUser may be more familiar with the details!
Also worth nothing that we're considering dropping autobrew to reduce the number of steps needed for the R package release; however, I don't know if doing a bundled build (i.e., running cmake on the bundled cpp source instead of autobrew) is more or less complicated with respect to openssl.
homebrew-r-autobrew nightly job seems to fail with the same issue. Should this be considered a blocker for the release? I am marking it as a blocker at the moment.
As discussed in the PR this seems to be an issue with the gh runners explicitly running brew link openssl which causes the isssue. It would be nice if someone could try to repo locally with a default brew openssl install to make sure. I would assume that cran doesn't do this...
edit: or not as that solution does not work afterall
In the r-binary-packages job we modify the formula with the current hash and repo, maybe that is what's missing? There is some jinja in there but this is what we do, cwd is arrow/r:
cp ../dev/tasks/homebrew-formulae/autobrew/apache-arrow*.rb tools/
# Pin the git commit in the formula to match
cd tools
if [ "{{ is_fork }}" == "true" ]; then
sed -i.bak -E -e 's/apache\/arrow.git"$/{{ arrow.github_repo.split("/") | join("\/") }}.git", :revision => "'"{{ arrow.head }}"'"/' apache-arrow*.rb
else
sed -i.bak -E -e 's/arrow.git"$/arrow.git", :revision => "'"{{ arrow.head }}"'"/' apache-arrow*.rb
fi
rm -f apache-arrow*.rb.bak
-- Check for working CXX compiler: /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/build-apache-arrow-static/Library/Homebrew/shims/mac/super/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Note at CMakeLists.txt:66 (message):
The Google Cloud C++ client libraries use the native OpenSSL library. In
most macOS systems, you need to set the OPENSSL_ROOT_DIR environment
variable to find this dependency, for example:
cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl ...
You have not set this variable. Most likely, this will result in a broken
build with fairly obscure error messages. If your environment does not
require setting OPENSSL_ROOT_DIR, you can disable this check using:
cmake -DGOOGLE_CLOUD_CPP_ENABLE_MACOS_OPENSSL_CHECK=OFF ...
I see set(OPENSSL_ROOT_DIR ${BREW_OPENSSL_PREFIX}) in the current version of "find openssl"...somehow that isn't propagating to the Google Cloud Platform sdk?
Recreating a local autobrew build is hard. The comment at https://github.com/apache/arrow/blob/main/r/configure#L241 suggests that you can do cp ../dev/tasks/homebrew-formulae/autobrew/apache-arrow.rb tools/apache-arrow.rb. I've done this before successfully but currently it gives me an error (see details).
Now that there are two autobrew formulae, I think you have to copy them both, i.e. also apache-arrow-static.rb. That's the one that will get used on a contemporary version of macOS. See r/tools/autobrew
We don't technically need this in 13.0.0 to release the R package but it will probably make your life easier because it fixes the binary packages and autobrew jobs.
Activity
paleolimbot commentedon Jul 4, 2023
I mention OpenSSL here because the symbol that is not found is
EVP_DigestSignUpdate...I suppose it could also be failing to link to any OpenSSL.paleolimbot commentedon Jul 4, 2023
I wonder if:
arrow/r/configure
Lines 111 to 120 in 7ecec6c
is at odds with:
arrow/cpp/cmake_modules/FindOpenSSLAlt.cmake
Lines 22 to 39 in 7ecec6c
(that was added in #36336 )
kou commentedon Jul 5, 2023
Ah, this is caused by mixing multiple OpenSSL versions.
It seems that
openssl/*.hof OpenSSL 1.1 is used butlibcrypto.dylibof OpenSSL 3 is used when building Apache Arrow C++. (Is autobrew used to build Apache Arrow C++?)Could you check it?
paleolimbot commentedon Jul 5, 2023
Yes, it's autobrew in that job ( https://github.com/ursacomputing/crossbow/actions/runs/5442353558/jobs/9897977884#step:13:60 ). I think that script is here: https://github.com/apache/arrow/blob/main/r/tools/autobrew and the formula is here: https://github.com/apache/arrow/blob/main/dev/tasks/homebrew-formulae/autobrew/apache-arrow-static.rb .
I think I'm remembering correctly that we always try to link to system openssl on MacOS and not the one provided by homebrew/autobrew... @assignUser may be more familiar with the details!
Also worth nothing that we're considering dropping autobrew to reduce the number of steps needed for the R package release; however, I don't know if doing a bundled build (i.e., running
cmakeon the bundled cpp source instead of autobrew) is more or less complicated with respect to openssl.assignUser commentedon Jul 6, 2023
eh, not really due to lack of macos locally ^^ but I can also have a look at this!
raulcd commentedon Jul 6, 2023
homebrew-r-autobrew nightly job seems to fail with the same issue. Should this be considered a blocker for the release? I am marking it as a blocker at the moment.
paleolimbot commentedon Jul 6, 2023
Thanks...yes, it's a blocker for release! CRAN does some builds on MacOS BigSur which is how most people will install the R package.
assignUser commentedon Jul 7, 2023
As discussed in the PR this seems to be an issue with the gh runners explicitly running
brew link opensslwhich causes the isssue. It would be nice if someone could try to repo locally with a default brew openssl install to make sure. I would assume that cran doesn't do this...edit: or not as that solution does not work afterall
apacheGH-36456: [R] Remove system OpenSSL to avoid mixing OpenSSL ver…
2 remaining items
assignUser commentedon Jul 7, 2023
In the r-binary-packages job we modify the formula with the current hash and repo, maybe that is what's missing? There is some jinja in there but this is what we do, cwd is arrow/r:
paleolimbot commentedon Jul 10, 2023
Hmm...from the logs we also get ( https://github.com/ursacomputing/crossbow/actions/runs/5442353558/jobs/9897978025#step:13:5350 )
I see
set(OPENSSL_ROOT_DIR ${BREW_OPENSSL_PREFIX})in the current version of "find openssl"...somehow that isn't propagating to the Google Cloud Platform sdk?nealrichardson commentedon Jul 12, 2023
Now that there are two autobrew formulae, I think you have to copy them both, i.e. also apache-arrow-static.rb. That's the one that will get used on a contemporary version of macOS. See
r/tools/autobrewGH-36456: [R] Link to correct version of OpenSSL when using autobrew (#…
raulcd commentedon Jul 17, 2023
This is expected to be on 13.0.0, right?
paleolimbot commentedon Jul 17, 2023
We don't technically need this in 13.0.0 to release the R package but it will probably make your life easier because it fixes the binary packages and autobrew jobs.
raulcd commentedon Jul 17, 2023
Thanks @paleolimbot , I'll cherry-pick it
GH-36456: [R] Link to correct version of OpenSSL when using autobrew (#…