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

Mechanism to override AC_CHECK_FUNCS in Autoconf #32

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

georgestagg
Copy link
Member

For R packages using Autoconf, we'll sometimes need to be able to force the result of AC_CHECK_FUNCS.

For example, in the uuid package Autoconf sets HAVE_GETRANDOM. Despite compiling OK, using getrandom() at the time of writing fails for R packages compiled using Emscripten, due to a missing symbol. Autoconf missed this because we compile R packages with the SIDE_MODULE=1 flag. With this flag, Emscripten does not complain about the missing symbols at compile time, but the result fails at runtime.

So, using this mechanism we can force Autoconf to return "no" when checking for getrandom(), fixing the issue with uuid. We can also extend the mechanism in the future to force other AC_CHECK_FUNCS results if we find other R packages with similar runtime issues.

TODO: In the case of non-autoconf-based configure scripts we already pass extra arguments --build and --host, but in principle we should add something so that we don't pass these Autoconf flags to generic configure scripts not expecting them.

For R packages using Autoconf, we'll sometimes need to be able to
force the result of AC_CHECK_FUNCS.

For example, for the `uuid` package Autoconf sets `HAVE_GETRANDOM`.
Despite compiling OK, using `getrandom()` at the time of writing
in fact fails for R packages compiled using Emscripten, due to a
missing symbol. Autoconf missed this because we compile R packages
with the `SIDE_MODULE=1` flag, and with this flag Emscripten does
not complain about the missing symbols.

So, using this mechanism we can force Autoconf to return "no" when
checking for `getrandom()`, fixing the issue with `uuid`.
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.

1 participant