Compiling under MacOS X

Help
2010-05-14
2012-09-01
  • Russell Almond
    Russell Almond
    2010-05-14

    I'm trying to compile jags under Mac OS X 10.6 (Snow Leopard) and it seems to
    be stalling when I get to the configure step. The output ends with:

    checking how to get verbose linking output from gfortran... -v

    checking for Fortran 77 libraries of gfortran... -L/usr/local/lib/gcc/i686
    -apple-darwin8/4.2.3 -L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3/../../..
    -lgfortranbegin -lgfortran

    checking for dummy main to link with Fortran 77 libraries... none

    checking for Fortran 77 name-mangling scheme... unknown

    configure: WARNING: unknown Fortran name-mangling scheme

    checking how to get verbose linking output from gfortran... (cached) -v

    checking for Fortran 77 libraries of gfortran... (cached)
    -L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3 -L/usr/local/lib/gcc/i686-apple-
    darwin8/4.2.3/../../.. -lgfortranbegin -lgfortran

    checking for unknown... no

    checking for ATL_xerbla in -latlas... no

    checking for unknown in -lblas... no

    checking for unknown in -lmkl... no

    checking for unknown... (cached) no

    checking for unknown in -lcxml... no

    checking for unknown in -ldxml... no

    checking for unknown in -lscs... no

    checking for unknown in -lcomplib.sgimath... no

    checking for unknown in -lblas... (cached) no

    checking for unknown in -lblas... (cached) no

    configure: error: "You need to install the LAPACK library"

    Is there a switch I'm missing that allows me to use preinstalled and optimized
    lapack, or do I need to install it? (I seems to have an ancient and clunky
    installation)?

    Thanks in advance,

    --Russell Almond

     
  • Russell Almond
    Russell Almond
    2010-05-15

    I discovered that I could add atlas through Macports. If I then do

    configure --prefix=$HOME LDFLAGS="-L/opt/local/lib -llapack -lf77blas
    -lcblas -latlas" CFLAGS=-I/opt/local/include

    I can now change the answer for the atlas question in the above script from
    yes to know, but otherwise it is still not finding lapack or blas. I'm running
    out of things to try so any suggestions would be welcome.

     
  • Martyn Plummer
    Martyn Plummer
    2010-05-16

    The JAGS installation manual, which can be downloaded from the files section
    on Sourceforge, contains detailed instructions on building JAGS on Mac OS X by
    Bill Northcott.

    Even if you still have trouble after following these instructions, you should
    be OK in a couple of days when Bill's Mac OS X binaries for JAGS 2.1.0 become
    available.

     
  • Russell Almond
    Russell Almond
    2010-05-17

    Thanks. Adding the options CFLAGS='-arch x86_64' as described in the manual
    allowed me to build the regular version.

    For some reason, it does not work if I try CFLAGS='-arch i386 -arch x86_64' to
    build a universal binary. I get an error

    Making all in libltdl

    make all-am

    /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I..
    -DLT_CONFIG_H='' -DLTDL -I. -I. -Ilibltdl -I./libltdl -I./libltdl
    -arch i386 -arch x86_64 -MT dlopen.lo -MD -MP -MF .deps/dlopen.Tpo -c -o
    dlopen.lo test -f 'loaders/dlopen.c' || echo './'loaders/dlopen.c

    libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. "-DLT_CONFIG_H="
    -DLTDL -I. -I. -Ilibltdl -I./libltdl -I./libltdl -arch i386 -arch x86_64 -MT
    dlopen.lo -MD -MP -MF .deps/dlopen.Tpo -c loaders/dlopen.c -fno-common -DPIC
    -o .libs/dlopen.o

    gcc-4.2: -E, -S, -save-temps and -M options are not allowed with multiple
    -arch flags

    make: *** Error 1

    make: *** Error 2

    make: *** Error 1

    make: *** Error 2

    However, I can successfully build the 64 bit version, so I can move forward.
    (I was trying to build the universal because I was wondering if it was related
    to issues I seemed to be having running rjags in R64.)

    Thanks again for the pointer (and sorry I missed it earlier).