Skip to content

Trying to install rjags on Mac OS X 10.5

6 messages · Lindsay Stirton, Brian Ripley, Vincent Nijs +1 more

#
Greetings,

I wonder if anyone can offer any help or advice--even direction to an
appropriate source of advice. I am trying to install rjags 1.0.1 on Mac OS X
10.5 (see http://www-fis.iarc.fr/~martyn/software/jags/). I have R.app 2.6.1
installed.

JAGS 1.0.1 is apparently successfully installed. I (think I) know this because
when I type 'jags' into Terminal, I get the following:

Macintosh:Desktop ljs$ jags
Welcome to JAGS 1.0.1 on Thu Dec 27 20:56:09 2007
JAGS is free software and comes with ABSOLUTELY NO WARRANTY
Loading module: basemod
Loading module: bugs
.

However, when I try to install rjags, I get the following problem.

Macintosh:Desktop ljs$ sudo R CMD INSTALL rjags_1.0.1-1.tar.gz
Password:
* Installing to library '/Library/Frameworks/R.framework/Resources/library'
* Installing *source* package 'rjags' ...
checking for pkg-config... /opt/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for JAGS... configure: error: Package requirements (jags = 1.0.1) were
not met:

No package 'jags' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

ERROR: configuration failed for package 'rjags'
** Removing '/Library/Frameworks/R.framework/Resources/library/rjags'

I am really not sure what the problem is. I have (I think) set the proper
environment variables correctly. See below:

Macintosh:Desktop ljs$ which jags
/usr/local/bin/jags
Macintosh:Desktop ljs$ echo $PKG_CONFIG_PATH
/usr/local/bin

I should say that I had many other problems
along the way--gfortran not originally installed properly, R CMD INSTALL
couldn't find pkg-config. However, the above description shows the problems
remaining even after I have done a little homework.

Best wishes,

Lindsay Stirton
#
is unlikely to be correct.  A typical Linux setting is

PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig

and on my Mac the pkg-config files are in /usr/local/lib/pkgconfig and 
/usr/lib/pkgconfig.  Most likely it would work if PKG_CONFIG_PATH is not 
set, so try that first.
On Sun, 30 Dec 2007, Lindsay Stirton wrote:

            

  
    
#
Quoting Prof Brian Ripley <ripley at stats.ox.ac.uk>:
Thanks--but this still doesn't seem to get me anywhere (see below).

Macintosh:Desktop ljs$ which jags
/usr/local/bin/jags
Macintosh:Desktop ljs$ whereis jags
Macintosh:Desktop ljs$


Last login: Sun Dec 30 17:40:41 on ttys001
Macintosh:~ ljs$ echo $PKG_CONFIG_PATH

Macintosh:~ ljs$ cd Desktop/
Macintosh:Desktop ljs$ sudo R CMD INSTALL rjags_1.0.1-1.tar.gz
* Installing to library '/Library/Frameworks/R.framework/Resources/library'
* Installing *source* package 'rjags' ...
checking for pkg-config... /opt/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for JAGS... configure: error: Package requirements (jags = 
1.0.1) were
not met:

No package 'jags' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

ERROR: configuration failed for package 'rjags'
** Removing '/Library/Frameworks/R.framework/Resources/library/rjags'
Macintosh:Desktop ljs$

Would I be right in thinking that the problem is not in fiding the path to
pkg-config but in finding JAGS? I have

Macintosh:Desktop ljs$ which jags
/usr/local/bin/jags


Best wishes,

Lindsay Stirton
#
I had the same issue on my Mac. After install pkg-config from MacPorts
Martyn suggested to add the following 2 lines to my .bashrc file:

export LD_LIBRARY_PATH="/usr/local/lib"
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"

Everything worked after that.

Best,

Vincent


On Dec 30, 11:56 am, Lindsay Stirton
<Lindsay.Stir... at manchester.ac.uk> wrote:
#
Hi Lindsay,

Did have some difficulties as well, but got it to work using Xcode3.0,  
Apple's gcc4.2preview release and gfortran 4.2.1 from Simon's web  
site. This was on R-devel though, on a Mac Intel.

Can it find the jags executable say from your home directory? Have you  
tried 'make check' in the classic-bugs/vol1 or vol2 example dirs (in  
the Terminal)? That would indeed confirm jags is running fine.

For rjags, I am a bit worried about the /opt/... . Did you at some  
point install software from Fink or Darwin ports? Until I installed  
the above newer toolset, I had never been able to get rjags to work.

Of course you don't really need rjags, only coda. I have also  
installed the package 'arm' and the packages arm depends on (Matrix,  
lattice, lme4, R2WinBugs). If it would help I can send you a  
'template' dir for the line example that does not use rjags.

A dependency I ran into was coda v 13.1, as of a couple of days ago  
not available as a binary package,
but available as a source package on CRAN.

Rob
On Dec 30, 2007, at 8:27 AM, Lindsay Stirton wrote:

            
#
Thanks Rob,

Since I already had Xcode 3.0, I re-installed gfortran (from the R 
website, not
from the .dmg) and gcc4.2.1 preview. I am afraid the outcome was the 
same, i.e.
jags 1.0.1 not found.

Yes I do use Macports (and formery used Fink, which is still installed). What
issues does this raise? On your suggestion, I made sure that both were up to
date--still no success.

Your offer to send me a template directory to figure things out from is very
much appreciated. Yes please!

Lindsay


Quoting Rob Goedman <goedman at mac.com>: