[R-SIG-Mac] Unable to find pkg-config during install
Simon Urbanek
simon.urbanek at r-project.org
Thu Jul 2 19:20:00 CEST 2009
On Jul 2, 2009, at 13:04 , David Winsemius wrote:
>
> On Jul 2, 2009, at 12:42 PM, Simon Urbanek wrote:
>
>> On Jul 2, 2009, at 10:41 , David Winsemius wrote:
>>
>>> I am getting a error message during an effort to use the Package
>>> Installer with a source copy of cairoDevice:
>>>
>>> * Installing *source* package 'cairoDevice' ...
>>> checking for pkg-config... no
>>> ERROR: Cannot find pkg-config.
>>> ERROR: configuration failed for package 'cairoDevice'
>>> --------
>>> I seem to have pkg-config per locate from the Terminal:
>>>
>>> david-winsemiuss-mac-pro:~ davidwinsemius$ locate pkg-config
>>> /Library/Frameworks/GTK+.framework/Versions/2.14.X11/Resources/bin/
>>> pkg-config
>>> /sw/bin/pkg-config
>>> /sw/share/man/man1/pkg-config.1
>>> /usr/X11/share/man/man1/pkg-config.1.gz
>>> /usr/share/zsh/4.3.4/functions/_pkg-config
>>> ------
>>> The UNIX Appendix of the Installation Manual (p 29) says: "Mac OS
>>> X comes with none of these libraries, but cairo support has been
>>> added to the binary distribution: pkg-config is still needed and
>>> can be compiled from the sources. "
>>>
>>> But that is not particularly helpful to me. Is there some
>>> environment variable or path has not been defined properly?
>>
>> Yes, try
>>
>> Sys.setenv(PATH=paste("/Library/Frameworks/GTK+.framework/Resources/
>> bin",Sys.getenv("PATH"),sep=":"))
>>
> Thanks. Unfortunately, I now get a huge number of error messages:
> starting with:
>
> trying URL 'http://lib.stat.cmu.edu/R/CRAN/src/contrib/cairoDevice_2.10.tar.gz'
> Content type 'application/x-gzip' length 39058 bytes (38 Kb)
> opened URL
> ==================================================
> downloaded 38 Kb
>
> * Installing *source* package 'cairoDevice' ...
> checking for pkg-config... pkg-config
> configure: creating ./config.status
> config.status: creating src/Makevars
> ** libs
> ** arch - x86_64
> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/
> Resources/include -I/Library/Frameworks/R.framework/Resources/
> include/x86_64 -I/Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/gtk-2.0 -I/Library/Frameworks/GTK
> +.framework/Versions/2.14.X11/Resources/lib/gtk-2.0/include -I/
> Library/Frameworks/GTK+.framework/Versions/2.14.X11/Resources/
> include/atk-1.0 -I/Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/cairo -I/Library/Frameworks/GTK
> +.framework/Versions/2.14.X11/Resources/include/pango-1.0 -I/Library/
> Frameworks/GTK+.framework/Versions/2.14.X11/Resources/include/
> glib-2.0 -I/Library/Frameworks/GTK+.framework/Versions/2.14.X11/
> Resources/lib/glib-2.0/include -I/Library/Frameworks/GTK+.framework/
> Versions/2.14.X11/Resources/include/pixman-1 -I/Library/Frameworks/
> GTK+.framework/Versions/2.14.X11/Resources/include/freetype2 -I/
> Library/Frameworks/GTK+.framework/Versions/2.14.X11/Resources/
> include -I/Library/Frameworks/GTK+.framework/Versions/2.14.X11/
> Resources/include/libpng12 -g -I/usr/local/include -fPIC -g -
> O2 -c cairoDevice.c -o cairoDevice.o
> In file included from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/glib-2.0/glib/gtypes.h:34,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/glib-2.0/glib/galloca.h:34,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/glib-2.0/glib.h:32,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/glib-2.0/gobject/gtype.h:26,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/glib-2.0/gobject/gboxed.h:26,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/glib-2.0/glib-object.h:25,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/glib-2.0/gio/gioenums.h:30,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/glib-2.0/gio/giotypes.h:30,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/glib-2.0/gio/gio.h:28,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/gtk-2.0/gdk/gdk.h:32,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/gtk-2.0/gtk/gtk.h:32,
> from cairoDevice.h:1,
> from cairoDevice.c:1:
> /Library/Frameworks/GTK+.framework/Versions/2.14.X11/Resources/lib/
> glib-2.0/include/glibconfig.h:443:2: error: #error "Unsupported
> architecture"
> In file included from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/glib-2.0/glib/galloca.h:34,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/glib-2.0/glib.h:32,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/glib-2.0/gobject/gtype.h:26,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/glib-2.0/gobject/gboxed.h:26,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/glib-2.0/glib-object.h:25,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/glib-2.0/gio/gioenums.h:30,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/glib-2.0/gio/giotypes.h:30,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/glib-2.0/gio/gio.h:28,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/gtk-2.0/gdk/gdk.h:32,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/gtk-2.0/gtk/gtk.h:32,
> from cairoDevice.h:1,
> from cairoDevice.c:1:
> /Library/Frameworks/GTK+.framework/Versions/2.14.X11/Resources/
> include/glib-2.0/glib/gtypes.h:45: error: expected ‘=’, ‘,’, ‘;’,
> ‘asm’ or ‘__attribute__’ before ‘typedef’
> /Library/Frameworks/GTK+.framework/Versions/2.14.X11/Resources/
> include/glib-2.0/glib/gtypes.h:94: error: expected ‘=’, ‘,’, ‘;’,
> ‘asm’ or ‘__attribute__’ before ‘*’ token
> In file included from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/glib-2.0/glib/galloca.h:34,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/glib-2.0/glib.h:32,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/glib-2.0/gobject/gtype.h:26,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/glib-2.0/gobject/gboxed.h:26,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/glib-2.0/glib-object.h:25,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/glib-2.0/gio/gioenums.h:30,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/glib-2.0/gio/giotypes.h:30,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/glib-2.0/gio/gio.h:28,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/gtk-2.0/gdk/gdk.h:32,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/gtk-2.0/gtk/gtk.h:32,
> from cairoDevice.h:1,
> from cairoDevice.c:1:
> /Library/Frameworks/GTK+.framework/Versions/2.14.X11/Resources/
> include/glib-2.0/glib/gtypes.h:396:2: error: #error unknown ENDIAN
> type
> In file included from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/glib-2.0/glib.h:33,
> from /Library/Frameworks/GTK+.framework/Versions/
> 2.14.X11/Resources/include/glib-2.0/gobject/gtype.h:26,
> ------snipped further errors----------
>
>> (BTW: I'm not quite sure why you would try to compile it from
>> sources - it's available in binary from from CRAN).
>
> It is and I have cairoDevice 2.9-2 installed, but I got this message
> when I tried to load playwith 0.9-43 when using the 64 bit GUI:
>
> Loading required package: lattice
> Loading required package: cairoDevice
> Error: package 'cairoDevice' is not installed for 'arch=x86_64'
> In addition: Warning message:
> In install.packages(c("cairoDevice"), lib = "/Library/Frameworks/
> R.framework/Resources/library/", :
> installation of package 'cairoDevice' had non-zero exit status
>
> So I thought I would try to install from source.
Ah, that explains! Well, the reason why there are no 64-binaries is
the above (the GTK+ binary you have doesn't support 64-bit) --
essentially you have to build the whole GTK+ and all dependencies from
sources for x86_64 in order to use cairoDevice in 64-bit ...
> Wasn't there a time in the not too distant past when Mac binary
> packages in CRAN did not support the 64-bit architecture ?
They do (in the Leopard build), but only where the dependencies are
met. In this case we have to working GTK+ for 64-bit, so they are not
built.
Cheers,
Simon
>>
>>> I tried downloading pkgconfig-0.18 but its README file is not
>>> sufficiently detailed for my level of understanding of the UNIX
>>> underbelly of Mac OS X.
>>>
>>> > sessionInfo()
>>> R version 2.8.1 Patched (2009-01-19 r47650)
>>> i386-apple-darwin9.6.0
>>>
>>> locale:
>>> en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
>>>
>>> attached base packages:
>>> [1] splines stats graphics grDevices utils datasets
>>> methods base
>>>
>>> other attached packages:
>>> [1] Design_2.2-0 survival_2.35-4 Hmisc_3.6-0
>>>
>>> loaded via a namespace (and not attached):
>>> [1] cluster_1.12.0 grid_2.8.1 lattice_0.17-25 tools_2.8.1
>>> Warning message:
>>> In install.packages(c("cairoDevice"), lib = "/Library/Frameworks/
>>> R.framework/Resources/library/", :
>>> installation of package 'cairoDevice' had non-zero exit status
>>> >
>>>
>>>
>>
>
> David Winsemius, MD
> Heritage Laboratories
> West Hartford, CT
>
>
More information about the R-SIG-Mac
mailing list