You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 :
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:
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
The text was updated successfully, but these errors were encountered:
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
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 :duckdb/tools/rpkg/rconfigure.py
Lines 9 to 10 in b8cf6a9
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 aconfigure
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:duckdb/tools/rpkg/.Rbuildignore
Lines 1 to 6 in b8cf6a9
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?Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?
The text was updated successfully, but these errors were encountered: