I thought I'd give this another shot before the official release. I tried building R-beta_2004-04-07 on the AIX system that I have access to, and it seemed to failed at lazy-loading survival. I'd very much appreciate any pointer on what to try or look for next. 1. I set OBJECT_MODE to 64 for building 64-bit binary. 2. I edited config.site with the following: CC="xlc_r" CFLAGS="-O -qmaxmem=-1 -qarch=auto -qtune=auto" F77="xlf_r" FFLAGS="-O -qmaxmem=-1 -qarch=auto -qtune=auto -qextname" SHLIB_LDFLAGS="-Wl,-G -Wl,-bM:SRE -Wl,-H512 -Wl,-T512 -Wl,-bnoentry -Wl,-bexpall" CXX="xlC_r" CXXFLAGS="-O -qmaxmem=-1 -qarch=auto -qtune=auto" SHLIB_CXXLDFLAGS="-qmkshrobj" 3. Ran configure with the following options: --with-tcltk=no --prefix=$HOME --with-readline=no and get the following: R is now configured for powerpc-ibm-aix5.1.0.0 Source directory: ../R-beta Installation directory: /SFS/user/ry/liawand C compiler: xlc_r -O -qmaxmem=-1 -qarch=auto -qtune=auto C++ compiler: xlC_r -O -qmaxmem=-1 -qarch=auto -qtune=auto Fortran compiler: xlf_r -O -qmaxmem=-1 -qarch=auto -qtune=auto -qext name Interfaces supported: X11 External libraries: Additional capabilities: MBCS, NLS Options enabled: R profiling Recommended packages: yes 4. Ran `gmake', which produced the following: [...] xlc_r -Wl,-G -Wl,-bM:SRE -Wl,-H512 -Wl,-T512 -Wl,-bnoentry -Wl,-bexpall -Wl,-bM:SRE -Wl,-H512 -Wl,-T512 -Wl,-bnoentry -Wl,-bexpall -Wl,-bI:/SFS/user/ry/liawand/R/Rbuild/etc/R.exp -L/usr/local/lib -o survival.so agexact.o agfit2.o agfit3.o agfit5.o agfit_null.o agmart.o agmart2.o agscore.o agsurv1.o agsurv2.o agsurv3.o char_date.o chinv2.o chinv3.o cholesky2.o cholesky3.o chsolve2.o chsolve3.o cox_Rcallback.o coxdetail.o coxfit2.o coxfit5.o coxmart.o coxph_wtest.o coxscho.o coxscore.o dmatrix.o doloop.o pyears1.o pyears2.o pyears3.o pystep.o surv_callback.o survdiff2.o survfit2.o survfit3.o survindex2.o survindex3.o survreg2.o survreg3.o survreg4.o survreg5.o -lm gmake[3]: Leaving directory `/ltmp/R.INSTALL.5603432/survival/src' ** R ** data ** moving datasets to lazyload DB ** inst ** preparing package for lazy loading /SFS/user/ry/liawand/R/Rbuild/bin/INSTALL[325]: 5677292 Illegal instruction(coredump) ERROR: lazy loading failed for package 'survival' gmake[2]: *** [survival.ts] Error 1 gmake[2]: Leaving directory `/SFS/user/ry/liawand/R/Rbuild/src/library/Recommended' gmake[1]: *** [recommended-packages] Error 2 gmake[1]: Leaving directory `/SFS/user/ry/liawand/R/Rbuild/src/library/Recommended' gmake: *** [stamp-recommended] Error 2 Best, Andy
"Liaw, Andy" <andy_liaw@merck.com> writes:> ** data > ** moving datasets to lazyload DB > ** inst > ** preparing package for lazy loading > /SFS/user/ry/liawand/R/Rbuild/bin/INSTALL[325]: 5677292 Illegal > instruction(coredump)Illegal instruction? Sound like it is either a compiler error or a stray pointer overwriting code or stack. Can you get a handle on this with a debugger? -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907
> From: Peter Dalgaard > > "Liaw, Andy" <andy_liaw@merck.com> writes: > > > > From: Peter Dalgaard > > > > > > "Liaw, Andy" <andy_liaw@merck.com> writes: > > > > > > > ** data > > > > ** moving datasets to lazyload DB > > > > ** inst > > > > ** preparing package for lazy loading > > > > /SFS/user/ry/liawand/R/Rbuild/bin/INSTALL[325]: 5677292 Illegal > > > > instruction(coredump) > > > > > > Illegal instruction? Sound like it is either a compiler error or a > > > stray pointer overwriting code or stack. Can you get a > handle on this > > > with a debugger? > > > > Thanks, Peter, but how do I do that? I know how to do that > to run R, but > > not how to run R CMD INSTALL under a debugger... > > Inside the INSTALL script, there's > > message " moving datasets to lazyload DB" > ## it is possible that data in a package will make use of the > ## code in the package, so ensure the package we have just > ## installed is on the library path. > echo "invisible(.libPaths(c(\"${lib}\", .libPaths()))); > tools:::data2LazyLoadDB(\"${R_PACKAGE_NAME}\", \"${lib}\")" | \ > R_DEFAULT_PACKAGES=NULL LANG=C "${R_EXE}" --vanilla > > /dev/null > > You could try replacing the --vanilla with -d gdb (or whichever > debugger is relevant). I suppose you'd have to send the commands to a > temp file rather than piping them and then within the debugger use > > run --vanilla < yourtempfileOK, after re-building R with the debug flags, I don't think I'm getting anything useful. GDB gives me: gdb) run --vanilla < /ltmp/try.R Starting program: /SFS/user/ry/liawand/R/Rbuild/bin/exec/R --vanilla < /ltmp/try.R Error: [tcsetpgrp failed in terminal_inferior: Not owner] aix-thread resume: unknown pthread 19 aix-thread: fetch_registers: pthdb_pthread_context returned CALLBACK (gdb) bt Error: aix-thread: fetch_registers: pthdb_pthread_context returned CALLBACK and: Unable to Read Instructions at 0x90000000018c6d4 Anyone know what these means? Best, Andy> -- > O__ ---- Peter Dalgaard Blegdamsvej 3 > c/ /'_ --- Dept. of Biostatistics 2200 Cph. N > (*) \(*) -- University of Copenhagen Denmark Ph: > (+45) 35327918 > ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: > (+45) 35327907 > > >
> From: pd@pubhealth.ku.dk > > "Liaw, Andy" <andy_liaw@merck.com> writes: > > > OK, after re-building R with the debug flags, I don't think > I'm getting > > anything useful. GDB gives me: > > > > gdb) run --vanilla < /ltmp/try.R > > Starting program: /SFS/user/ry/liawand/R/Rbuild/bin/exec/R > --vanilla < > > /ltmp/try.R > > Nothing in here??Nada.> > Error: [tcsetpgrp failed in terminal_inferior: Not owner] > > aix-thread resume: unknown pthread 19 > > aix-thread: fetch_registers: pthdb_pthread_context returned CALLBACK > > > > (gdb) bt > > Error: aix-thread: fetch_registers: pthdb_pthread_context > returned CALLBACK > > > > and: > > > > Unable to Read Instructions at 0x90000000018c6d4 > > > > Anyone know what these means? > > Not really, but a couple of thoughts: > > 1) Why are threads involved? Multi-threaded blas? Can you build > without one?No, it's using R's internal BLAS. I see that -lpthread is in FLIBS defined in Makeconf, so it was the Fortran compiler that wanted it.> 2) If you blew away the stack, the object is to get to the point just > before it happened, which means checkpoints, single-stepping and > general attempts to bisect the path leading to the point of > failure. Can you read the gc_count variable after the crash? It is > sometimes useful to conditionalize breakpoints (cond 1 > gc_count==1234 etc.)I'll keep tryin'... Thanks! Andy> -- > O__ ---- Peter Dalgaard Blegdamsvej 3 > c/ /'_ --- Dept. of Biostatistics 2200 Cph. N > (*) \(*) -- University of Copenhagen Denmark Ph: > (+45) 35327918 > ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: > (+45) 35327907 > > >