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

Add test that features are enabled #63

Merged
merged 2 commits into from
Apr 25, 2023

Conversation

nealrichardson
Copy link
Contributor

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

Assuming this test is being run (I couldn't find where in the build logs), it should fail, given the reports in #56 and #62.

@nealrichardson nealrichardson requested review from a team as code owners April 24, 2023 00:28
@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@nealrichardson
Copy link
Contributor Author

Assuming this fails the builds as expected, we could try applying nealrichardson/arrow@e925a3f as a patch and see if that fixes things. I wasn't able to confirm this in apache/arrow CI because it turns out that the conda packages we build nightly already have the features enabled correctly (compare https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=685963&view=logs&j=4f922444-fdfe-5dcf-b824-02f86439ef14&t=b2a8456a-fb11-5506-ca32-5ccd32538dc0&l=394 here to https://dev.azure.com/ursacomputing/crossbow/_build/results?buildId=47681&view=logs&j=0da5d1d9-276d-5173-c4c4-9d4d4ed14fdb&t=d9b15392-e4ce-5e4c-0c8c-b69645229181&l=21736 on apache/arrow, where the feature flags are set correctly).

@h-vetinari
Copy link
Member

Do we need to do something like in the upstream R Makefile to discover the deps correctly?

@nealrichardson
Copy link
Contributor Author

Do we need to do something like in the upstream R Makefile to discover the deps correctly?

No, different dependencies. https://github.com/apache/arrow/blob/apache-arrow-11.0.0/r/configure#L250-L286 is the code in question: if ArrowOptions.cmake, which is generated in the arrow-cpp build, isn't found, we won't be able to determine which features are enabled in the C++ library, so we'll essentially assume they aren't present and won't turn any of them on in the R package.

@h-vetinari
Copy link
Member

if ArrowOptions.cmake, which is generated in the arrow-cpp build, isn't found, we won't be able to determine which features are enabled in the C++ library, so we'll essentially assume they aren't present and won't turn any of them on in the R package.

OK cool. That file is definitely being packaged with libarrow, so it should just be a question of pointing the R build to $PREFIX/lib/cmake/Arrow/ArrowOptions.cmake?

@nealrichardson
Copy link
Contributor Author

Right. And in theory the patch I referenced would do that.

@h-vetinari
Copy link
Member

Right. And in theory the patch I referenced would do that.

I was hoping it might be as easy as setting that variable correctly, but alas no. Shouldn't an environment variable be picked up by the R configure script though?

@nealrichardson
Copy link
Contributor Author

Hmm, based on the build log output, LIB_DIR is being set in the script and overwriting the env var you set, but interestingly there's no " around that line like the lines above it: https://github.com/apache/arrow/blob/main/r/configure#L113

I don't understand the subtleties of $PREFIX here, but I just see that the PKG_LIBS="${PKGCONFIG_LIBS}" seems to do what is expected but LIB_DIR=${FOUND_LIB_DIR} does not, and we know from the log message printed by L109 that FOUND_LIB_DIR is literally $PREFIX/lib https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=695884&view=logs&j=d0d954b5-f111-5dc4-4d76-03b6c9d0cf7e&t=841356e0-85bb-57d8-dbbc-852e683d1642&l=294.

recipe/build.sh Outdated Show resolved Hide resolved
@h-vetinari
Copy link
Member

Turns out I had forgotten to add /lib to the $PREFIX, now it works! :)

I think I'm going to merge this to unblock the two issues that were reported; it should be a net improvement in all respects already, and we can still keep iterating in a new PR if necessary.

@h-vetinari h-vetinari merged commit fae5d3e into conda-forge:main Apr 25, 2023
@nealrichardson nealrichardson deleted the feature-test branch April 25, 2023 16:35
@nealrichardson
Copy link
Contributor Author

Hmm, based on the build log output, LIB_DIR is being set in the script and overwriting the env var you set, but interestingly there's no " around that line like the lines above it: https://github.com/apache/arrow/blob/main/r/configure#L113

I don't understand the subtleties of $PREFIX here, but I just see that the PKG_LIBS="${PKGCONFIG_LIBS}" seems to do what is expected but LIB_DIR=${FOUND_LIB_DIR} does not, and we know from the log message printed by L109 that FOUND_LIB_DIR is literally $PREFIX/lib https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=695884&view=logs&j=d0d954b5-f111-5dc4-4d76-03b6c9d0cf7e&t=841356e0-85bb-57d8-dbbc-852e683d1642&l=294.

For posterity, it turns out that I was looking at the latest main branch, where this issue had been fixed: apache/arrow#34229

So the workaround added here can be removed in the 12.0.0 release (likely happening within days). Having it here won't harm anything as it will get overwritten in the configure script, as I described. And the test we added here will confirm that it is safe to delete the workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants