$ export LD_PROFILE_OUTPUT=/tmp/oout
$ export LD_PROFILE=`pwd`/Amelia.so
$ mkdir -p /tmp/oout//home/pauljohn/R/x86_64-pc-linux-gnu-library/2.15/Amelia/libs/
$ env | grep LD
$ R -f testfile.R
If there is trouble, it looks like this:
Loading required package: foreign
Loading required package: Rcpp
Loading required package: RcppArmadillo
/tmp/oout//home/pauljohn/R/x86_64-pc-linux-gnu-library/2.15/Amelia/libs/Amelia.so.profile: cannot open file: Error 21
## Amelia II: Multiple Imputation
Make sure "Amelia.so.profile" does not already exist in that directory.
After that, run again, Amelia.so.profile is created, but on Debian it all ends in blotto
$ sprof ~/R/x86_64-pc-linux-gnu-library/2.15/Amelia/libs/Amelia.so /tmp/oout/home/pauljohn/R/x86_64-pc-linux-gnu-library/2.15/Amelia/libs/Amelia.so.profile
Inconsistency detected by ld.so: dl-open.c: 690: _dl_open: Assertion `_dl_debug_initialize (0, args.nsid)->r_state == RT_CONSISTENT' failed!
That's supposed to be a flaw in glibc that has existed for a long time. Crum.
People say 'switch to oprofile' which is not available for Debian yet in newest version. Have compiled 0.9.8 and am testing.
Humphf. Apparently, I was here at this same point in 2009. The email list r-sig-debian in June 30, 2009, has several questions by me about the same problem. And an effort to use the Google profile tool instead.
There's a good chance I will learn a different mistake, write it down here, and completely forget about it. gloomy, that.