[R-SIG-Mac] Tcl/Tk Package issue on Leopard

Matthew Keller mckellercran at gmail.com
Tue Feb 26 19:59:27 CET 2008


Actually, X11 was being called to pop up a window to ask which
repository (mirror) we wanted to use. Had we just used the following
syntax to install snow, it would have worked:

install.packages("snow",type='source',repos='http://cran.stat.ucla.edu/',dependencies=TRUE)


On Tue, Feb 26, 2008 at 11:54 AM, Matthew Keller <mckellercran at gmail.com> wrote:
> Hi all,
>
>  We were having a similar problem with tcltk in trying to install the
>  snow package in 64bit R (details below).
>
>  We fixed the problem by creating a link from /usr/X11R6 to
>  /usr/local/X11R7 (ln -s /usr/X11R6 /usr/local/X11R7).  That was enough
>  to enable the libtk8.4 to load, but we're still not sure if it has
>  created a fully functional snow.
>
>
>  Jeff & Matt
>
>
>  > install.packages("snow",type='source')
>  --- Please select a CRAN mirror for use in this session ---
>  Loading Tcl/Tk interface ... Error in dyn.load(file, ...) :
>   unable to load shared library
>  '/Library/Frameworks/R.framework/Resources/library/tcltk/libs/x86_64/tcltk.so':
>   dlopen(/Library/Frameworks/R.framework/Resources/library/tcltk/libs/x86_64/tcltk.so,
>  10): Library not loaded: /usr/local/X11R7/lib/libX11.6.dylib
>
>   Referenced from: /usr/local/lib/libtk8.4.dylib
>   Reason: no suitable image found.  Did find:
>         /usr/local/X11R7/lib/libX11.6.dylib: mach-o, but wrong architecture
>  Error: .onLoad failed in 'loadNamespace' for 'tcltk'
>
>  sessionInfo()
>  R version 2.6.2 alpha (2008-01-29 r44238)
>  i386-apple-darwin9.1.0
>
>  locale:
>  C
>
>  attached base packages:
>  [1] stats     graphics  grDevices utils     datasets  methods   base
>
>
>
>  On Tue, Feb 26, 2008 at 8:03 AM, Simon Urbanek
>  <simon.urbanek at r-project.org> wrote:
>  > Bill,
>  >
>  >  when you check, you'll find that the Tcl/Tk package pre-dates Leopard
>  >  quite substantially. The 64-bit part is supplied only as an
>  >  experimental "goodie" for those wishing to use local Xorg client on
>  >  either Tiger or Leopard. You're more than welcome to compile your
>  >  version of Tcl/Tk that uses Leopard's own X11
>  >  (further comments inline)
>  >
>  >  Cheers,
>  >  Simon
>  >
>  >
>  >
>  >  On Feb 25, 2008, at 10:30 PM, Bill Northcott wrote:
>  >
>  >  > It seems the Tcl/Tk package included in the current 2.6.2 universal
>  >  > package has an issue on 64 bit capable hardware.
>  >  >
>  >  > The included 64 bit architectures in the Tk binaries are linked
>  >  > against the Xorg version of X11 installed in /use/local.  While this
>  >  > is necessary for Tiger, it seems unnecessary for Leopard which has 4
>  >  > way fat X11 libraries.
>  >  >
>  >  > To make matters worse,
>  >
>  >  Ok, next time I'll just refrain from trying to be helpful and remove
>  >  64-bit experimental binaries to not make things "worse".
>  >
>  >
>  >
>  >
>  >  > this does not seem to be mentioned on the R for
>  >  > MacOS X developers web page or in the read me for the main R installer
>  >  > metapackage.  The only place I can find the need for the Xorg
>  >  > installation mentioned is in the readme for the tcl/tk package which
>  >  > most people won't get to read.
>  >  >
>  >  > Any attempt to run fat executables which use /usr/local/lib/
>  >  > tk8.4.dylib on a 64 bit capable Mac fail with a baffling error if Xorg
>  >  > X11 is not installed.
>  >  >
>  >  > [pmg5bn:~] billn% /usr/local/bin/wish8.4
>  >  > dyld: Library not loaded: /usr/local/X11R7/lib/libX11.6.dylib
>  >  >   Referenced from: /usr/local/lib/libtk8.4.dylib
>  >  >   Reason: image not found
>  >  > Trace/BPT trap
>  >  >
>  >  > this baffled me because
>  >  > [pmg5bn:~] billn% otool -L /usr/local/lib/libtk8.4.dylib
>  >  > /usr/local/lib/libtk8.4.dylib:
>  >  >       /usr/local/lib/libtk8.4.dylib (compatibility version 8.4.0, current
>  >  > version 8.4.14)
>  >  >       /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
>  >  > version 88.3.3)
>  >  >       /usr/X11R6/lib/libX11.6.dylib (compatibility version 6.2.0, current
>  >  > version 6.2.0)
>  >  >       /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
>  >  > version 1.0.0)
>  >  >
>  >  >  does not appear to be linked against anything in /usr/local/X11R7
>  >  >
>  >
>  >  Try "man otool" ... (hint: look for the -arch flag).
>  >
>  >
>  >
>  >  > Would it be possible to do different builds for Tiger and Leopard?
>  >  > For Tiger, the need for Xorg X11 needs to be documented, while for
>  >  > Leopard, it would be better not used.
>  >  >
>  >
>  >  Possible, yes. But apparently it seems safer to just remove 64-bit
>  >  from all R binaries to avoid problems.
>  >
>  >
>  >
>  >  _______________________________________________
>  >  R-SIG-Mac mailing list
>  >  R-SIG-Mac at stat.math.ethz.ch
>  >  https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>  >
>
>
>
>  --
>  Matthew C Keller
>  Asst. Professor of Psychology
>  University of Colorado at Boulder
>  www.matthewckeller.com
>



-- 
Matthew C Keller
Asst. Professor of Psychology
University of Colorado at Boulder
www.matthewckeller.com



More information about the R-SIG-Mac mailing list