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

./configure script sometimes has wrong permissions when installing from zip #151

Closed
wch opened this issue Jun 7, 2018 · 3 comments · Fixed by #152
Closed

./configure script sometimes has wrong permissions when installing from zip #151

wch opened this issue Jun 7, 2018 · 3 comments · Fixed by #152

Comments

@wch
Copy link
Collaborator

wch commented Jun 7, 2018

The build of httpuv runs ./configure in src/libuv. With some installation methods, it says that it can't execute the script.

On rstudio.cloud:

> remotes::install_github("rstudio/httpuv")
...
...
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" CFLAGS="-g -O2  -fpic -fvisibility=hidden" AR="ar" RANLIB="ranlib" LDFLAGS="-L/usr/local/lib" ./configure "--quiet")
/bin/bash: line 3: ./configure: Permission denied
Makevars:61: recipe for target 'libuv/Makefile' failed
make: *** [libuv/Makefile] Error 126
ERROR: compilation failed for package ‘httpuv’

This also fails:

remotes::install_url("https://github.com/rstudio/httpuv/archive/master.zip")

However, these work:

remotes::install_url("https://github.com/rstudio/httpuv/archive/master.tar.gz")

remotes::install_url("https://cran.r-project.org/src/contrib/httpuv_1.4.3.tar.gz")
@wch
Copy link
Collaborator Author

wch commented Jun 7, 2018

It appears that whether or not R's unzip() function preserves permissions is dependent on the platform.

My mac correctly preserves the execute permission on the configure script:

download.file("https://github.com/rstudio/httpuv/archive/master.zip", "httpuv-master.zip")
getOption("unzip")
#> [1] "/usr/bin/unzip"
unzip("httpuv-master.zip")
file.mode("httpuv-master/src/libuv/configure")
#> [1] "755"

On rstudio.cloud it does not, using the default "internal" unzip:

download.file("https://github.com/rstudio/httpuv/archive/master.zip", "httpuv-master.zip")
getOption("unzip")
#> [1] "internal"
unzip("httpuv-master.zip")
file.mode("httpuv-master/src/libuv/configure")
#> [1] "664"

However, if you use /usr/bin/unzip, it works:

download.file("https://github.com/rstudio/httpuv/archive/master.zip", "httpuv-master.zip")
unlink("httpuv-master", recursive = TRUE)
unzip("httpuv-master.zip", unzip = "/usr/bin/unzip")
file.mode("httpuv-master/src/libuv/configure")
#> [1] "755"

@wch wch changed the title ./configure script has wrong permissions with some installation methods ./configure script sometimes has wrong permissions when installing from zip Jun 7, 2018
@kuzmenkov111
Copy link

I'v tried, but it still does not work
sudo su - -c "R -e \"options(unzip = 'internal'); devtools::install_github('rstudio/httpuv')\""

And then Error
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 \ && chmod +x configure \ && CC="gcc -std=gnu99" CFLAGS="-DU_STATIC_IMPLEMENTATION -g -O2 ./configure: line 6832: /usr/bin/sed: No such file or directory ...

make --directory=libuv \ HAVE_DTRACE=0 make[1]: Entering directory /tmp/Rtmp0pMAfR/devtools9312c419cbe/rstudio-httpuv-
CC src/libuv_la-fs-poll.lo
no acceptable sed could be found in $PATH
make[1]: *** [src/libuv_la-fs-poll.lo] Error 1
make[1]: Leaving directory `/tmp/Rtmp0pMAfR/devtools9312c419cbe/rstudio-httpuv-d
make: *** [libuv/.libs/libuv.a] Error 2
ERROR: compilation failed for package ‘httpuv’

  • removing ‘/opt/microsoft/ropen/3.4.3/lib64/R/library/httpuv’
  • restoring previous ‘/opt/microsoft/ropen/3.4.3/lib64/R/library/httpuv’
    Installation failed: Command failed (1)
    `

@wch
Copy link
Collaborator Author

wch commented Jun 13, 2018

@kuzmenkov111 Your issue is a different one... Can you file a new issue with httpuv? And please include information about what platform you're running on.

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

Successfully merging a pull request may close this issue.

2 participants