# Pkgbuild::compile\_dll() on previously working rstantools-based package fails with "file too big" error

**URL:** <https://discourse.mc-stan.org/t/pkgbuild-compile-dll-on-previously-working-rstantools-based-package-fails-with-file-too-big-error/21938>\
**Category:** Interfaces\
**Tags:** rstan\
**Created:** [April 16, 2021, 9:26pm UTC](https://discourse.mc-stan.org/t/pkgbuild-compile-dll-on-previously-working-rstantools-based-package-fails-with-file-too-big-error/21938 "2021-04-16T21:26:06Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![ebuhle](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/ebuhle/32/4459_2.png) [@ebuhle](https://discourse.mc-stan.org/u/ebuhle)\
**Post date:** [April 23, 2021, 6:28pm UTC](https://discourse.mc-stan.org/t/pkgbuild-compile-dll-on-previously-working-rstantools-based-package-fails-with-file-too-big-error/21938/8 "2021-04-23T18:28:22Z")

</div>

Now that you mention it, @Kbus007, I remember seeing that thread. I was intrigued by the possibility of putting prebuilt binaries on GitHub, but unclear on the details (e.g., [“I would not put them in git”](https://discourse.mc-stan.org/t/rstantools-very-slow-compilation-with-r-4-0/21343/7), but they can still be on GH?) and haven’t had time to follow up.

In my case, though:

> [@ebuhle](#):
>
> It worked on my real package of interest too, but that initial Clean and Rebuild took, no kidding, _15 hours_ for what is normally a 15-minute compile. Subsequent recompiles with the **devtools** framework were no slower than usual.

Same toolchain configuration in both cases. I haven’t tried Clean and Rebuild-ing a second time, but I’m guessing that method, like the **devtools** -based method, would also be “as fast as before” now that I’ve cleared out the problem – whatever it was. I’m not sure what Clean and Rebuild does that’s different from manually emptying the `/src` directory (which didn’t work, as noted in the OP), but evidently it did the trick…eventually.

---

_[View the full topic](https://discourse.mc-stan.org/t/pkgbuild-compile-dll-on-previously-working-rstantools-based-package-fails-with-file-too-big-error/21938)._
