Error while compiling latest version
jacobmaugoust opened this issue · 6 comments
Hello!
I am trying to update to the latest rgl version. I tried with the classical install.package
(compiling from source) and install_github
(both from remotes
and devtools
). In all cases, I get the following, the error being in the Makevars.win file at line 33.
* installing *source* package 'rgl' ...
** package 'rgl' successfully unpacked and MD5 sums checked
** using staged installation
** libs
*** arch - i386
Makevars.win:33: *** missing separator. Stop.
ERROR: compilation failed for package 'rgl'
* removing 'D:/Progs/Fac/R/R-4.1.1/library/rgl'
* restoring previous 'D:/Progs/Fac/R/R-4.1.1/library/rgl'
Warning in install.packages :
installation of package ‘rgl’ had non-zero exit status
Is there something I should do to fix this?
I precise that I'm using R 4.1.1 and not latest versions due to some weird trouble I was having with more recent versions and their interaction with RStudio, so I'm using Rtools40 and not Rtools42 or 43 to build packages from source.
I quickly browsed and search in the reported issues but did not find something related, please send me a link if such problem has already been reported by somebody else!
Many thanks anyway!
Jacob
I don't think I generally test on old versions on Windows, so I could have missed something here. The line that was reported looks like this before configuring (in src/Makevars.win.in):
@HIDE_IF_R42PLUS@ sed -e "s^@RGL_NO_OPENGL@^FALSE^" ../R/noOpenGL.R.in > ../R/noOpenGL.R
and is supposed to look like this after configure.win
runs and produces src/Makevars.win:
sed -e "s^@RGL_NO_OPENGL@^FALSE^" ../R/noOpenGL.R.in > ../R/noOpenGL.R
I can't spot an error in that. Can you see src/Makevars.win and how it actually turned out?
Thanks for the quick answer!
So yes I'm having the exact same line in Makevars.win.in but I am not sure how I can check what is in Makevars.win after configure.win runs. If I run the R package installer, I can access very quickly the 00LOCK folder but for a very short time (I tried to check what was in there but did not find the src folder) - is this what you are meaning? Or should I try to compile it not using R?
On Windows, the configuration works by running the tools/configure.R
script. It will create makevars.win
.
To do this outside of an attempte build, you should check out the R sources from Github, then in R switch to the rgl top level directory (where the DESCRIPTION
and NAMESPACE
files are) and run source("tools/configure.R")
. This should create the makevars.win
file in the src
directory.
Just done. I'm having exactly the same output you have.
Can't spot an error either, it says a separator is missing and from what I've seen on other forums it should be a tab given that it's a make file. Maybe it's the line 36 ( rm -f $(OBJECTS) $(SHLIB)
of Makevars.win), that seems to only have two spaces and not a space and a tab that is causing some issue? I don't think so since it explicitly says the line 33 is bugging, but since everything seems to be OK there...
Or maybe the @RGL_NO_OPENGL@
should also turn into something more explicit? From the makevars.win.in to the makevars.win files, the @HIDE_IF_R42PLUS@
do "disappear", I guess it is for a reason answering to some condition; could it be the same for the @(...)@ part of the line 33?
Let me try some builds using Github actions.
You were right about the underlying cause -- there were a few spaces in the Makevars.win.in
where they didn't belong. Just trying one more set of checks, then I'll merge the changes into the main branch. (Currently they are on branch "oldwin", so you could try sooner if you need to.)