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

[R] Include and Lib flags are missing on macOS #38902

Closed
assignUser opened this issue Nov 27, 2023 · 2 comments · Fixed by #38970
Closed

[R] Include and Lib flags are missing on macOS #38902

assignUser opened this issue Nov 27, 2023 · 2 comments · Fixed by #38970
Assignees
Labels
Component: R Priority: Blocker Marks a blocker for the release Type: bug
Milestone

Comments

@assignUser
Copy link
Member

Describe the bug, including details regarding any error messages, version, and platform.

So far only happened on CRAN see log https://www.r-project.org/nosvn/R.check/r-release-macos-x86_64/arrow-00check.html

I wan unable to reproduce locally, likely an issue with pkg-config (or without it?)

Component(s)

R

@assignUser assignUser added this to the 14.0.2 milestone Nov 27, 2023
@assignUser assignUser added Priority: Blocker Marks a blocker for the release and removed Component: R labels Nov 27, 2023
@assignUser
Copy link
Member Author

I have marked this as a blocker for now, if it seems to hold up the 14.0.2 release we will likely be able to cherry pick it before the release to cran as it is most likely an issue soley with the R configure script.

@assignUser
Copy link
Member Author

I am pretty sure that I was able to reproduce the error on a gha mac runner by using the pkg-config binary from CRAN.

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

It seems the system curl stub is not in a default location or in PKG_CONFIG_PATH as downloading the r-macos/recipes libcurl.pc and adding it to the path var fixes the issue. If this is actually the same issue as on cran then it's imo a config issue of the builder...
I am going to test a general workaround for "PKG_LIBS is empty after use of pc" by then re-running the w/o pc functions.

assignUser added a commit to assignUser/arrow that referenced this issue Dec 1, 2023
pass proper libdir

re-run add_feature_flags

generalize retry for all pc fails

don't silence pkg-config errors

add missing else

use portable check

make empty check more readable

Co-authored-by: Jonathan Keane <[email protected]>

dedpulicate -l flags and localize cloud flags

append ssl flags

add pkg-config debug messages

rephrase nixlib test compilation messages

update tests

rephrase latest nightly message

Revert "rephrase nixlib test compilation messages"

This reverts commit a7eb7d5.
assignUser added a commit that referenced this issue Dec 1, 2023
### 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]>
@assignUser assignUser changed the title [R] Include and LIB flags are missing on macOS [R] Include and Lib flags are missing on macOS Dec 1, 2023
assignUser added a commit to assignUser/arrow that referenced this issue Dec 1, 2023
…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]>
raulcd pushed a commit that referenced this issue Dec 4, 2023
### 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]>
dgreiss pushed a commit to dgreiss/arrow that referenced this issue Feb 19, 2024
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: R Priority: Blocker Marks a blocker for the release Type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant