[R] "ignoring environment value of R_HOME" error when installing packages

2008-06-03 Thread tub78

I am troubled by what appears to be a glitch in the current
distribution, or in
its installation on our system.  I've traced it, and found a work-
around.  Is
this normal?  Is there a cleaner solution?


The problem:

During a package installation, the warning message "WARNING: ignoring
environment value of R_HOME" from line 31 of /bin/R is
accidentally
spliced into the CLINK_CPPFLAGS variable at line 606 of /bin/
INSTALL.
This prevents the compilation C files.  Please note that I have not
set the R_HOME
environment variable; it is undefined in my shell.

- Here are lines 29-32 from /bin/R:

if test -n "${R_HOME}" && \
   test "${R_HOME}" != "${R_HOME_DIR}"; then
  echo "WARNING: ignoring environment value of R_HOME"
fi

- Here is line 606 of /bin/INSTALL:

CLINK_CPPFLAGS=`echo
"tools:::.find_cinclude_paths(file='DESCRIPTION')" | \
  "${R_EXE}" --vanilla --slave`



The work-around:

First some background.  The command sequence "R CMD INSTALL" sets in
motion a sequence of scripts that collectively manage the installation
process.

"R"/bin/R  calls Rcmd script on line
148
"CMD"  /lib/R/bin/Rcmd calls INSTALL script on
line 45
"INSTALL"  /lib/R/bin/INSTALL  encounters the error on
line 606

Now, if you are the owner of you installation, then you can probably
just edit
the INSTALL file directly.

Otherwise, if you specify the full path of an executable in place of
the word
"INSTALL" on the command line, the Rcmd script will detect this and
call your
script instead of the normal INSTALL script (see Rcmd line 37).

e.g.  "R CMD  ..."

One can just copy the INSTALL script, changing line 606 to
CLINK_CPPFLAGS = ""
and hope for the best.  If the package you are compiling specifies its
own C
include files, then you will have to modify the variable accordingly,
or else
use the ~/.R/Makevars mechanism.

But, the question remains, is there an nicer solution?

Thanks,
- Stu

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Packfor library-problem downloading

2008-06-04 Thread tub78
Jubilo,

I believe we have the same problem.  For a hacky solution, please see
my post
http://groups.google.com/group/r-help-archive/browse_thread/thread/bbd4ef5857dc99ef

- Stu


On May 22, 11:05 am, Jubilo <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm a new user to R, and I was trying to install "packfor" in my R console
> and I always run into an error.
> I tried to search, in in the forum, someone that already might have made the
> same question, but all I could find was a general information how to install
> libraries in R.
>
> Pass through all that procedure (Package&Data->Package Installer->Local
> Source Package[because my library was in a folder in my computer]), I have a
> message that is "DONE", but then I do the command "library(packfor)" and I
> get an error message:
>
> --- 
> --WARNING:ignoringenvironment value ofR_HOME
> * Installing *binary* package 'packfor' ...
> * DONE (packfor)
>
> > library(packfor)
>
> packfor: R Package for Forward Selection (Canoco Manual p.49)
> version 0.0-8Error in dyn.load(file, DLLpath = DLLpath, ...) :
>   unable to load shared library
> '/Library/Frameworks/R.framework/Versions/2.7/Resources/library/packfor/lib 
> s/i386/packfor.so':
>
> dlopen(/Library/Frameworks/R.framework/Versions/2.7/Resources/library/packf 
> or/libs/i386/packfor.so,
> 6): Library not loaded: /usr/local/lib/libgfortran.2.dylib
>   Referenced from:
> /Library/Frameworks/R.framework/Versions/2.7/Resources/library/packfor/libs 
> /i386/packfor.so
>   Reason: image not found
> Error in library(packfor) : .First.lib failed for 'packfor'
> --- 
> ---
>
> I have a mac where I installed R2.7.0, and I want to use the
> "packfor_0.0-8_for_R2.7.tar.gz". I already uninstalled R twice and installed
> it again, I already used another packfor file, from another person... I ran
> out of ideas so I would like a little bit of help.
>
> My R also presents an other error when it starts:
> -
> During startup -Warningmessages:
> 1: Setting LC_CTYPE failed, using "C"
> 2: Setting LC_COLLATE failed, using "C"
> 3: Setting LC_TIME failed, using "C"
> 4: Setting LC_MESSAGES failed, using "C"WARNING: You're using a non-UTF8 
> locale, therefore only ASCII characters
> will work.
> Please read R for Mac OS X FAQ (see Help) section 9 and adjust your system
> preferences accordingly.
> --
> I don't know if this is important to solve the issue, but anyway I already
> done other analysis (which means that I used other libraries) and I didn't
> have any problem. Besides the section 9 from the Help talks about version
> previous the one that I have (1.0.1, 2.0 and 2.1).
>
> Thanks in advance for any idea that you might have ,
>
> Ju
> --
> View this message in 
> context:http://www.nabble.com/Packfor-library-problem-downloading-tp17406291p...
> Sent from the R help mailing list archive at Nabble.com.
>
>         [[alternative HTML version deleted]]
>
> __
> [EMAIL PROTECTED] mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] trouble installing Rmpi on 64-bit Ubuntu 8.04 with openmpi

2008-06-04 Thread tub78
The problem here is that the compiler cannot find the include files
for mpi.  Notice that the first checks that fail are:

> checking mpi.h usability... no
> checking mpi.h presence... no
> checking for mpi.h... no

One solution is to create a file named "~/.R/Makevars" with the
following line:

PKG_CPPFLAGS = -I/opt/openmpi/include

... where /opt/openmpi/include/ contains the necessary mpi.h include
file.

Then, try to recompile.

Hope this helps,
- Stu



On May 6, 12:52 pm, "Mark Kimpel" <[EMAIL PROTECTED]> wrote:
> Subject pretty much says it all. I am running 64-bit Ubuntu 8.04, i.e. Hardy
> Heron, have openmpi installed, and get the following error message with
> attempted install of Rmpi. sessionInfo() follows.
>
> Mark
>
> checking for ANSI C header files... yes
> checking for sys/types.h... yes
> checking for sys/stat.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for memory.h... yes
> checking for strings.h... yes
> checking for inttypes.h... yes
> checking for stdint.h... yes
> checking for unistd.h... yes
> checking mpi.h usability... no
> checking mpi.h presence... no
> checking for mpi.h... no
> Try to find libmpi.so or libmpich.a
> checking for main in -lmpi... yes
> checking for openpty in -lutil... yes
> checking for main in -lpthread... yes
> configure: creating ./config.status
> config.status: creating src/Makevars
> ** libs
> gcc -std=gnu99 -I/home/mkimpel/R_HOME/R-patched/R-build/lib64/R/include
> -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
> -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1
> -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
> -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1
> -DHAVE_UNISTD_H=1   -DUNKNOWN -fPIC -I/usr/local/include    -fpic  -g -O2 -c
> conversion.c -o conversion.o
> In file included from conversion.c:18:
> Rmpi.h:1:17: error: mpi.h: No such file or directory
> In file included from conversion.c:18:
> Rmpi.h:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before
> 'mpitype'
> make: *** [conversion.o] Error 1
> chmod: cannot access `/home/mkimpel/R_HOME/site-library-2.7.0/Rmpi/libs/*':
> No such file or directory
> ERROR: compilation failed for package 'Rmpi'
> ** Removing '/home/mkimpel/R_HOME/site-library-2.7.0/Rmpi'
>
> The downloaded packages are in
>     /tmp/RtmppcK0FI/downloaded_packages
> Warning message:
>
> > sessionInfo()
>
> R version 2.7.0 Patched (2008-05-04 r45620)
> x86_64-unknown-linux-gnu
>
> locale:
> LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF- 
> 8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_A 
> DDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] graph_1.18.0
>
> loaded via a namespace (and not attached):
> [1] cluster_1.11.10 tcltk_2.7.0     tools_2.7.0
>
> --
> Mark W. Kimpel MD ** Neuroinformatics ** Dept. of Psychiatry
> Indiana University School of Medicine
>
> 15032 Hunter Court, Westfield, IN 46074
>
> (317) 490-5129 Work, & Mobile & VoiceMail
> (317) 663-0513 Home (no voice mail please)
>
> **
>
>         [[alternative HTML version deleted]]
>
> __
> [EMAIL PROTECTED] mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] "ignoring environment value of R_HOME" error when installing packages

2008-06-04 Thread tub78
This bug has been resolved, after our administrator updated the path
of R_HOME
in our scripts.  I believe that the cause of trouble was the parallel
nature
of the installation, as mentioned in the following thread:

http://groups.google.com/group/r-help-archive/browse_thread/thread/632175125a7c4
16f/6a5220b73d3ac682?lnk=gst&q=R_HOME#

regards
- S.

On Jun 4, 12:35 am, tub78 <[EMAIL PROTECTED]> wrote:
> I am troubled by what appears to be a glitch in the current
> distribution, or in
> its installation on our system.  I've traced it, and found a work-
> around.  Is
> this normal?  Is there a cleaner solution?
>
> The problem:
>
> During a package installation, the warning message "WARNING: ignoring
> environment value of R_HOME" from line 31 of /bin/R is
> accidentally
> spliced into the CLINK_CPPFLAGS variable at line 606 of /bin/
> INSTALL.
> This prevents the compilation C files.  Please note that I have not
> set the R_HOME
> environment variable; it is undefined in my shell.
>
> - Here are lines 29-32 from /bin/R:
>
> if test -n "${R_HOME}" && \
>    test "${R_HOME}" != "${R_HOME_DIR}"; then
>   echo "WARNING: ignoring environment value of R_HOME"
> fi
>
> - Here is line 606 of /bin/INSTALL:
>
>     CLINK_CPPFLAGS=`echo
> "tools:::.find_cinclude_paths(file='DESCRIPTION')" | \
>       "${R_EXE}" --vanilla --slave`
>
> The work-around:
>
> First some background.  The command sequence "R CMD INSTALL" sets in
> motion a sequence of scripts that collectively manage the installation
> process.
>
>     "R"        /bin/R              calls Rcmd script on line
> 148
>     "CMD"      /lib/R/bin/Rcmd     calls INSTALL script on
> line 45
>     "INSTALL"  /lib/R/bin/INSTALL  encounters the error on
> line 606
>
> Now, if you are the owner of you installation, then you can probably
> just edit
> the INSTALL file directly.
>
> Otherwise, if you specify the full path of an executable in place of
> the word
> "INSTALL" on the command line, the Rcmd script will detect this and
> call your
> script instead of the normal INSTALL script (see Rcmd line 37).
>
>     e.g.  "R CMD  ..."
>
> One can just copy the INSTALL script, changing line 606 to
> CLINK_CPPFLAGS = ""
> and hope for the best.  If the package you are compiling specifies its
> own C
> include files, then you will have to modify the variable accordingly,
> or else
> use the ~/.R/Makevars mechanism.
>
> But, the question remains, is there an nicer solution?
>
> Thanks,
> - Stu
>
> __
> [EMAIL PROTECTED] mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.