Skip to content
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

Install failing on RHEL7.5 #150

Closed
ajs6f opened this issue Jun 6, 2018 · 8 comments
Closed

Install failing on RHEL7.5 #150

ajs6f opened this issue Jun 6, 2018 · 8 comments

Comments

@ajs6f
Copy link

ajs6f commented Jun 6, 2018

I'm having trouble installing on this platform, failing with:

g++ -m64 -std=gnu++11 -I/usr/include/R -DNDEBUG -fvisibility=hidden -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/BH/include" -I"/usr/lib64/R/library/later/include" -I/usr/local/include   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -c websockets-ietf.cpp -o websockets-ietf.o
g++ -m64 -std=gnu++11 -I/usr/include/R -DNDEBUG -fvisibility=hidden -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/BH/include" -I"/usr/lib64/R/library/later/include" -I/usr/local/include   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -c websockets.cpp -o websockets.o
cp -p -f libuv/m4/lt_obsolete.m4 libuv/m4/lt~obsolete.m4
(cd libuv \
	&& touch aclocal.m4 \
	&& touch -r aclocal.m4 configure Makefile.in \
	&& CC="gcc -m64 -std=gnu99" CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -fpic -fvisibility=hidden" AR="ar" RANLIB="ranlib" LDFLAGS="-Wl,-z,relro " ./configure "--quiet")
/bin/sh: line 3: ./configure: Permission denied
make: *** [libuv/Makefile] Error 126
ERROR: compilation failed for package ‘httpuv’
* removing ‘/usr/lib64/R/library/httpuv’

The downloaded source packages are in
	‘/tmp/RtmpiCGIXD/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("httpuv", repos = "https://cran.rstudio.com/") :
  installation of package ‘httpuv’ had non-zero exit status

It's an odd error, which seems to arise from permissions on the configure file in the libuv subdirectory. I have two questions:

  1. Is it possible to install using the yum-managed libuv package? It's not clear to me that httpuv needs to build libuv at all in my case.
  2. If not, is there some way I can intervene in the build to correct this permissions problem? I'm not sure how it's arising, but I know very little about R, so I'm grasping a bit at straws.

Thank you for any advice!

@wch
Copy link
Collaborator

wch commented Jun 6, 2018

I'm not able to reproduce the failure. Here's a Dockerfile that builds a Centos 7.5 image:

# docker build -t centos7r .

FROM centos:centos7

RUN yum -y install epel-release 
RUN yum -y update && \
    yum upgrade -y

RUN echo "LANG=en_US.utf8" >> /etc/locale.conf
RUN localedef -c -f UTF-8 -i en_US en_US.UTF-8
RUN export LC_ALL=en_US.UTF-8

RUN yum -y install libtool R-core R-core-devel R-java R-cpp openssl-devel libcurl-devel \
  && echo 'options(repos = c(CRAN = "https://cran.rstudio.com/"), download.file.method = "libcurl")' >> /usr/lib64/R/etc/Rprofile.site

RUN echo "MAKEFLAGS='--jobs=4'" >> /usr/lib64/R/etc/Renviron

# Create directories for documentation
RUN mkdir -p /usr/share/doc/R-3.4.4/html
RUN cp /usr/lib64/R/library/stats/html/R.css /usr/share/doc/R-3.4.4/html/


RUN R -e "install.packages('devtools')"
RUN R -e "install.packages('httpuv')"

CMD bash

To build it:

docker build -t centos7r .

The Docker image includes httpuv, but we can install it again in a container:

docker run --rm -ti centos7r
R -e 'install.packages("httpuv")'

@ajs6f If you download the tar file and untar it, does the file src/libuv/configure have execute permissions?

https://cran.rstudio.com/src/contrib/httpuv_1.4.3.tar.gz

@ajs6f
Copy link
Author

ajs6f commented Jun 6, 2018

Good question-- it has -rwx------, which makes me wonder if potentially the account downloading is different than the account that does the build? I'm doing:

sudo su - -c "R --verbose -e \"install.packages('httpuv', repos='https://cran.rstudio.com/')\""

to try to install. As I said, I'm an R newb, so if that is a demented way to try to install, please do tell me!

@ajs6f
Copy link
Author

ajs6f commented Jun 6, 2018

Changing the perms manually and installing from source got me past this.

Furthermore, I saw a similar problem trying to install some other libraries, so I am less and less sure this has as much to do with httpuv as much as it has to do with some weirdness local to my system.

Closing as unreproduced and unlikely to be a problem for others.

@ajs6f ajs6f closed this as completed Jun 6, 2018
@wch
Copy link
Collaborator

wch commented Jun 6, 2018

I tried doing the same in the docker container: creating a user, doing su - myuser and then running your sudo su - -c "R ....." command, and it still installed for me. Maybe your sudo permissions don't give you permissions to do just anything? You can check the /etc/sudoers file to see how it's configured on your system.

@jcheng5
Copy link
Member

jcheng5 commented Jun 7, 2018

@ajs6f Is your home directory and/or temp directory on an NFS mount, by any chance? If so this could be related to root squash?

@wch
Copy link
Collaborator

wch commented Jun 7, 2018

I believe this might be caused by #151.

@wch
Copy link
Collaborator

wch commented Jun 7, 2018

@ajs6f Can you try this?

devtools::install_github("rstudio/httpuv@fix-configure-perms")

@ajs6f
Copy link
Author

ajs6f commented Jun 13, 2018

@jcheng5 That is not impossible, but not that likely. I don't know for sure, but I could find out.

@wch #151 sounds directly on-point. Since I have successfully installed httpuv (for the purpose of installing Shiny Server), can I execute your install command above without borking it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants