Skip to content

can't load nlme on windoze 7

9 messages · Tal Galili, Mike Marchywka, Uwe Ligges

#
Hi,

I've got a problem that sounds a lot like this,

http://r.789695.n4.nabble.com/Re-R-R-2-12-0-hangs-while-loading-RGtk2-on-FreeBSD-td3005929.html

under windoze 7.

but it seems to hang with this stack trace,

#0? 0x77830190 in ntdll!LdrFindResource_U ()

?? from /cygdrive/c/Windows/system32/ntdll.dll




building goes as follows,

$ ./R CMD INSTALL --no-test-load nlme_3.1-97.tar.gz
* installing to library 'C:/pfs/R/R-2.11.1/library'
* installing *source* package 'nlme' ...
** libs
? making DLL ...
gcc -I"C:/pfs/R/R-2.11.1/include"???????? -O3 -Wall? -std=gnu99 -c corStruct.c -
o corStruct.o
gcc -I"C:/pfs/R/R-2.11.1/include"???????? -O3 -Wall? -std=gnu99 -c gnls.c -o gnl
s.o
gcc -I"C:/pfs/R/R-2.11.1/include"???????? -O3 -Wall? -std=gnu99 -c init.c -o ini
t.o
gcc -I"C:/pfs/R/R-2.11.1/include"???????? -O3 -Wall? -std=gnu99 -c matrix.c -o m
atrix.o
gcc -I"C:/pfs/R/R-2.11.1/include"???????? -O3 -Wall? -std=gnu99 -c nlOptimizer.c
?-o nlOptimizer.o
gcc -I"C:/pfs/R/R-2.11.1/include"???????? -O3 -Wall? -std=gnu99 -c nlme.c -o nlm
e.o
gcc -I"C:/pfs/R/R-2.11.1/include"???????? -O3 -Wall? -std=gnu99 -c nlmefit.c -o
nlmefit.o
gcc -I"C:/pfs/R/R-2.11.1/include"???????? -O3 -Wall? -std=gnu99 -c nls.c -o nls.
o
gcc -I"C:/pfs/R/R-2.11.1/include"???????? -O3 -Wall? -std=gnu99 -c pdMat.c -o pd
Mat.o
gcc -shared -s -static-libgcc -o nlme.dll tmp.def corStruct.o gnls.o init.o matr
ix.o nlOptimizer.o nlme.o nlmefit.o nls.o pdMat.o -LC:/pfs/R/R-2.11.1/bin -lR
installing to C:/pfs/R/R-2.11.1/library/nlme/libs
? ... done
** R
** data
**? moving datasets to lazyload DB
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices ...

* DONE (nlme)


$ gcc --version
gcc (GCC) 4.3.4 20090804 (release) 1
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.? There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


$ gdb
GNU gdb 6.8.0.20080328-cvs (cygwin-special)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.? Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-cygwin".
(gdb) target exec R.exe
(gdb) run
Starting program: /cygdrive/c/pfs/R/R-2.11.1/bin/R.exe
[New thread 20844.0x5368]
Error: dll starting at 0x77420000 not found.
Error: dll starting at 0x769c0000 not found.
Error: dll starting at 0x77420000 not found.
Error: dll starting at 0x77540000 not found.
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
Error: dll starting at 0x4a0b0000 not found.

R version 2.11.1 (2010-05-31)
Copyright (C) 2010 The R Foundation for Statistical Computing
ISBN 3-900051-07-0

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
[New thread 20844.0x5154]
[Switching to thread 20844.0x5154]
Quit
(gdb) bt
#0? 0x77830190 in ntdll!LdrFindResource_U ()
?? from /cygdrive/c/Windows/system32/ntdll.dll
(gdb)






Mike Marchywka | V.P. Technology

415-264-8477
marchywka at phluant.com

Online Advertising and Analytics for Mobile
http://www.phluant.com
#
________________________________
Yes, I have had problems like that but most of the other packages
appear to build and load ok although I haven't done many on this
machine yet. I checked the permissions strings and just did
chmod -R 777 * on library directory but no help. In any case,
someone should detect a permission problem and fail rather than
hang. The problem is that an attempt to load, either test load
during the install or a call to library(nlme) hangs forever.

The other link I cited finally sent the problem to the r-developers
list.
#
On further investgiation, I clicked on the "R" picture using
windoze explorer and ran as admin. First, I got a prompt saying
it could not find cygwin1.dll. I changed env variables to add cygwin
to path and now it just silently hangs.


If I ask for more details and run R --verbose in gdb and then ctrl-C,
it seems to end up with these thread,

#0? 0x76a76a6f in NlsUpdateSystemLocale ()

?? from /cygdrive/c/Windows/syswow64/kernel32.dll

#1? 0x55c3e074 in ?? ()


I get stuff like this, 
$ gdb
GNU gdb 6.8.0.20080328-cvs (cygwin-special)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.? Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-cygwin".
(gdb) target exec ../R
(gdb) run --verbose
Starting program: /cygdrive/c/pfs/R/R-2.11.1/bin/R --verbose
[New thread 42148.0xa088]
Error: dll starting at 0x77420000 not found.
Error: dll starting at 0x769c0000 not found.
Error: dll starting at 0x77420000 not found.
Error: dll starting at 0x77540000 not found.
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
Error: dll starting at 0x4a290000 not found.
now dyn.load("C:/pfs/R/R-2.11.1/library/methods/libs/methods.dll") ...

R version 2.11.1 (2010-05-31)
Copyright (C) 2010 The R Foundation for Statistical Computing
ISBN 3-900051-07-0

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

[Previously saved workspace restored]

now dyn.load("C:/pfs/R/R-2.11.1/library/grDevices/libs/grDevices.dll") ...
Garbage collection 1 = 0+0+1 (level 2) ...
2.8 Mbytes of cons cells used (29%)
0.6 Mbytes of vectors used (8%)
now dyn.load("C:/pfs/R/R-2.11.1/library/stats/libs/stats.dll") ...
Garbage collection 2 = 1+0+1 (level 0) ...
3.3 Mbytes of cons cells used (34%)
0.7 Mbytes of vectors used (10%)
?>R_ReplConsole(): before "for(;;)" {main.c}
now dyn.load("C:/pfs/R/R-2.11.1/library/grid/libs/grid.dll") ...
Garbage collection 3 = 2+0+1 (level 0) ...
3.7 Mbytes of cons cells used (39%)
0.8 Mbytes of vectors used (12%)
now dyn.load("C:/pfs/R/R-2.11.1/library/lattice/libs/lattice.dll") ...
Garbage collection 4 = 3+0+1 (level 0) ...
4.1 Mbytes of cons cells used (44%)
0.8 Mbytes of vectors used (13%)
now dyn.load("C:/pfs/R/R-2.11.1/library/nlme/libs/nlme.dll") ...
[New thread 42148.0x3f6c]

Program received signal SIGINT, Interrupt.
[Switching to thread 42148.0x3f6c]
0x76a76a6f in NlsUpdateSystemLocale (Quit
(gdb) bt
#0? 0x76a76a6f in NlsUpdateSystemLocale ()
?? from /cygdrive/c/Windows/syswow64/kernel32.dll
#1? 0x55c3e074 in ?? ()
(gdb)
#
I wonder why cygwin is mentioned here.
If you are using the setup installer, it is a native Windows executable 
and does not run under cygwin. cygwin1.dll should not be required 
anywhere. The cygwin platform is not supported.

Best,
Uwe Ligges
On 07.11.2010 14:37, Mike Marchywka wrote:
#
----------------------------------------
Yeah, that was my first question but once I get tied up in these
things I get confused easily and need input :) I haven't used
R in quite a while and this is my first exposure to the 64 bit OS and
all the "stuff" to consider about build issues. There could be a cygwin
R build, I dunno.
?I have reported even
more bizarre results on the cygwin list from time to time on this machine...


The library(nlme) call AFAIK is hanging in a 'dohs 7 stack trace with
no obvious use of cygwin. In fact, if I run cygcheck to find dll 
list it returns this without obvious cygwin need. I did find some notes about
system32 and WOW64 redirects, not sure if there is anything relevant in that
mess but I was hoping to avoid this. Maybe I should just try a reinstall.


$ cygcheck ../R.exe
C:\pfs\R\R-2.11.1\bin\junk\..\R.exe








l







l




-0.dl

ll



















1-1-0.dll

1-0.dll
#
Either hotmail or the list spam filter butchered my dll list but
I would mention that the cygwin dll occurs when I tried to load
the nlme library. I posted the build settings in first post and
am now floundering with the tar file to find the Makefile so I can
change them to avoid using cygwin, something like -mno-cygwin.
Can you point me to the equivalent of the makefile ? I tried 
setting default gcc to version 3 but no change etc. I can play
with the build flags if I know where they are.

Thanks.
?Stupid hotmail or spam filter seems to have wrecked this...
#
Why don't you install the Windows binary?

install.packages("nlme")

should do the trick?

Otherwise, see "R Installation and Administration" manual fir details 
how to set up an environment for installing from sources under Windows.

Note that nlme is a recommended package and included in the binary 
distribution of R anyway.

Uwe Ligges
On 07.11.2010 20:29, Mike Marchywka wrote:
#
----------------------------------------
Trying "R CMD INSTALL ...zip" said that? unpackPkgZip was missing
so rather than figure it out I just decided to go ahead and try
the source, which is what I want to do eventually anyway ok
it is a bit of a diversion from actually using R.
Well, I did have to find a mirror and indeed 

$ cat getStuff.R
options(repos=c("http://cran.stat.ucla.edu"))
install.packages(c("nlme"),dep=TRUE)

seems to have worked as library("nlme") ran fine.
Judging from all the deps it got, the original
approach may have just failed due to that, hard to 
know since I haven't read the docs LOL.
The above script seemed to have to go get alot, and in fact crashed the first
time probably due to anti-malware stuff ( netstat -abn returned about 14000
entries to a firewall and none of my browsers would work etc etc ). 

Thanks, at least I can get back to trying to use R instead of develop
c++ code but I am now interested in that too.