Bill Dunlap
2021-Sep-30 16:00 UTC
[R] Package installation help: Stuck at "** byte-compile and prepare package for lazy loading"
I just tried installing forensim on R-devel/Ubuntu 20.04/WSL-2.0 without an X server (hence DISPLAY was not set). Loading tktcl gives a warning that Tk is not available because DISPLAY is not set. The installation hung after the byte-compile message: installing to /home/bill/R-devel/R-build/site-library/00LOCK-tkrplot/00new/tkrplot/libs ** R ** byte-compile and prepare package for lazy loading Warning message: no DISPLAY variable so Tk is not available ** help *** installing help indices ** building package indices ** testing if installed package can be loaded from temporary location Warning: no DISPLAY variable so Tk is not available Warning: loading Rplot failed ** checking absolute paths in shared objects and dynamic libraries ** testing if installed package can be loaded from final location Warning: no DISPLAY variable so Tk is not available Warning: loading Rplot failed ** testing if installed package keeps a record of temporary installation path * DONE (tkrplot) * installing *source* package ?forensim? ... ** package ?forensim? successfully unpacked and MD5 sums checked ** using staged installation ** libs gcc -I"/home/bill/R-devel/R-build/include" -DNDEBUG -I/usr/local/include -fpic -g -c auxilary.c -o auxilary.o gcc -I"/home/bill/R-devel/R-build/include" -DNDEBUG -I/usr/local/include -fpic -g -c recursFinal.c -o recursFinal.o gcc -shared -L/usr/local/lib -o forensim.so auxilary.o recursFinal.o installing to /home/bill/R-devel/R-build/site-library/00LOCK-forensim/00new/forensim/libs ** R ** data ** inst ** byte-compile and prepare package for lazy loading [hang] gdb gives a traceback that I think indicates that the package is trying to plot something via tcltk at this point: Attaching to process 9310 [New LWP 9315] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". 0x00007fe20a50f560 in ?? () from /usr/lib/x86_64-linux-gnu/libtcl8.6.so (gdb) where #0 0x00007fe20a50f560 in ?? () from /usr/lib/x86_64-linux-gnu/libtcl8.6.so #1 0x00007fe20a50f5f2 in TclNRRunCallbacks () from /usr/lib/x86_64-linux-gnu/libtcl8.6.so #2 0x00007fe20a5e4cd9 in Tcl_PkgRequireProc () from /usr/lib/x86_64-linux-gnu/libtcl8.6.so #3 0x00007fe20a5e4b06 in Tcl_PkgRequireEx () from /usr/lib/x86_64-linux-gnu/libtcl8.6.so #4 0x00007fe20a976be8 in Rplot_Init (interp=0x55ae6437a6c0) at tcltkimg.c:465 #5 0x00007fe20a5d1ee3 in ?? () from /usr/lib/x86_64-linux-gnu/libtcl8.6.so #6 0x00007fe20a50f5f2 in TclNRRunCallbacks () from /usr/lib/x86_64-linux-gnu/libtcl8.6.so #7 0x00007fe20b04d7f0 in dotTclObjv (args=0x55ae6489d210) at /mnt/c/R/R-svn/trunk/src/library/tcltk/src/tcltk.c:250 #8 0x000055ae611cd5a8 in do_External (call=0x55ae6440a270, op=0x55ae61fe1338, args=0x55ae6489d210, env=0x55ae6489d3d0) at /mnt/c/R/R-svn/trunk/src/main/dotcode.c:576 #9 0x000055ae6122a0b3 in bcEval (body=0x55ae6440a190, rho=0x55ae6489d3d0, useCache=TRUE) at /mnt/c/R/R-svn/trunk/src/main/eval.c:7128 #10 0x000055ae6121644a in Rf_eval (e=0x55ae6440a190, rho=0x55ae6489d3d0) at /mnt/c/R/R-svn/trunk/src/main/eval.c:740 #11 0x000055ae61215fda in forcePromise (e=0x55ae6489d398) at /mnt/c/R/R-svn/trunk/src/main/eval.c:568 #12 0x000055ae61220b80 in FORCE_PROMISE (value=0x55ae6489d398, symbol=0x55ae62282a08, rho=0x55ae6489d248, keepmiss=FALSE) at /mnt/c/R/R-svn/trunk/src/main/eval.c:5149 #13 0x000055ae61220d2f in getvar (symbol=0x55ae62282a08, rho=0x55ae6489d248, dd=FALSE, keepmiss=FALSE, vcache=0x7fe20b2ec1f0, sidx=1) at /mnt/c/R/R-svn/trunk/src/main/eval.c:5190 Henrik, can you reproduce this if you undefine DISPLAY? -Bill On Wed, Sep 29, 2021 at 7:48 PM Henrik Bengtsson <henrik.bengtsson at gmail.com> wrote:> I just tried on an up-to-date CentOS 7 with R 4.1.1 built from source > using gcc 8.3.1 (from SCL devtoolset-8; so not the default gcc 4.8.5), > and it works there. If of any help, here's the output when installing > to user's personal package library: > > > chooseCRANmirror(ind = 1) > > install.packages("forensim") > Installing package into > ?/c4/home/henrik/R/x86_64-pc-linux-gnu-library/4.1-CBI-gcc8? > (as ?lib? is unspecified) > trying URL 'https://cloud.r-project.org/src/contrib/forensim_4.3.tar.gz' > Content type 'application/x-gzip' length 84232 bytes (82 KB) > =================================================> downloaded 82 KB > > * installing *source* package ?forensim? ... > ** package ?forensim? successfully unpacked and MD5 sums checked > ** using staged installation > ** libs > gcc -I"/software/c4/cbi/software/R-4.1.1-gcc8/lib64/R/include" > -DNDEBUG -I/usr/local/include -fpic -g -O2 -c auxilary.c -o > auxilary.o > gcc -I"/software/c4/cbi/software/R-4.1.1-gcc8/lib64/R/include" > -DNDEBUG -I/usr/local/include -fpic -g -O2 -c recursFinal.c -o > recursFinal.o > gcc -shared -L/software/c4/cbi/software/R-4.1.1-gcc8/lib64/R/lib > -L/usr/local/lib64 -o forensim.so auxilary.o recursFinal.o > -L/software/c4/cbi/software/R-4.1.1-gcc8/lib64/R/lib -lR > installing to > /c4/home/henrik/R/x86_64-pc-linux-gnu-library/4.1-CBI-gcc8/00LOCK-forensim/00new/forensim/libs > ** R > ** data > ** inst > ** byte-compile and prepare package for lazy loading > ** help > *** installing help indices > ** building package indices > ** testing if installed package can be loaded from temporary location > ** checking absolute paths in shared objects and dynamic libraries > ** testing if installed package can be loaded from final location > ** testing if installed package keeps a record of temporary installation > path > * DONE (forensim) > > The downloaded source packages are in > ?/scratch/henrik/RtmpYFlQyS/downloaded_packages? > > You could also try to install it via 'R CMD INSTALL' and try with > different options disabled to maybe narrow in on what's going on. > > My $.02 > > /Henrik > > On Wed, Sep 29, 2021 at 6:37 PM Brodie, Kent via R-help > <r-help at r-project.org> wrote: > > > > Hey everyone! So, I've been asked by one of our researchers to install > "all" cran packages on one of our servers. Yeah, it's a bit much (and > clearly, not everything will install correctly due to various missing > tidbits), but it will go a long way to having to constantly respond to > install requests of various packages. OK, fine. > > > > Anyway, I have tried this, and things proceed nicely for several hours > until the process gets completely and absolutely stuck. I have tried > several things, for example trying newer versions of R, and even repeating > the process on a CentOS 8 server instead of where my stuff is now (CentOS > 7). > > > > While re-trying one of my newer attempts at this, I decided to focus on > the very first place where it hangs. It dies on package "forensim". > It's a slightly older package, and I don't see anything particularly > special about it. The text below is where it hangs. The install "R" > process doing this is whizzing at 100%, but no progress, no output, no > errors. Nothing in the system logs. > > > > On new "R" installs, with either operating system (CentOS 7, CentOS 8) > and even different versions of "R" (up to including 4.1.1), I get the same > result when just attempting to install this ONE package. (and my guess, > there's more packages out there that may bite me the same way). > > > > I am seeking any recommendations on how I can get past this? A debug > option? A timeout of sorts so things will move along to the next package > when attempting to install a ton, or...? I'm of course willing to try > anything. It's stupidly frustrating. I'd be OK if it errored out and > moved on. But it... hangs. > > > > Here's the latter part of the install attempt of this one package. > This latest attempt has been stuck on that last line now for 5 hours and > counting. > > > > * DONE (tkrplot) > > Making 'packages.html' ... done > > * installing *source* package 'forensim' ... > > ** package 'forensim' successfully unpacked and MD5 sums checked > > ** using staged installation > > ** libs > > gcc -m64 -I"/usr/include/R" -DNDEBUG -I/usr/local/include -fpic -O2 > -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 > -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong > -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 > -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic > -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -c > auxilary.c -o auxilary.o > > gcc -m64 -I"/usr/include/R" -DNDEBUG -I/usr/local/include -fpic -O2 > -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 > -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong > -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 > -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic > -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -c > recursFinal.c -o recursFinal.o > > gcc -m64 -shared -L/usr/lib64/R/lib -Wl,-z,relro -Wl,-z,now > -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o forensim.so auxilary.o > recursFinal.o -L/usr/lib64/R/lib -lR > > installing to /usr/lib64/R/library/00LOCK-forensim/00new/forensim/libs > > ** R > > ** data > > ** inst > > ** byte-compile and prepare package for lazy loading > > > > > > [[alternative HTML version deleted]] > > > > ______________________________________________ > > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > > 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. > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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. >[[alternative HTML version deleted]]
Jeff Newmiller
2021-Sep-30 16:29 UTC
[R] Package installation help: Stuck at "** byte-compile and prepare package for lazy loading"
This is a microcosm of why installing "all CRAN" packages is a bad idea. Now extend this to the other 5% of 16000+ packages that will have unclear requirements, and when you have all those installed try to update just one of the packages because one of your users has learned of a bug in that package and the cascade starts again. Then listen as another user complains that one of the dependencies updated in the first update broke something they were working on. User libraries. Project libraries (with renv). Do anything to go as fast as possible in the opposite direction from the concept presumed by this task... "universal usability". Or go help with CRAN because you are just the kind of selfless masochist that they need to keep it going and you will need a team to keep up with it. (Obligatory thanks extended here to the CRAN team.) On September 30, 2021 9:00:35 AM PDT, Bill Dunlap <williamwdunlap at gmail.com> wrote:>I just tried installing forensim on R-devel/Ubuntu 20.04/WSL-2.0 without an >X server (hence DISPLAY was not set). Loading tktcl gives a warning that >Tk is not available because DISPLAY is not set. The installation hung >after the byte-compile message: >installing to >/home/bill/R-devel/R-build/site-library/00LOCK-tkrplot/00new/tkrplot/libs >** R >** byte-compile and prepare package for lazy loading >Warning message: >no DISPLAY variable so Tk is not available >** help >*** installing help indices >** building package indices >** testing if installed package can be loaded from temporary location >Warning: no DISPLAY variable so Tk is not available >Warning: loading Rplot failed >** checking absolute paths in shared objects and dynamic libraries >** testing if installed package can be loaded from final location >Warning: no DISPLAY variable so Tk is not available >Warning: loading Rplot failed >** testing if installed package keeps a record of temporary installation >path >* DONE (tkrplot) >* installing *source* package ?forensim? ... >** package ?forensim? successfully unpacked and MD5 sums checked >** using staged installation >** libs >gcc -I"/home/bill/R-devel/R-build/include" -DNDEBUG -I/usr/local/include > -fpic -g -c auxilary.c -o auxilary.o >gcc -I"/home/bill/R-devel/R-build/include" -DNDEBUG -I/usr/local/include > -fpic -g -c recursFinal.c -o recursFinal.o >gcc -shared -L/usr/local/lib -o forensim.so auxilary.o recursFinal.o >installing to >/home/bill/R-devel/R-build/site-library/00LOCK-forensim/00new/forensim/libs >** R >** data >** inst >** byte-compile and prepare package for lazy loading >[hang] > >gdb gives a traceback that I think indicates that the package is trying to >plot something via tcltk at this point: > >Attaching to process 9310 >[New LWP 9315] >[Thread debugging using libthread_db enabled] >Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". >0x00007fe20a50f560 in ?? () from /usr/lib/x86_64-linux-gnu/libtcl8.6.so >(gdb) where >#0 0x00007fe20a50f560 in ?? () from /usr/lib/x86_64-linux-gnu/libtcl8.6.so >#1 0x00007fe20a50f5f2 in TclNRRunCallbacks () from >/usr/lib/x86_64-linux-gnu/libtcl8.6.so >#2 0x00007fe20a5e4cd9 in Tcl_PkgRequireProc () from >/usr/lib/x86_64-linux-gnu/libtcl8.6.so >#3 0x00007fe20a5e4b06 in Tcl_PkgRequireEx () from >/usr/lib/x86_64-linux-gnu/libtcl8.6.so >#4 0x00007fe20a976be8 in Rplot_Init (interp=0x55ae6437a6c0) at >tcltkimg.c:465 >#5 0x00007fe20a5d1ee3 in ?? () from /usr/lib/x86_64-linux-gnu/libtcl8.6.so >#6 0x00007fe20a50f5f2 in TclNRRunCallbacks () from >/usr/lib/x86_64-linux-gnu/libtcl8.6.so >#7 0x00007fe20b04d7f0 in dotTclObjv (args=0x55ae6489d210) at >/mnt/c/R/R-svn/trunk/src/library/tcltk/src/tcltk.c:250 >#8 0x000055ae611cd5a8 in do_External (call=0x55ae6440a270, >op=0x55ae61fe1338, args=0x55ae6489d210, env=0x55ae6489d3d0) > at /mnt/c/R/R-svn/trunk/src/main/dotcode.c:576 >#9 0x000055ae6122a0b3 in bcEval (body=0x55ae6440a190, rho=0x55ae6489d3d0, >useCache=TRUE) > at /mnt/c/R/R-svn/trunk/src/main/eval.c:7128 >#10 0x000055ae6121644a in Rf_eval (e=0x55ae6440a190, rho=0x55ae6489d3d0) at >/mnt/c/R/R-svn/trunk/src/main/eval.c:740 >#11 0x000055ae61215fda in forcePromise (e=0x55ae6489d398) at >/mnt/c/R/R-svn/trunk/src/main/eval.c:568 >#12 0x000055ae61220b80 in FORCE_PROMISE (value=0x55ae6489d398, >symbol=0x55ae62282a08, rho=0x55ae6489d248, > keepmiss=FALSE) at /mnt/c/R/R-svn/trunk/src/main/eval.c:5149 >#13 0x000055ae61220d2f in getvar (symbol=0x55ae62282a08, >rho=0x55ae6489d248, dd=FALSE, keepmiss=FALSE, > vcache=0x7fe20b2ec1f0, sidx=1) at >/mnt/c/R/R-svn/trunk/src/main/eval.c:5190 > >Henrik, can you reproduce this if you undefine DISPLAY? > >-Bill > > > > >On Wed, Sep 29, 2021 at 7:48 PM Henrik Bengtsson <henrik.bengtsson at gmail.com> >wrote: > >> I just tried on an up-to-date CentOS 7 with R 4.1.1 built from source >> using gcc 8.3.1 (from SCL devtoolset-8; so not the default gcc 4.8.5), >> and it works there. If of any help, here's the output when installing >> to user's personal package library: >> >> > chooseCRANmirror(ind = 1) >> > install.packages("forensim") >> Installing package into >> ?/c4/home/henrik/R/x86_64-pc-linux-gnu-library/4.1-CBI-gcc8? >> (as ?lib? is unspecified) >> trying URL 'https://cloud.r-project.org/src/contrib/forensim_4.3.tar.gz' >> Content type 'application/x-gzip' length 84232 bytes (82 KB) >> =================================================>> downloaded 82 KB >> >> * installing *source* package ?forensim? ... >> ** package ?forensim? successfully unpacked and MD5 sums checked >> ** using staged installation >> ** libs >> gcc -I"/software/c4/cbi/software/R-4.1.1-gcc8/lib64/R/include" >> -DNDEBUG -I/usr/local/include -fpic -g -O2 -c auxilary.c -o >> auxilary.o >> gcc -I"/software/c4/cbi/software/R-4.1.1-gcc8/lib64/R/include" >> -DNDEBUG -I/usr/local/include -fpic -g -O2 -c recursFinal.c -o >> recursFinal.o >> gcc -shared -L/software/c4/cbi/software/R-4.1.1-gcc8/lib64/R/lib >> -L/usr/local/lib64 -o forensim.so auxilary.o recursFinal.o >> -L/software/c4/cbi/software/R-4.1.1-gcc8/lib64/R/lib -lR >> installing to >> /c4/home/henrik/R/x86_64-pc-linux-gnu-library/4.1-CBI-gcc8/00LOCK-forensim/00new/forensim/libs >> ** R >> ** data >> ** inst >> ** byte-compile and prepare package for lazy loading >> ** help >> *** installing help indices >> ** building package indices >> ** testing if installed package can be loaded from temporary location >> ** checking absolute paths in shared objects and dynamic libraries >> ** testing if installed package can be loaded from final location >> ** testing if installed package keeps a record of temporary installation >> path >> * DONE (forensim) >> >> The downloaded source packages are in >> ?/scratch/henrik/RtmpYFlQyS/downloaded_packages? >> >> You could also try to install it via 'R CMD INSTALL' and try with >> different options disabled to maybe narrow in on what's going on. >> >> My $.02 >> >> /Henrik >> >> On Wed, Sep 29, 2021 at 6:37 PM Brodie, Kent via R-help >> <r-help at r-project.org> wrote: >> > >> > Hey everyone! So, I've been asked by one of our researchers to install >> "all" cran packages on one of our servers. Yeah, it's a bit much (and >> clearly, not everything will install correctly due to various missing >> tidbits), but it will go a long way to having to constantly respond to >> install requests of various packages. OK, fine. >> > >> > Anyway, I have tried this, and things proceed nicely for several hours >> until the process gets completely and absolutely stuck. I have tried >> several things, for example trying newer versions of R, and even repeating >> the process on a CentOS 8 server instead of where my stuff is now (CentOS >> 7). >> > >> > While re-trying one of my newer attempts at this, I decided to focus on >> the very first place where it hangs. It dies on package "forensim". >> It's a slightly older package, and I don't see anything particularly >> special about it. The text below is where it hangs. The install "R" >> process doing this is whizzing at 100%, but no progress, no output, no >> errors. Nothing in the system logs. >> > >> > On new "R" installs, with either operating system (CentOS 7, CentOS 8) >> and even different versions of "R" (up to including 4.1.1), I get the same >> result when just attempting to install this ONE package. (and my guess, >> there's more packages out there that may bite me the same way). >> > >> > I am seeking any recommendations on how I can get past this? A debug >> option? A timeout of sorts so things will move along to the next package >> when attempting to install a ton, or...? I'm of course willing to try >> anything. It's stupidly frustrating. I'd be OK if it errored out and >> moved on. But it... hangs. >> > >> > Here's the latter part of the install attempt of this one package. >> This latest attempt has been stuck on that last line now for 5 hours and >> counting. >> > >> > * DONE (tkrplot) >> > Making 'packages.html' ... done >> > * installing *source* package 'forensim' ... >> > ** package 'forensim' successfully unpacked and MD5 sums checked >> > ** using staged installation >> > ** libs >> > gcc -m64 -I"/usr/include/R" -DNDEBUG -I/usr/local/include -fpic -O2 >> -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 >> -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong >> -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 >> -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic >> -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -c >> auxilary.c -o auxilary.o >> > gcc -m64 -I"/usr/include/R" -DNDEBUG -I/usr/local/include -fpic -O2 >> -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 >> -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong >> -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 >> -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic >> -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -c >> recursFinal.c -o recursFinal.o >> > gcc -m64 -shared -L/usr/lib64/R/lib -Wl,-z,relro -Wl,-z,now >> -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o forensim.so auxilary.o >> recursFinal.o -L/usr/lib64/R/lib -lR >> > installing to /usr/lib64/R/library/00LOCK-forensim/00new/forensim/libs >> > ** R >> > ** data >> > ** inst >> > ** byte-compile and prepare package for lazy loading >> > >> > >> > [[alternative HTML version deleted]] >> > >> > ______________________________________________ >> > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >> > 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. >> >> ______________________________________________ >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >> 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. >> > > [[alternative HTML version deleted]] > >______________________________________________ >R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >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.-- Sent from my phone. Please excuse my brevity.
Brodie, Kent
2021-Sep-30 16:35 UTC
[R] Package installation help: Stuck at "** byte-compile and prepare package for lazy loading"
Bill-- BINGO. You have found the answer. After some testing on one of my environments where it was always hanging, connecting to the same server with an X-Sever running on my workstation did indeed allow the package to be installed. **GOOD LORD THAT?S RIDICULOUS** But---- at least I know. And why it doesn?t error out without X running, who knows. After a ton more research, I ALSO discovered that there IS a timeout thing I can make use of, should I decide to continue just building things and ignoring the X-Server requirement for this (and probably some other?) packages. Before executing R and installing things, set this: export _R_INSTALL_PACKAGES_ELAPSED_TIMEOUT_=500 (value is seconds). So, the previously-hanging R CMD INSTALL inside of the install.packages call will eventually die, and then move on to the next package. This is buried in the documentation but- it?s there and I confirmed it works. My example above times out a package install at 5 minutes. While knowing the X requirement is a huge win (thanks again!), I will probably stick with just using the timeout thing for what I?m trying to accomplish. Installing EVERYTHING from cran will take forever, and more than likely my VPN connection to my data center will be disconnected (thank you internal IT department) before it finishes. They have some sort of internal ?you?ve been connected too long? timer that disconnects things overnight. Grr. [[alternative HTML version deleted]]
Bill Dunlap
2021-Sep-30 16:36 UTC
[R] Package installation help: Stuck at "** byte-compile and prepare package for lazy loading"
I tried this a second time, but with --no-byte-compile, and it hung with a slightly different traceback (gdb) where #0 0x00007f95bc4c6689 in __fxstat64 () from /usr/lib/x86_64-linux-gnu/libc.so.6 #1 0x00007f95bc497050 in opendir () from /usr/lib/x86_64-linux-gnu/libc.so.6 #2 0x00007f95b935f1e0 in ?? () from /usr/lib/x86_64-linux-gnu/libtcl8.6.so #3 0x00007f95b9311242 in Tcl_FSMatchInDirectory () from /usr/lib/x86_64-linux-gnu/libtcl8.6.so #4 0x00007f95b92f3e2b in ?? () from /usr/lib/x86_64-linux-gnu/libtcl8.6.so #5 0x00007f95b92f34c5 in ?? () from /usr/lib/x86_64-linux-gnu/libtcl8.6.so #6 0x00007f95b92f29d8 in ?? () from /usr/lib/x86_64-linux-gnu/libtcl8.6.so #7 0x00007f95b92565f2 in TclNRRunCallbacks () from /usr/lib/x86_64-linux-gnu/libtcl8.6.so #8 0x00007f95b932bcd9 in Tcl_PkgRequireProc () from /usr/lib/x86_64-linux-gnu/libtcl8.6.so #9 0x00007f95b932bb06 in Tcl_PkgRequireEx () from /usr/lib/x86_64-linux-gnu/libtcl8.6.so #10 0x00007f95b96bdbe8 in Rplot_Init (interp=0x5625117460d0) at tcltkimg.c:465 and when I killed the R subprocess doing the lazyload prep I got a quasi-infinite stream of error messages: ... error reading package index file /home/bill/R-devel/R-build/site-library/tcltk2/tklibs/ttktheme_aquablue/pkgIndex.tcl: too many nested evaluations (infinite loop?) error reading package index file /home/bill/R-devel/R-build/site-library/tcltk2/tklibs/ttktheme_radiance/pkgIndex.tcl: too many nested evaluations (infinite loop?) error reading package index file /home/bill/R-devel/R-build/site-library/tcltk2/tklibs/ttktheme_clearlooks/pkgIndex.tcl: too many nested evaluations (infinite loop?) error reading package index file /home/bill/R-devel/R-build/site-library/tcltk2/tklibs/ttktheme_radiance/pkgIndex.tcl: can't find package tile error reading package index file /home/bill/R-devel/R-build/site-library/tcltk2/tklibs/ttktheme_aquablue/pkgIndex.tcl: too many nested evaluations (infinite loop?) error reading package index file /home/bill/R-devel/R-build/site-library/tcltk2/tklibs/ttktheme_radiance/pkgIndex.tcl: too many nested evaluations (infinite loop?) error reading package index file /home/bill/R-devel/R-build/site-library/tcltk2/tklibs/ttktheme_clearlooks/pkgIndex.tcl: too many nested evaluations (infinite loop?) error reading package index file /home/bill/R-devel/R-build/site-library/tcltk2/tklibs/ttktheme_clearlooks/pkgIndex.tcl: can't find package tile error reading package index file /home/bill/R-devel/R-build/site-library/tcltk2/tklibs/ttktheme_clearlooks/pkgIndex.tcl: can't find package tile error reading package index file /home/bill/R-devel/R-build/site-library/tcltk2/tklibs/ttktheme_clearlooks/pkgIndex.tcl: can't find package tile error reading package index file /home/bill/R-devel/R-build/site-library/tcltk2/tklibs/ttktheme_radiance/pkgIndex.tcl: can't find package tile ... -Bill On Thu, Sep 30, 2021 at 9:00 AM Bill Dunlap <williamwdunlap at gmail.com> wrote:> I just tried installing forensim on R-devel/Ubuntu 20.04/WSL-2.0 without > an X server (hence DISPLAY was not set). Loading tktcl gives a warning > that Tk is not available because DISPLAY is not set. The installation hung > after the byte-compile message: > installing to > /home/bill/R-devel/R-build/site-library/00LOCK-tkrplot/00new/tkrplot/libs > ** R > ** byte-compile and prepare package for lazy loading > Warning message: > no DISPLAY variable so Tk is not available > ** help > *** installing help indices > ** building package indices > ** testing if installed package can be loaded from temporary location > Warning: no DISPLAY variable so Tk is not available > Warning: loading Rplot failed > ** checking absolute paths in shared objects and dynamic libraries > ** testing if installed package can be loaded from final location > Warning: no DISPLAY variable so Tk is not available > Warning: loading Rplot failed > ** testing if installed package keeps a record of temporary installation > path > * DONE (tkrplot) > * installing *source* package ?forensim? ... > ** package ?forensim? successfully unpacked and MD5 sums checked > ** using staged installation > ** libs > gcc -I"/home/bill/R-devel/R-build/include" -DNDEBUG -I/usr/local/include > -fpic -g -c auxilary.c -o auxilary.o > gcc -I"/home/bill/R-devel/R-build/include" -DNDEBUG -I/usr/local/include > -fpic -g -c recursFinal.c -o recursFinal.o > gcc -shared -L/usr/local/lib -o forensim.so auxilary.o recursFinal.o > installing to > /home/bill/R-devel/R-build/site-library/00LOCK-forensim/00new/forensim/libs > ** R > ** data > ** inst > ** byte-compile and prepare package for lazy loading > [hang] > > gdb gives a traceback that I think indicates that the package is trying to > plot something via tcltk at this point: > > Attaching to process 9310 > [New LWP 9315] > [Thread debugging using libthread_db enabled] > Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". > 0x00007fe20a50f560 in ?? () from /usr/lib/x86_64-linux-gnu/libtcl8.6.so > (gdb) where > #0 0x00007fe20a50f560 in ?? () from /usr/lib/x86_64-linux-gnu/ > libtcl8.6.so > #1 0x00007fe20a50f5f2 in TclNRRunCallbacks () from > /usr/lib/x86_64-linux-gnu/libtcl8.6.so > #2 0x00007fe20a5e4cd9 in Tcl_PkgRequireProc () from > /usr/lib/x86_64-linux-gnu/libtcl8.6.so > #3 0x00007fe20a5e4b06 in Tcl_PkgRequireEx () from > /usr/lib/x86_64-linux-gnu/libtcl8.6.so > #4 0x00007fe20a976be8 in Rplot_Init (interp=0x55ae6437a6c0) at > tcltkimg.c:465 > #5 0x00007fe20a5d1ee3 in ?? () from /usr/lib/x86_64-linux-gnu/ > libtcl8.6.so > #6 0x00007fe20a50f5f2 in TclNRRunCallbacks () from > /usr/lib/x86_64-linux-gnu/libtcl8.6.so > #7 0x00007fe20b04d7f0 in dotTclObjv (args=0x55ae6489d210) at > /mnt/c/R/R-svn/trunk/src/library/tcltk/src/tcltk.c:250 > #8 0x000055ae611cd5a8 in do_External (call=0x55ae6440a270, > op=0x55ae61fe1338, args=0x55ae6489d210, env=0x55ae6489d3d0) > at /mnt/c/R/R-svn/trunk/src/main/dotcode.c:576 > #9 0x000055ae6122a0b3 in bcEval (body=0x55ae6440a190, rho=0x55ae6489d3d0, > useCache=TRUE) > at /mnt/c/R/R-svn/trunk/src/main/eval.c:7128 > #10 0x000055ae6121644a in Rf_eval (e=0x55ae6440a190, rho=0x55ae6489d3d0) > at /mnt/c/R/R-svn/trunk/src/main/eval.c:740 > #11 0x000055ae61215fda in forcePromise (e=0x55ae6489d398) at > /mnt/c/R/R-svn/trunk/src/main/eval.c:568 > #12 0x000055ae61220b80 in FORCE_PROMISE (value=0x55ae6489d398, > symbol=0x55ae62282a08, rho=0x55ae6489d248, > keepmiss=FALSE) at /mnt/c/R/R-svn/trunk/src/main/eval.c:5149 > #13 0x000055ae61220d2f in getvar (symbol=0x55ae62282a08, > rho=0x55ae6489d248, dd=FALSE, keepmiss=FALSE, > vcache=0x7fe20b2ec1f0, sidx=1) at > /mnt/c/R/R-svn/trunk/src/main/eval.c:5190 > > Henrik, can you reproduce this if you undefine DISPLAY? > > -Bill > > > > > On Wed, Sep 29, 2021 at 7:48 PM Henrik Bengtsson < > henrik.bengtsson at gmail.com> wrote: > >> I just tried on an up-to-date CentOS 7 with R 4.1.1 built from source >> using gcc 8.3.1 (from SCL devtoolset-8; so not the default gcc 4.8.5), >> and it works there. If of any help, here's the output when installing >> to user's personal package library: >> >> > chooseCRANmirror(ind = 1) >> > install.packages("forensim") >> Installing package into >> ?/c4/home/henrik/R/x86_64-pc-linux-gnu-library/4.1-CBI-gcc8? >> (as ?lib? is unspecified) >> trying URL 'https://cloud.r-project.org/src/contrib/forensim_4.3.tar.gz' >> Content type 'application/x-gzip' length 84232 bytes (82 KB) >> =================================================>> downloaded 82 KB >> >> * installing *source* package ?forensim? ... >> ** package ?forensim? successfully unpacked and MD5 sums checked >> ** using staged installation >> ** libs >> gcc -I"/software/c4/cbi/software/R-4.1.1-gcc8/lib64/R/include" >> -DNDEBUG -I/usr/local/include -fpic -g -O2 -c auxilary.c -o >> auxilary.o >> gcc -I"/software/c4/cbi/software/R-4.1.1-gcc8/lib64/R/include" >> -DNDEBUG -I/usr/local/include -fpic -g -O2 -c recursFinal.c -o >> recursFinal.o >> gcc -shared -L/software/c4/cbi/software/R-4.1.1-gcc8/lib64/R/lib >> -L/usr/local/lib64 -o forensim.so auxilary.o recursFinal.o >> -L/software/c4/cbi/software/R-4.1.1-gcc8/lib64/R/lib -lR >> installing to >> /c4/home/henrik/R/x86_64-pc-linux-gnu-library/4.1-CBI-gcc8/00LOCK-forensim/00new/forensim/libs >> ** R >> ** data >> ** inst >> ** byte-compile and prepare package for lazy loading >> ** help >> *** installing help indices >> ** building package indices >> ** testing if installed package can be loaded from temporary location >> ** checking absolute paths in shared objects and dynamic libraries >> ** testing if installed package can be loaded from final location >> ** testing if installed package keeps a record of temporary installation >> path >> * DONE (forensim) >> >> The downloaded source packages are in >> ?/scratch/henrik/RtmpYFlQyS/downloaded_packages? >> >> You could also try to install it via 'R CMD INSTALL' and try with >> different options disabled to maybe narrow in on what's going on. >> >> My $.02 >> >> /Henrik >> >> On Wed, Sep 29, 2021 at 6:37 PM Brodie, Kent via R-help >> <r-help at r-project.org> wrote: >> > >> > Hey everyone! So, I've been asked by one of our researchers to install >> "all" cran packages on one of our servers. Yeah, it's a bit much (and >> clearly, not everything will install correctly due to various missing >> tidbits), but it will go a long way to having to constantly respond to >> install requests of various packages. OK, fine. >> > >> > Anyway, I have tried this, and things proceed nicely for several hours >> until the process gets completely and absolutely stuck. I have tried >> several things, for example trying newer versions of R, and even repeating >> the process on a CentOS 8 server instead of where my stuff is now (CentOS >> 7). >> > >> > While re-trying one of my newer attempts at this, I decided to focus on >> the very first place where it hangs. It dies on package "forensim". >> It's a slightly older package, and I don't see anything particularly >> special about it. The text below is where it hangs. The install "R" >> process doing this is whizzing at 100%, but no progress, no output, no >> errors. Nothing in the system logs. >> > >> > On new "R" installs, with either operating system (CentOS 7, CentOS 8) >> and even different versions of "R" (up to including 4.1.1), I get the same >> result when just attempting to install this ONE package. (and my guess, >> there's more packages out there that may bite me the same way). >> > >> > I am seeking any recommendations on how I can get past this? A debug >> option? A timeout of sorts so things will move along to the next package >> when attempting to install a ton, or...? I'm of course willing to try >> anything. It's stupidly frustrating. I'd be OK if it errored out and >> moved on. But it... hangs. >> > >> > Here's the latter part of the install attempt of this one package. >> This latest attempt has been stuck on that last line now for 5 hours and >> counting. >> > >> > * DONE (tkrplot) >> > Making 'packages.html' ... done >> > * installing *source* package 'forensim' ... >> > ** package 'forensim' successfully unpacked and MD5 sums checked >> > ** using staged installation >> > ** libs >> > gcc -m64 -I"/usr/include/R" -DNDEBUG -I/usr/local/include -fpic >> -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 >> -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong >> -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 >> -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic >> -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -c >> auxilary.c -o auxilary.o >> > gcc -m64 -I"/usr/include/R" -DNDEBUG -I/usr/local/include -fpic >> -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 >> -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong >> -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 >> -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic >> -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -c >> recursFinal.c -o recursFinal.o >> > gcc -m64 -shared -L/usr/lib64/R/lib -Wl,-z,relro -Wl,-z,now >> -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o forensim.so auxilary.o >> recursFinal.o -L/usr/lib64/R/lib -lR >> > installing to /usr/lib64/R/library/00LOCK-forensim/00new/forensim/libs >> > ** R >> > ** data >> > ** inst >> > ** byte-compile and prepare package for lazy loading >> > >> > >> > [[alternative HTML version deleted]] >> > >> > ______________________________________________ >> > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >> > 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. >> >> ______________________________________________ >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >> 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. >> >[[alternative HTML version deleted]]