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 package fails to install from checkout on Windows due to jemalloc #6863

Closed
2 tasks done
jeroen opened this issue Mar 25, 2023 · 0 comments · Fixed by #6864
Closed
2 tasks done

R package fails to install from checkout on Windows due to jemalloc #6863

jeroen opened this issue Mar 25, 2023 · 0 comments · Fixed by #6864

Comments

@jeroen
Copy link
Contributor

jeroen commented Mar 25, 2023

What happens?

duckdb fails to install on Windows in r-universe due to jemalloc errors. The problem appears because we create the R source package on Linux, and then install/check this source package on Linux, Mac, and Windows (just like CRAN).

The bug is that when the source package is made on linux, rconfgure.py unconditionally enables the jemalloc extension :

if platform.system() == 'Linux' and platform.architecture()[0] == '64bit':
extensions.append('jemalloc')

This results in a duckdb R package that cannot be installed on Windows. But in addition it also behaves different from the CRAN package on other platforms: the CRAN duckdb configuration does not use the jemalloc extension (regardless of platform) because the R source package was created on MacOS.

Solution

The easiest solution is to remove the two lines above to make this extension opt-in like all other extensions. This way the R source package matches the configuration of the CRAN package, even when you create it on Linux. See #6864

If you would want to auto-enable jemalloc on linux, you would need to check the platform at install time, either in your src/Makevars file or a configure script that you ship with the R package. Your current configure script only runs at source build time but is omitted from the source package that you publish on e.g. CRAN:

.*\.sh
.*\.tar.gz
.*\.tgz
.*\.zip
git
configure

This is a bit confusing, you probably should name it something else than configure if it is not an install-time script, but that is another issue :)

To Reproduce

Build the duckdb R source package on Linux, and try to install it on Windows. (the converse also doesn't work btw).

Or: look at the build log on https://duckdb.r-universe.dev/duckdb

OS:

Windows

DuckDB Version:

git master

DuckDB Client:

R

Full Name:

Jeroen

Affiliation:

ropensci

Have you tried this on the latest master branch?

  • I agree

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

  • I agree
@jeroen jeroen changed the title R package fails to install on Windows due to jemalloc R package fails to install from checkout on Windows due to jemalloc Mar 25, 2023
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 a pull request may close this issue.

1 participant