Re: [R] colorspace package does not compile on ubuntu 7.04 32 bit

From: Mikhail Spivakov <ensdev.box_at_gmail.com>
Date: Fri, 23 May 2008 03:34:27 -0700 (PDT)

Hi again,

I have managed to solve this problem myself - indeed, the trouble was with the package being incompatible with gcc v4.

Here what I've done - perhaps it's going to be useful for someone else:

  1. installed gcc v3.4: sudo apt-get install gcc-3.4
  2. opened .../R/etc/Makeconf (changing its access rights so it's no longer read-only first)
  3. changed all instances of gcc to gcc-3.4

I realise that this was perhaps quite a drastic measure and I could have created a Makefile for the colorspace package specifically instead. But the v4/v3 incompatibility is such a common problem that I decided to change this once and for all - until new packages utilising some v4 - specific C code appear out there..

Cheers
Mikhail

Mikhail Spivakov wrote:
>
> Hi everyone,
> I am trying to install colorspace (needed as part of my favourite ggplot2)
> on R v 2.7.0 running under ubuntu 7.04. The package is provided as source
> files and the compilation fails as below.
> I suspect this might be a problem with gcc v3/v4 incompatibility (or
> anything else), but I don't really know how to resolve it. Any advice will
> be appreciated - or perhaps somebody has got this package compiled and
> could share the binaries?
> Many thanks!
> Mikhail
>
> ----
> Mikhail Spivakov, PhD
> European Bioinformatics Institute
> European Molecular Biology Laboratory
> Germany/UK
>
> * Installing *source* package 'colorspace' ...
> ** libs
> gcc -std=gnu99 -I/usr/share/R/include -fpic -g -O2 -c colorspace.c
> -o colorspace.o
> In file included from colorspace.c:1:
> /usr/share/R/include/R.h:28:20: error: stdlib.h: No such file or directory
> /usr/share/R/include/R.h:29:19: error: stdio.h: No such file or directory
> In file included from
> /usr/lib/gcc/i486-linux-gnu/4.1.2/include/syslimits.h:7,
> from
> /usr/lib/gcc/i486-linux-gnu/4.1.2/include/limits.h:11,
> from /usr/share/R/include/R.h:30,
> from colorspace.c:1:
> /usr/lib/gcc/i486-linux-gnu/4.1.2/include/limits.h:122:61: error:
> limits.h: No such file or directory
> In file included from colorspace.c:1:
> /usr/share/R/include/R.h:32:18: error: math.h: No such file or directory
> /usr/share/R/include/R.h:33:19: error: errno.h: No such file or directory
> In file included from /usr/share/R/include/R.h:50,
> from colorspace.c:1:
> /usr/share/R/include/R_ext/RS.h:24:39: error: string.h: No such file or
> directory
> In file included from colorspace.c:2:
> /usr/share/R/include/Rinternals.h:770: error: expected declaration
> specifiers or ‘...’ before ‘FILE’
> /usr/share/R/include/Rinternals.h:773: error: expected declaration
> specifiers or ‘...’ before ‘FILE’
> colorspace.c: In function ‘gtrans’:
> colorspace.c:28: warning: implicit declaration of function ‘pow’
> colorspace.c:28: warning: incompatible implicit declaration of built-in
> function ‘pow’
> colorspace.c: In function ‘ftrans’:
> colorspace.c:36: warning: incompatible implicit declaration of built-in
> function ‘pow’
> colorspace.c: In function ‘g’:
> colorspace.c:92: warning: incompatible implicit declaration of built-in
> function ‘pow’
> colorspace.c: In function ‘LAB_to_XYZ’:
> colorspace.c:106: warning: incompatible implicit declaration of built-in
> function ‘pow’
> colorspace.c:114: warning: incompatible implicit declaration of built-in
> function ‘pow’
> colorspace.c:117: warning: incompatible implicit declaration of built-in
> function ‘pow’
> colorspace.c:123: warning: incompatible implicit declaration of built-in
> function ‘pow’
> colorspace.c: In function ‘f’:
> colorspace.c:132: warning: incompatible implicit declaration of built-in
> function ‘pow’
> colorspace.c: In function ‘XYZ_to_LAB’:
> colorspace.c:144: warning: incompatible implicit declaration of built-in
> function ‘pow’
> colorspace.c: In function ‘XYZ_to_HLAB’:
> colorspace.c:170: warning: implicit declaration of function ‘sqrt’
> colorspace.c:170: warning: incompatible implicit declaration of built-in
> function ‘sqrt’
> colorspace.c: In function ‘LAB_to_polarLAB’:
> colorspace.c:203: warning: implicit declaration of function ‘atan2’
> colorspace.c:203: warning: incompatible implicit declaration of built-in
> function ‘atan2’
> colorspace.c:207: warning: incompatible implicit declaration of built-in
> function ‘sqrt’
> colorspace.c: In function ‘polarLAB_to_LAB’:
> colorspace.c:216: warning: implicit declaration of function ‘cos’
> colorspace.c:216: warning: incompatible implicit declaration of built-in
> function ‘cos’
> colorspace.c:217: warning: implicit declaration of function ‘sin’
> colorspace.c:217: warning: incompatible implicit declaration of built-in
> function ‘sin’
> colorspace.c: In function ‘HSV_to_RGB’:
> colorspace.c:272: warning: implicit declaration of function ‘floor’
> colorspace.c:272: warning: incompatible implicit declaration of built-in
> function ‘floor’
> colorspace.c: In function ‘XYZ_to_LUV’:
> colorspace.c:311: warning: incompatible implicit declaration of built-in
> function ‘pow’
> colorspace.c: In function ‘LUV_to_XYZ’:
> colorspace.c:325: warning: incompatible implicit declaration of built-in
> function ‘pow’
> colorspace.c: In function ‘LUV_to_polarLUV’:
> colorspace.c:342: warning: incompatible implicit declaration of built-in
> function ‘sqrt’
> colorspace.c:343: warning: incompatible implicit declaration of built-in
> function ‘atan2’
> colorspace.c: In function ‘polarLUV_to_LUV’:
> colorspace.c:354: warning: incompatible implicit declaration of built-in
> function ‘cos’
> colorspace.c:355: warning: incompatible implicit declaration of built-in
> function ‘sin’
> colorspace.c: In function ‘CheckSpace’:
> colorspace.c:373: warning: implicit declaration of function ‘strcmp’
> colorspace.c: In function ‘CheckHex’:
> colorspace.c:407: warning: implicit declaration of function ‘strlen’
> colorspace.c:407: warning: incompatible implicit declaration of built-in
> function ‘strlen’
> colorspace.c:411: warning: implicit declaration of function ‘isxdigit’
> colorspace.c: In function ‘hex_to_RGB’:
> colorspace.c:1115: warning: passing argument 1 of ‘decodeHexStr’ discards
> qualifiers from pointer target type
> make: *** [colorspace.o] Error 1
> ERROR: compilation failed for package 'colorspace'
> ** Removing '/home/mspivako/R/i486-pc-linux-gnu-library/2.7/colorspace'
>
> The downloaded packages are in
> /tmp/RtmpSxK3ea/downloaded_packages
> Warning message:
> In install.packages("colorspace") :
> installation of package 'colorspace' had non-zero exit status
>
>

-- 
View this message in context: http://www.nabble.com/colorspace-package-does-not-compile-on-ubuntu-7.04-32-bit-tp17359342p17423043.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help_at_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.
Received on Fri 23 May 2008 - 10:38:19 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 23 May 2008 - 11:30:40 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive