Fedora Linux Support Community & Resources Center
  #1  
Old 8th January 2012, 08:09 PM
jstults Offline
Registered User
 
Join Date: Jan 2012
Location: US
Posts: 1
linuxfirefox
Additional R packages in kickstart post script

I've successfully modified the xfce spin to include R and some other analysis software, now I am trying to install some of the packages from CRAN that aren't packaged for Fedora. To do this I am using the %post section of the kickstart file.

The first part copies the tarballs into a directory in the installation root.
Code:
# use the nochroot environment to copy files to the install file-system
%post --nochroot 

TARPATH=/path/to/tarballs
TAR_INSTALL=$INSTALL_ROOT/usr/local/tarballs
cp $TARPATH/pwr_1.1.1.tar.gz $TAR_INSTALL
cp $TARPATH/AlgDesign_1.1-7.tar.gz $TAR_INSTALL

%end
Then I use the R CMD INSTALL method to install the libraries (pwr and AlgDesign).

Code:
# use the chroot'd post environment to build/install the sources 
%post 

R CMD INSTALL pwr_1.1.1.tar.gz
R CMD INSTALL AlgDesign_1.1-7.tar.gz

%end
The first one (pwr) works just fine, but the second one (AlgDesign) fails. I think pwr is a pure R library, so it doesn't require any compilation, but AlgDesign requires a compile step. Here's the error message:

Code:
* installing *source* package 'AlgDesign' ...
** package 'AlgDesign' successfully unpacked and MD5 sums checked
** libs
gcc -m32 -std=gnu99 -I/usr/include/R  -I/usr/local/include    -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4  -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -c FederovOpt.c -o FederovOpt.o
gcc: error trying to exec 'cc1': execvp: No such file or directory
make: *** [FederovOpt.o] Error 1
ERROR: compilation failed for package 'AlgDesign'
* removing '/usr/lib/R/library/AlgDesign'
ignoring %post failure (code 1)
I googled "gcc: error trying to exec 'cc1': execvp: No such file or directory," and some threads mentioned that cc1 is provided by the cpp package. I double-checked the livecd-creator output, and I've got cpp installed successfully.

Any ideas on how to fix this? Do I need to set some path variables for gcc to work in the %post or %post --nochroot sections of the kickstart?
Reply With Quote
  #2  
Old 8th January 2012, 08:34 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,092
linuxfedorafirefox
Re: Additional R packages in kickstart post script

I'm not sure that it will - I think it is partially installed, and until the first reboot after this will it actually be available. Things have to get committed (and the library cache rebuilt) before it will actually work.

NOTE: I could be wrong on this though.
Reply With Quote
Reply

Tags
additional, cc1, cran, gcc, kickstart, packages, post, script

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't get Post script to work in Kickstart file MaxHavoc Installation and Live Media 0 20th April 2009 09:11 PM
Kickstart %post install Script Help slops Using Fedora 2 5th December 2008 11:30 AM
nfs fails in fc7 kickstart %post script buhl260 Installation and Live Media 1 10th July 2007 01:34 PM
Kickstart Post Install script i2ambler Using Fedora 1 23rd August 2006 08:57 PM
FC3 and Additional NTFS drives post install sc123 Installation and Live Media 6 24th November 2004 04:38 AM


Current GMT-time: 08:50 (Sunday, 19-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat