compiling R packages - failed to map segment error

Discuss usability issues, general maintenance, and general support issues for a grsecurity-enabled system.

compiling R packages - failed to map segment error

Postby sfxjay » Mon Nov 16, 2015 1:20 am

Hello,

I'm using R for statistical computing. GRsec/pax enabled, when attempting to compile R packages from within R, I have some trouble, an error failed to map segment from shared object. thanks for any help/guidance.

Here's what the output looks like.

Code: Select all
> install.packages("zoo", dependencies = FALSE)
Installing package(s) into ‘/home/user/R/x86_64-pc-linux-gnu-library/2.15’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/zoo_1.7-12.tar.gz'
Content type 'application/x-gzip' length 839181 bytes (819 Kb)
opened URL
==================================================
downloaded 819 Kb

* installing *source* package ‘zoo’ ...
** package ‘zoo’ successfully unpacked and MD5 sums checked
** libs
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I../inst/include     -fpic  -O2 -pipe -g  -c coredata.c -o coredata.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I../inst/include     -fpic  -O2 -pipe -g  -c init.c -o init.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I../inst/include     -fpic  -O2 -pipe -g  -c lag.c -o lag.o
gcc -std=gnu99 -shared -o zoo.so coredata.o init.o lag.o -L/usr/lib/R/lib -lR
installing to /home/user/R/x86_64-pc-linux-gnu-library/2.15/zoo/libs
** R
** demo
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
   ‘zoo-design.Rnw’
   ‘zoo-faq.Rnw’
   ‘zoo-quickref.Rnw’
   ‘zoo-read.Rnw’
   ‘zoo.Rnw’
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared object '/home/user/R/x86_64-pc-linux-gnu-library/2.15/zoo/libs/zoo.so':
  /home/user/R/x86_64-pc-linux-gnu-library/2.15/zoo/libs/zoo.so: failed to map segment from shared object: Permission denied
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/user/R/x86_64-pc-linux-gnu-library/2.15/zoo’
Warning in install.packages :
  installation of package ‘zoo’ had non-zero exit status

The downloaded source packages are in
   ‘/tmp/RtmpSRUaas/downloaded_packages’
sfxjay
 
Posts: 1
Joined: Sun Nov 15, 2015 2:05 am

Re: compiling R packages - failed to map segment error

Postby PaX Team » Mon Nov 16, 2015 6:26 am

have you got related kernel logs perhaps? also can you post the output of readelf -edW /home/user/R/x86_64-pc-linux-gnu-library/2.15/zoo/libs/zoo.so please?
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm


Return to grsecurity support