GithubHelp home page GithubHelp logo

Comments (12)

eddelbuettel avatar eddelbuettel commented on July 4, 2024

No problem here. Also note the install.r command in /usr/local/bin

edd@max:~$ docker run --rm -t -i rocker/r-base install.r bit
trying URL 'http://cran.rstudio.com/src/contrib/bit_1.1-12.tar.gz'
Content type 'application/x-gzip' length 53737 bytes (52 Kb)
opened URL
==================================================
downloaded 52 Kb

* installing *source* package ‘bit’ ...
** package ‘bit’ successfully unpacked and MD5 sums checked
** libs
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c attrutil.c -o attrutil.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c bit.c -o bit.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c chunkutil.c -o chunkutil.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c clone.c -o clone.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c rle.c -o rle.o
gcc -std=gnu99 -shared -Wl,-z,relro -o bit.so attrutil.o bit.o chunkutil.o clone.o rle.o -L/usr/lib/R/lib -lR
installing to /usr/local/lib/R/site-library/bit/libs
** R
** exec
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (bit)

The downloaded source packages are in
        ‘/tmp/downloaded_packages’
edd@max:~$ 

I may be a day behind downloading but that should not be it:

edd@max:~$ docker images | grep rocker/r-base
rocker/r-base                     latest              e02f8ca225de        3 days ago          460.4 MB
edd@max:~$ 

What hash key does your image have? Maybe it is the outer shell -- I have LANG=en_US.UTF-8 which is how it has been since the base install ...

from rocker.

eddelbuettel avatar eddelbuettel commented on July 4, 2024

Ahh. It is an Rscript issue.

Not my department then. I suggest complaining with R Core :)

from rocker.

kforner avatar kforner commented on July 4, 2024

Not just an Rscript issue:

docker run -ti rocker/r-base bash
R -q
>install.packages("bit")

==> same issue

but indeed

docker run --rm -t -i rocker/r-base install.r bit

does work well.
So I guess you are doing some magic in littler that hides this issue.

from rocker.

eddelbuettel avatar eddelbuettel commented on July 4, 2024

So just use litter [shrugs]. More seriously, the way littler is built it hardwires environment variables. So it is whatever its build system had.

Encoding is Carl's hobby-horse, I'll let him take over.

from rocker.

kforner avatar kforner commented on July 4, 2024

So just use littler

;) I know this is a wonderful tool written by a fantastic coder, but I'm a little worried why my soon-to-be reference R platform can not run readLines() properly.

Encoding is Carl's hobby-horse, I'll let him take over.
Ok, I'll wait for my quasi-homonym then !

from rocker.

eddelbuettel avatar eddelbuettel commented on July 4, 2024

Just feed it a non-borked package:

edd@max:~$ docker run --rm -t -i rocker/r-base Rscript -e 'install.packages("digest")'                                                                                                                                                     
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/digest_0.6.4.tar.gz'
Content type 'application/x-gzip' length 79309 bytes (77 Kb)
opened URL
==================================================
downloaded 77 Kb

* installing *source* package ‘digest’ ...
** package ‘digest’ successfully unpacked and MD5 sums checked
** libs
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c aes.c -o aes.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c crc32.c -o crc32.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c digest.c -o digest.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c md5.c -o md5.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c raes.c -o raes.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c sha1.c -o sha1.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c sha2.c -o sha2.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c sha256.c -o sha256.o
gcc -std=gnu99 -shared -Wl,-z,relro -o digest.so aes.o crc32.o digest.o md5.o raes.o sha1.o sha2.o sha256.o -L/usr/lib/R/lib -lR
installing to /usr/local/lib/R/site-library/digest/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (digest)

The downloaded source packages are in
        ‘/tmp/RtmpzVaZI5/downloaded_packages’

I am sure Rscript probably behaves on bit as well with bit of tweaking but let you do that.

from rocker.

cboettig avatar cboettig commented on July 4, 2024

yeah, definitely looks like an issue in the bit package. Maybe multiple issues. Looks like setting the locale manually will let the package install successfully, but still issues more warnings than the littler install; e.g. try:

docker run --rm -it -e LC_ALL=C rocker/r-base Rscript -e 'install.packages("bit")'

from rocker.

kforner avatar kforner commented on July 4, 2024

Yes, I use "bit" on purpose. I guess it contains variable-encoded text files, such as man/as.bit.rd:

Rscript -e 'a <- readLines("man/as.bit.rd")'
Warning messages:
1: In readLines("man/as.bit.rd") :
  invalid input found on input connection 'man/as.bit.rd'
2: In readLines("man/as.bit.rd") :
  incomplete final line found on 'man/as.bit.rd'

But I have the same problem with other packages too.

from rocker.

eddelbuettel avatar eddelbuettel commented on July 4, 2024

I'd look at what the base R tools package does. By allowing for old-world encodings, you may need to set some explicit overrides.

from rocker.

kforner avatar kforner commented on July 4, 2024

I think I got a beginning of explanation: this works

docker run -ti rocker/r-base Rscript --no-site-file -e 'install.packages("bit", repos="http://cran.rstudio.com")'

So I guess this is the

options("repos"="http://cran.rstudio.com", encoding="UTF-8")

from the Dockerfile, which I have borrowed for my own too which is the culprit.

from rocker.

cboettig avatar cboettig commented on July 4, 2024

Nice find, thanks! I think we can eliminate the encoding setting there now
that we set the LC environmental variable.

On Wed, Oct 15, 2014 at 9:09 AM, Karl Forner [email protected]
wrote:

I think I got a beginning of explanation: this works

docker run -ti rocker/r-base Rscript --no-site-file -e 'install.packages("bit", repos="http://cran.rstudio.com")'

So I guess this is the

options("repos"="http://cran.rstudio.com", encoding="UTF-8")

from the Dockerfile, which I have borrowed for my own too which is the
culprit.


Reply to this email directly or view it on GitHub
#40 (comment).

Carl Boettiger
UC Santa Cruz
http://carlboettiger.info/

from rocker.

cboettig avatar cboettig commented on July 4, 2024

@kforner I think this should be all fixed in the current builds.

from rocker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.