Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upInstallation from source fails on linux R/3.2.1. #47
Comments
|
I'm getting the same error on macOS 10.13.6. |
|
Thanks for reporting. I will investigate over the next week. R_nchar changed around 3.2, so it is possible that the version in 3.2.1 in particular is not what I was expecting it to be, hence the error. Any reason though why you are not using 3.2.5 instead of 3.2.1? All the testing platforms are going to test the lastest 3.x.y versions for any given x, so I'm not surprised something like this snuck through. The answer to this might end up being "only the most recent 'y' version of z.x.y" is supported, but I will review and confirm one way or the other. |
I can't speak for @andreadega, but in my case, I'm installing > install.packages("tidyverse")
also installing the dependencies ‘fansi’, ‘tidyselect’, ‘pillar’, ‘broom’, ‘dplyr’, ‘dbplyr’, ‘forcats’, ‘ggplot2’, ‘haven’, ‘modelr’, ‘purrr’, ‘readxl’, ‘tibble’, ‘tidyr’, ‘xml2’
There are binary versions available but the source versions are later:
binary source needs_compilation
tidyselect 0.2.3 0.2.4 TRUE
broom 0.4.3 0.4.5 FALSE
dplyr 0.7.4 0.7.6 TRUE
dbplyr 1.1.0 1.2.1 FALSE
forcats 0.2.0 0.3.0 FALSE
ggplot2 2.2.1 3.0.0 FALSE
haven 1.1.0 1.1.2 TRUE
modelr 0.1.1 0.1.2 FALSE
purrr 0.2.4 0.2.5 TRUE
readxl 1.0.0 1.1.0 TRUE
tibble 1.3.4 1.4.2 TRUE
tidyr 0.7.2 0.8.1 TRUE
xml2 1.1.1 1.2.0 TRUE
tidyverse 1.1.1 1.2.1 FALSE
Do you want to install from sources the packages which need compilation?
y/n: y
Package which is only available in source form, and may need compilation of C/C++/Fortran:
‘fansi’
Do you want to attempt to install these from sources?
y/n: ySo that's how I'm personally installing it. Here's what happens if I try to install > install.packages("fansi")
Package which is only available in source form, and may need compilation of C/C++/Fortran:
‘fansi’
Do you want to attempt to install these from sources?
y/n: y
installing the source package ‘fansi’
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 179k 100 0 179k 0 0 421k 0 --:--:-- --:--::-- --:--:-- --:--:-- 422k
* installing *source* package ‘fansi’ ...
** package ‘fansi’ successfully unpacked and MD5 sums checked
** libs
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c assumptions.c -o assumptions.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c has.c -o has.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c init.c -o init.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c nchar.c -o nchar.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c read.c -o read.o
read.c:547:19: warning: implicit declaration of function 'R_nchar' is invalid in C99 [-Wimplicit-function-declaration]
disp_size = R_nchar(
^
read.c:548:18: error: use of undeclared identifier 'Width'
str_chr, Width, state.allowNA, state.keepNA, mb_err_str
^
1 warning and 1 error generated.
make: *** [read.o] Error 1
ERROR: compilation failed for package ‘fansi’
* removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/fansi’
Warning in install.packages :
installation of package ‘fansi’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/nq/kmqwxhns4lzdv64kp1lcts9r0000gp/T/RtmpLfK0vo/downloaded_packages’ |
|
Thanks for the quick reply. I am currently constrained to use R/3.2.1 as it is the most recent version I was able to load and run on my local HPC infrastructure. |
|
Okay, so it looks like R3.2.1 is the one version of R (not fansi, R) for which this package won't build because the C function |
|
@gfairchild note that if you can update to a version of R that is either greater than R3.2.1 (e.g. R3.2.5), or downgrade to R3.1.0, this should work. |
|
@krlmlr, fyi in case others complain of this issue on pillar. |
|
Upgrading R worked! I'm now on 3.5.1, and everything just installed no problem. Thanks for the suggestion. I'm an R novice and thought that R Studio automatically included the latest R. I didn't realize I had to upgrade R separately. |
|
Thanks for tracking down this weird problem. When do you plan to push an update to CRAN? |
|
@krlmr Next week or so. |
|
This is fixed in the "development" branch. Probably still a week away from CRAN. |
|
Thank you very much! |
|
I am using the RStudio Version 1.1.463 and R Version 1.1.463
|
|
I'm not super familiar with compilation errors, but it looks like your system can't find stdint.h, which is a standard C library. Your compilation toolchain may be incomplete or not properly configured. If you have reason to think this is an actual error specific to this package, feel free to explain why. I just compiled it in linux from source and it was fine. Aside: why don't you just use |
This is what I obtain if try to install fansi:
In particular, note the
read.c:548:18: error: ‘Width’ undeclared.Best Wishes,
Andrea