Oderbolz Daniel
2010-Oct-01 09:49 UTC
[R] Issues loading rtiff 1.4.1 with R 2.6.2 on Windows
Dear R-users, I successfully installed rtiff on by R installation, but when I tried to load it, I got:>local({pkg <- select.list(sort(.packages(all.available = TRUE)))+ if(nchar(pkg)) library(pkg, character.only=TRUE)}) Error in dyn.load(file, ...) : unable to load shared library 'C:/PROGRA~1/R/R-26~1.2/library/rtiff/libs/rtiff.dll': LoadLibrary failure: Das angegebene Modul wurde nicht gefunden. When running "nm" from MinGW on C:\Program Files\R\R-2.6.2\library\rtiff\libs\rtiff.dll, it tells me "no symbols" :-/ So I tried to compile the dll from the sources and did this: gcc -shared -o rtiff.dll rtiff.c -ltiff -lr -I"C:\Program Files\GnuWin32\include" -I"C:\Program Files\R\R-2.6.2\include" -L"C:\Program Files\GnuWin32\lib" -L"C:\MinGW\lib" -L"C:\Program Files\R\R-2.6.2\modules" -L"C:\Program Files\R\R-2.6.2\bin" This indeed creates a dll witch exports 614 symbols. Also my dll is 29KB, the original one just 9 Kb... However, R still throws the same error... Is the infamous space in the Path to R a problem? Thanks a lot for any hint on this! P. S: It seems that the author had issues with compilation (ages ago): http://www.mail-archive.com/r-help at stat.math.ethz.ch/msg54165.html Cheers, Daniel -- Daniel Oderbolz Paul Scherrer Institut CH-5232 Villigen Laboratory of Atmospheric Chemistry, Gasphase and Aerosol Chemistry Group OFLA/007 Tel: +41 (0)56 310 2449 Fax: 4525 daniel.oderbolz [AT] psi.ch
Probably there are not many people on this list left with such an ancient installation. Please try R-2.12.0 alpha. Uwe Ligges On 01.10.2010 11:49, Oderbolz Daniel wrote:> Dear R-users, > > I successfully installed rtiff on by R installation, but when I tried to > load it, I got: > >> local({pkg<- select.list(sort(.packages(all.available = TRUE))) > + if(nchar(pkg)) library(pkg, character.only=TRUE)}) > Error in dyn.load(file, ...) : > unable to load shared library > 'C:/PROGRA~1/R/R-26~1.2/library/rtiff/libs/rtiff.dll': > LoadLibrary failure: Das angegebene Modul wurde nicht gefunden. > > When running "nm" from MinGW on C:\Program > Files\R\R-2.6.2\library\rtiff\libs\rtiff.dll, it tells me "no symbols" > :-/ > > So I tried to compile the dll from the sources and did this: > > gcc -shared -o rtiff.dll rtiff.c -ltiff -lr -I"C:\Program > Files\GnuWin32\include" -I"C:\Program Files\R\R-2.6.2\include" > -L"C:\Program Files\GnuWin32\lib" -L"C:\MinGW\lib" -L"C:\Program > Files\R\R-2.6.2\modules" -L"C:\Program Files\R\R-2.6.2\bin" > > This indeed creates a dll witch exports 614 symbols. Also my dll is > 29KB, the original one just 9 Kb... > > However, R still throws the same error... > > Is the infamous space in the Path to R a problem? > > Thanks a lot for any hint on this! > > P. S: It seems that the author had issues with compilation (ages ago): > http://www.mail-archive.com/r-help at stat.math.ethz.ch/msg54165.html > > Cheers, > Daniel > > -- > Daniel Oderbolz > Paul Scherrer Institut > CH-5232 Villigen > > Laboratory of Atmospheric Chemistry, > Gasphase and Aerosol Chemistry Group > OFLA/007 > > Tel: +41 (0)56 310 2449 > Fax: 4525 > daniel.oderbolz [AT] psi.ch > > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
Carl Witthoft
2010-Oct-03 21:41 UTC
[R] Issues loading rtiff 1.4.1 with R 2.6.2 on Windows
I used rtiff and found a potential problem, which is not strictly rtiff's fault. The more-or-less standard out there is that tiff data should be 8-bits. I needed to be able to read the full 16-bit pixel values from images taken in my lab. After some hacking, I wrote a script which pulled the parameters of interest out of the header (like number of rows and columns), then read the data section out. Perversity being what it is, I don't have a copy of the function where I am right now, but if you would like a copy, please drop me an email. Carl