[R] Package Installation produces "linux/limits.h: No such file or directory" error when installing the lpSolve package

Joe_K joe_kirchner at yahoo.com
Mon Jan 28 04:48:18 CET 2008


Dear Friends,

I am trying to install a few packages in R and am receiving error messages. 
Since the error messages are different, I am posting them separately.  The
second error is with the installation of lpSolve.

The core error message is:
========================================================================
In file included from /usr/include/bits/posix1_lim.h:153,
                 from /usr/include/limits.h:145,
                 from
/usr/lib64/gcc/x86_64-suse-linux/4.2.1/include/limits.h:122,
                 from
/usr/lib64/gcc/x86_64-suse-linux/4.2.1/include/syslimits.h:7,
                 from
/usr/lib64/gcc/x86_64-suse-linux/4.2.1/include/limits.h:11,
                 from colamd.c:677:
/usr/include/bits/local_lim.h:36:26
 error: linux/limits.h: No such file or directory
make: *** [colamd.o] Error 1
ERROR: compilation failed for package 'lpSolve'
========================================================================

The first things that I tried was to figure out where linux/limits.h was.  I
discovered that there are seven versions of limits.h on the system and they
are not identical.

/usr/include/limits.h
/usr/src/linux-2.6.22.13-0.3/Documentation/i2c/chips/limits.h
/usr/include/c++/4.2.1/tr1/limits.h
/usr/lib64/qt4/demos/qtdemo/xml/limits.h
/usr/src/linux-2.6.22.13-0.3/include/linux/limits.h
/usr/src/linux-2.6.22.13-0.3/include/asm-arm/limits.h
/usr/src/linux-2.6.22.13-0.3/include/asm-arm26/limits.h

Only one has "linux" immediately preceding it in the path:
/usr/src/linux-2.6.22.13-0.3/include/linux/limits.h

I assume that /usr/include/bits/local_lim.h is trying to use a relative
path.  The only line in local_lim.h with limits.h in it is:

#include <linux/limits.h>

So, I tried modifying the line to read:

#include </usr/src/linux-2.6.22.13-0.3/include/linux/limits.h>

That did not work, so I changed it back again.  I guess my theory about it
looking for a relative path was wrong.

Since then, I have been Googling the issue all weekend and have found
similar errors, but not exactly the same.  Some are suggesting changing
kernel headers and other files.  Since the context of these other posts are
dissimilar, I figured it best not to mess with kernel headers or some of the
other radical solutions offered.

There was one suggestion in a post to install glibc-headers, however, I
cannot seem to find that for Suse 10.3.  Is it something included in another
package?  Is it something that is now obsolete?

CAN ANYONE HELP ME DEBUG THIS?

I am running R version 2.6.1 (2007-11-26) on Suse Linux 10.3 64-bit x86_64
on a Boxx Technologies computer with a TYAN Thunder K8WE S2895 Motherboard
with 4Gb Ram and 2 dual CPUs (total of 4 CPUs).  The CPUs are AMD Opteron. 
Hard Disk Usage is 4 150 Gb SATA drives array with a Com3 9550SX Controller
set at RAID 5.

The full error message received from Rkward upon the package installation
attempt was:
========================================================================
R version 2.6.1 (2007-11-26)
Copyright (C) 2007 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
>
options (repos=c (CRAN="http://lib.stat.cmu.edu/R/CRAN"))
> install.packages (pkgs=c ("lpSolve"),
> lib="/home/joe/R/x86_64-unknown-linux-gnu-library/2.6",
> destdir="/home/joe/.rkward/package_archive", dependencies=TRUE)
trying URL 'http://lib.stat.cmu.edu/R/CRAN/src/contrib/lpSolve_5.5.8.tar.gz'
Content type 'application/x-gzip' length 449804 bytes (439 Kb)
opened URL

downloaded 439 Kb
/home/joe/R/x86_64-unknown-linux-gnu-library/2.6
* Installing *source* package 'lpSolve' ...
** libs
gcc -std=gnu99 -I/usr/lib64/R/include -I/usr/lib64/R/include -I .
-DINTEGERTIME -DPARSER_LP -DBUILDING_FOR_R -DYY_NEVER_INTERACTIVE -DUSRDLL
-DCLOCKTIME -DRoleIsExternalInvEngine -DINVERSE_ACTIVE=INVERSE_LUSOL
-DINLINE=static -DParanoia -I/usr/local/include    -fpic  -g -O2 -c colamd.c
-o colamd.o
In file included from /usr/include/bits/posix1_lim.h:153,
                 from /usr/include/limits.h:145,
                 from
/usr/lib64/gcc/x86_64-suse-linux/4.2.1/include/limits.h:122,
                 from
/usr/lib64/gcc/x86_64-suse-linux/4.2.1/include/syslimits.h:7,
                 from
/usr/lib64/gcc/x86_64-suse-linux/4.2.1/include/limits.h:11,
                 from colamd.c:677:
/usr/include/bits/local_lim.h:36:26
 error: linux/limits.h: No such file or directory
make: *** [colamd.o] Error 1
ERROR: compilation failed for package 'lpSolve'
** Removing '/home/joe/R/x86_64-unknown-linux-gnu-library/2.6/lpSolve'
Warning message:
In install.packages(pkgs = c("lpSolve"), lib =
"/home/joe/R/x86_64-unknown-linux-gnu-library/2.6",  :
  installation of package 'lpSolve' had non-zero exit status
> q ()
========================================================================

-- 
View this message in context: http://www.nabble.com/Package-Installation-produces-%22linux-limits.h%3A-No-such-file-or-directory%22-error-when-installing-the-lpSolve-package-tp15127817p15127817.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list