r4pi / pkg_builder

4 stars 1 forks source link

rstan will not build #5

Open sellorm opened 1 year ago

sellorm commented 1 year ago

This has resulted in several packages being temporarily removed from the r4pi repo.

This includes rstan itself as well as some packages that depend on it:

These packages have been moved to the [bench] section of packages.cfg until the build issue is resolved.

andresrcs commented 1 year ago

Have you tried adding swap memory? Recently I tried to compile rstan on Posit Cloud and compilation runed out of RAM even with 8GB, I didn't found out the minimum requiered because I got frustrated and simply maxed out the project to 16GB and compilation worked

sellorm commented 1 year ago

That is most likely the problem, yes. I've just not had chance to do anything about it yet. It's useful that you've seen similar behaviour elsewhere though. Hopefully it'll be a simple fix.

remlapmot commented 1 year ago

Thanks for this amazing project.

The problem building rstan on armhf/armv7l might not be solved by using a swap file because it's failing on all the Debian 32 bit builds.

There is a tracking issue in the rstan repo at https://github.com/stan-dev/rstan/issues/1032.

It seems that one of the cpp files in the package now takes alot of memory to compile (I don't know if there is some 32 bit limitation it exceeds).

You can see the failed 32 bit Debian builds here https://packages.debian.org/sid/r-cran-rstan (screenshot of table at the bottom of that page)

2023-03-04 21_27_55-Debian -- Details of package r-cran-rstan in sid

In the issue the rstan maintainers seem to suggest they are hoping to remove the offending file in a future version, so maybe it will build on 32 bit again then.

(And I tried on my Pi with 8GB RAM but it also failed.)

andresrcs commented 1 year ago

It turns out, at least on RPi OS 32-bit, no single process can use more than 3GB of RAM so most likely that is the limiting factor considering that it takes >8GB on 64-bit systems.