-
Notifications
You must be signed in to change notification settings - Fork 25
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
Cannot build INLA from source on Windows #99
Comments
The build process for the INLA R package requires a manual step of first building the standalone inla binary executable, so no INLA package version can be built purely using the normal R build process. When installing from the repositories, one cannot "build" the package in a working format, as that will not include the executable, so "building from source" will not work on any R version, or any existing INLA source code version, without manual intervention. This may be improved in the future, but the build process is difficult to fully automate. The "stable" repository cannot yet be used with R 4.4, as only the testing version has been built for R 4.4, currently one must use testing with 4.4, and stable with 4.3. But yes, the missing binary for 24.05.10 will cause an issue. R should let you specify that you only want "binary" installation, which should work around the issue without needing to specify the version (as that's not supported by
|
The documentation for
|
OK - thanks for these workarounds - but just to highlight the immediate problem - So if we want to use the stable version, we should use R 4.3 for now - fine - but if an R 4.3 user follows the installation instructions from here (https://www.r-inla.org/download-install) - which say:
that will fail with the error message I got above because it will try to install 24.05.10 from source. So I think for now, either updating the installation instructions with the workaround to make install.packages not do that, or filling in the missing binary in the 4.3 folder might be helpful to do. |
Further - I tested on R 4.3 with
For now, an explicit INLA version, for which a binary exists for that R-version seems to be the only workaround - or pressing ahead with R 4.4 regardless, where the binary does seem to exist. |
Did the |
I see in the NEWS.md file that 24.05.10 was the first R 4.4 build, so the error with that one is that it shouldn't be present in any form in the 4.3 folder. |
Have you found a method for specifying a specific INLA version that actually works? I don't see an option for that in |
Yes, so the issue then is why does it still try to build 24.05.10 from source in R 4.3 |
It tries to build it because it finds a newer source package. I would have expected turning off that check to have fixed it; that may be an error in the |
The most generally useful approach on windows and macos seems to be for such users to always specify |
Yes, you're right - and further remotes::install_version requires type="source". So type="binary" on install.packages indeed seems the best option, since building from source on Windows does not seem likely to be possible. (On our cluster, we use pkgdepends, which can let us specify both the repo and version) |
I see that https://www.r-inla.org/download-install already does mention the |
I think all the instructions for remotes::install_version probably need reviewing. From R 4.3, the instructions there do the following:-
and for R 4.4, since remotes::install_version has default
|
Incidentally, for R 4.3 the issue is that version 23.05.30 doesn't exist - the earliest is 23.05.30-1 - and the most recent 24.05.01-1 - but again, you can't install any of these with remotes::install_version because that would require compilation from source. (I haven't tested R 4.1) So at present, the only way you can install any INLA package on any R version on windows is
which will get the most recent binary for your R version. There is no way I think to get a specific older (binary) version, or to use any method that involves compiling from source. |
There's always a way: downloading the needed tar/zip file manually and installing from the file instead of the repository. But the |
If we try and build INLA from source, we get the error message below:-
This is easy to work around with R 4.4 - just don't build from source, and the binary gets downloaded - if the ready-build version is available. But for users still on R 4.3, there is no matching binary of 24.05.10 in
https://inla.r-inla-download.org/R/stable/bin/windows/contrib/4.3/
, so install.packages tries to build 24.05.10 from source. They have to either upgrade to R 4.4, or specify version 24.05.01-1 manually, because there's a binary for that.So the workarounds are not hard, but is seems there's a problem in the source version for building at the moment.
The text was updated successfully, but these errors were encountered: