-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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-38902: [R] Handle failing library detection with pkg-config #38970
Conversation
@github-actions crossbow submit -g r |
I have removed the |
This comment was marked as outdated.
This comment was marked as outdated.
A test run with an intentionally broken pkg-config https://github.com/assignUser/test-repo-a/actions/runs/7014022366/job/19120682558 |
Looks like |
@github-actions crossbow submit test-r-* r-binary-packages |
Revision: 5db954a Submitted crossbow builds: ursacomputing/crossbow @ actions-4d3caa5e57 |
|
|
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.
I tested with MacOS 11 with all "recipes" installed and get:
dewey@tidytuesday ~ % R CMD INSTALL ~/Desktop/arrow_14.0.0.tar.gz
* installing to library ‘/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library’
* installing *source* package ‘arrow’ ...
** using staged installation
*** Found libcurl and OpenSSL >= 1.1
*** Successfully retrieved C++ binaries (darwin-x86_64-openssl-1.1)
*** Checksum validated successfully for libarrow binary: darwin-x86_64-openssl-1.1/arrow-14.0.0.zip
Package libcurl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcurl.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libcurl', required by 'arrow', not found
Package libcurl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcurl.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libcurl', required by 'arrow', not found
Package libcurl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcurl.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libcurl', required by 'arrow', not found
*** pkg-config failed to find libcurl, but S3 is enabled. Running detection without pkg-config.
With the linking step giving me:
clang++ -arch x86_64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/x86_64/lib -o arrow.so RTasks.o altrep.o array.o array_to_vector.o arraydata.o arrowExports.o bridge.o buffer.o chunkedarray.o compression.o compute-exec.o compute.o config.o csv.o dataset.o datatype.o expression.o extension-impl.o feather.o field.o filesystem.o io.o json.o memorypool.o message.o parquet.o r_to_arrow.o recordbatch.o recordbatchreader.o recordbatchwriter.o safe-call-into-r-impl.o scalar.o schema.o symbols.o table.o threadpool.o type_infer.o -L/private/var/folders/4v/hvphchw50373drst9g5smz1w0000gn/T/RtmpTxZLvI/R.INSTALL71103e64d60a/arrow/libarrow/arrow-14.0.0/lib -L/opt/R/x86_64/lib -larrow_acero -larrow_dataset -lparquet -larrow -larrow_bundled_dependencies -lcurl -lssl -lcrypto -lcurl -lssl -lcrypto -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
This works! I see -lcurl -lssl -lcrypto -lcurl -lssl -lcrypto
(i.e., flags show up twice), but it doesn't seem to give an error.
I will also try on 10.13 shortly!
Ok, this works on 10.13 as well with the same output. I think it is worth updating the log output that says Also, worth fixing the doubled |
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.
One question, one suggestions, and one thing that's probably much larger that we should look into as a follow on (IMHO)
Well it did find curl as it's using the headers... so maybe "Found headers for ..."?
We could do something like |
@github-actions crossbow submit r-binary-packages |
Revision: 950f1dd Submitted crossbow builds: ursacomputing/crossbow @ actions-5371802dfe
|
Revision: 80ecd01 Submitted crossbow builds: ursacomputing/crossbow @ actions-cad65ca65d
|
This should be good to go now (the crossbow failure is due to #38779 ) |
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.
This looks good to me! Thank you!
80ecd01
to
7a7e8a7
Compare
pass proper libdir
Co-authored-by: Jonathan Keane <[email protected]>
update tests
This reverts commit a7eb7d5.
7a7e8a7
to
fb676f8
Compare
@github-actions crossbow submit r-binary-packages rebased to fix crossbow |
Revision: fb676f8 Submitted crossbow builds: ursacomputing/crossbow @ actions-d33deb962e
|
…pache#38970) ### Rationale for this change We can get into a broken state with a working test compile in `nixlibs.R` but empty `PKG_LIBS` when pkg-config fails to find some libraries (e.g. libcurl on mac due to missing system stubs) in `configure`. This leads to a failed test compile in configure with pc errors silenced. ### What changes are included in this PR? Catch this and rerun the pkg-config-less library detection that should fix this in most cases. ### Are these changes tested? locally and on cran (where this error first surfaced) * Closes: apache#38902 Lead-authored-by: Jacob Wujciak-Jens <[email protected]> Co-authored-by: Jonathan Keane <[email protected]> Signed-off-by: Jacob Wujciak-Jens <[email protected]>
After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 29263a1. There was 1 benchmark result indicating a performance regression:
The full Conbench report has more details. It also includes information about 5 possible false positives for unstable benchmarks that are known to sometimes produce them. |
### Rationale for this change We can get into a broken state with a working test compile in `nixlibs.R` but empty `PKG_LIBS` when pkg-config fails to find some libraries (e.g. libcurl on mac due to missing system stubs) in `configure`. This leads to a failed test compile in configure with pc errors silenced. ### What changes are included in this PR? Catch this and rerun the pkg-config-less library detection that should fix this in most cases. ### Are these changes tested? locally and on cran (where this error first surfaced) * Closes: #38902 Lead-authored-by: Jacob Wujciak-Jens <[email protected]> Co-authored-by: Jonathan Keane <[email protected]> Signed-off-by: Jacob Wujciak-Jens <[email protected]>
…pache#38970) ### Rationale for this change We can get into a broken state with a working test compile in `nixlibs.R` but empty `PKG_LIBS` when pkg-config fails to find some libraries (e.g. libcurl on mac due to missing system stubs) in `configure`. This leads to a failed test compile in configure with pc errors silenced. ### What changes are included in this PR? Catch this and rerun the pkg-config-less library detection that should fix this in most cases. ### Are these changes tested? locally and on cran (where this error first surfaced) * Closes: apache#38902 Lead-authored-by: Jacob Wujciak-Jens <[email protected]> Co-authored-by: Jonathan Keane <[email protected]> Signed-off-by: Jacob Wujciak-Jens <[email protected]>
Rationale for this change
We can get into a broken state with a working test compile in
nixlibs.R
but emptyPKG_LIBS
when pkg-config fails to find some libraries (e.g. libcurl on mac due to missing system stubs) inconfigure
. This leads to a failed test compile in configure with pc errors silenced.What changes are included in this PR?
Catch this and rerun the pkg-config-less library detection that should fix this in most cases.
Are these changes tested?
locally and on cran (where this error first surfaced)