Broken tkrplot on Mac OS X
Because of the way Tcl works the C code needs to be linked into a
dylib rather than the other thing. I keep meaning to either put in a
README.MacOSX or figure out a way to get configure to deal with this
but never get around to it. Here is the strategy that works for me
(from notes and memory--I may have got a detail wrong):
Download, untar, and run R CMD INSTALL
cd to the src directory and repeat the final link command with
-bundle replaced by -dynamiclib
Then move the new trkplot.so by hand to the lib directory of the
installed package
If you are offended by a .so extension on a dylib you can change the
extension and the R code that load it.
If you figure out a better way to do this please let me know,
Best,
luke
On Thu, 12 May 2005, stefano iacus wrote:
It seems it doesn't work for me either http://159.149.213.137/R/bin/2.1/check/checkSummaryOSX.html Will forward to Luke, hopefully he could help stefano On 12/mag/05, at 23:13, Simon Urbanek wrote:
Hi Robert, On May 12, 2005, at 4:48 PM, Robert Gentleman wrote:
I am getting something a bit weird when I do an install.packages on tkrplot,
library(tkrplot)
Error in structure(.External("dotTcl", ..., PACKAGE = "tcltk"), class =
"tclObj") :
[tcl] dyld: /Users/rgentlem/R/R-devel/bin/exec/R malformed
library: /Users/rgentlem/R/R-devel/library/tkrplot/libs/tkrplot.so (not a
Mach-O library file, bad filetype value)
.
Error in library(tkrplot) : .First.lib failed for 'tkrplot'
can either of you confirm - or point me towards what is wrong with my installation -
It's rather a problem with tkrplot than with your installation - it compiles tkrplot.so as if it was a library to be loaded into R (via dyn.load - more precisely it creates a bundle for R), but then tries to load it as dylib using Tcl/Tk. I don't know the exact system how to load plug-ins into Tcl/Tk, but I suspect that the tkrplot code needs to be split into R part bundle and dylib that is loaded into Tcl/Tk. Chances are that the bundle is actually not needed at all, because I don't see any .C/.Call in the tkrplot R code. I have to run now, but I can have a closer look later this week if it's of interest. Cheers, Simon
--
Luke Tierney
Chair, Statistics and Actuarial Science
Ralph E. Wareham Professor of Mathematical Sciences
University of Iowa Phone: 319-335-3386
Department of Statistics and Fax: 319-335-3017
Actuarial Science
241 Schaeffer Hall email: luke at stat.uiowa.edu
Iowa City, IA 52242 WWW: http://www.stat.uiowa.edu
On Fri, 12 Aug 2005, Marco Blanchette wrote:
Dear all-- I have been trying to get the tkrplot package to work in order to use the bioconductor package genArise. I am trying to build it on a Mac running OS 10.4.1 with R 2.1.1. Following a stanadard install from R here the error I get when I try to load tkrplot
library(tkrplot)
Loading required package: tcltk
Loading Tcl/Tk interface ... done
Error in structure(.External("dotTcl", ..., PACKAGE = "tcltk"), class =
"tclObj") :
[tcl] no suitable image found. Did find:
/Library/Frameworks/R.framework/Versions/2.1.1/Resources/library/tkrplot/li
b
s/tkrplot.so: not a dylib.
Error in library(tkrplot) : .First.lib failed for 'tkrplot'
Gustavo Corral suggestion was to rebuild the tkrplot.so bundle as a library
by doing:
It can be rather tricky to make it work. You have to download it, then install it with R CMD INSTALL, then you may need to edit the file Makeconf in the RHOME/etc directory (the command R RHOME says the path to RHOME directory). In this file you must change: (line 41 in my case) SHLIB_CXXLDFLAGS = -bundle -flat_namespace -undefined suppress replaced by: SHLIB_CXXLDFLAGS = -dynamiclib -flat_namespace -undefined suppress (line 45 ...) SHLIB_LDFLAGS = -bundle -flat_namespace -undefined suppress replaced by: SHLIB_LDFLAGS = -dynamiclib -flat_namespace -undefined suppress then move to the src directory in the tkrplot you just download and link tkrplot with the statement: R CMD SHLIB -o tkrplot.so. Then move tkrplot.so by hand to the libs directory of the tkrplot installation (RHOME/library/tkrplot/libs).
That what I did. Now I am having a different error when I try to load tkrplot...
library(tkrplot)
Loading required package: tcltk
Loading Tcl/Tk interface ... done
Error in structure(.External("dotTcl", ..., PACKAGE = "tcltk"), class =
"tclObj") :
[tcl] couldn't find procedure Rplot_Init.
Error in library(tkrplot) : .First.lib failed for 'tkrplot'
Any clue as how to fix tkrplot?
Why is this package so difficult to install???
Anyway, I would appreciate any help/suggestions.
Many tx
Marco
Marco Blanchette, Ph.D.
mblanche at uclink.berkeley.edu
Donald C. Rio's lab
Department of Molecular and Cell Biology
16 Barker Hall
University of California
Berkeley, CA 94720-3204
Tel: (510) 642-1084
Cell: (510) 847-0996
Fax: (510) 642-6062
______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Luke Tierney
Chair, Statistics and Actuarial Science
Ralph E. Wareham Professor of Mathematical Sciences
University of Iowa Phone: 319-335-3386
Department of Statistics and Fax: 319-335-3017
Actuarial Science
241 Schaeffer Hall email: luke at stat.uiowa.edu
Iowa City, IA 52242 WWW: http://www.stat.uiowa.edu