Jim, you should ask questions like these on R-devel. There are more proficient Linux gurus on there than me [that's why I CC:].>>>>> "Jim" == Jim Lindsey <jlindsey@luc.ac.be> writes:Jim> Martin, Here is an additional problem with my libraries: the Jim> Kalman filtering, written in Fortran, uses complex arithmetic. Jim> On my Red Hat 5, the f2c library is included by the -lf2c in the Jim> Makefile. makes sense. Jim> However, my son has just installed a new version of Jim> Slackware and we can find no way to convince gcc to include the All I ever hear about Slackware is that you should not use it anymore... [I used to have a 0.99x version of Linux.. and *did* have Slackware then..] Jim> f2c library. (With the previous version of Slackware that he had, Jim> it could be tricked by placing -L/usr/lib right before -lf2c, Jim> something I never understood.) -L/usr/lib says to that -lf2c should also search for libf2c.a or .so in /usr/lib. However that is standard (in Linux), so I don't understand either. The above problem sounds like your installation is broken to some extent... Jim> Of course, R crashes when we run my Jim> programs because it does not find the complex functions. Jim> I remember that there was some discussion of such problems on the Jim> list quite a while ago. Is any solution in sight? The new 0.62 branch of R *REQUIRES* either a fortran compiler or f2c. So, your problems might have resolved by then. However, given what you tell above, I assume that your Slackware-Linux system has some misconfigurations that should be resolved anyway... Martin -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Jim I don't think your libf2c problems are related to your installation, Slackware, or even to Linux. I have the same trouble in RedHat and in Solaris. I think the problem is whether it is the responsibility of a dynamically loaded .so to knowing where libraries are, or if R.binary should know that. In my rather crude and uninformed experimentation I could not discover a way to make my .so know and pass along that information, so I have concluded that it must be R.binary's responsibility. I posted a question on this some time ago, to which Ross acknowledged there is a problem and suggested I contact Kurt. In the end I didn't do that because I discovered that some rather trivial changes to my fortran resulted in calls to pow_di rather than pow_ii and this fixed my problem. I hope that the problem has been fixed in 0.62, but I wouldn't be too sure of that, since, as far as I know, you and I are the only ones who have been having this difficulty. I suspect it will become more of an issue as more fortran is ported. Below is a copy of the exchange from my previous posting. Paul Gilbert ________> Paul Gilbert <pgilbert@bank-banque-canada.ca> writes: > > > I have a problem with my dynamically loaded code in R not finding > > pow_ii, which for some time I thought was because library f2c is > > not on my Sparcstation. > > However, I have now been experiencing > > the same problem in Linux, with all the proper libraries in place. > > > > My incomplete understanding of elf and shared libraries does not > > help, but when compiling a complete program I usually muddle through. > > However, in the case of dynamically loading code into R, I am not > > sure whether it is my dse.so or R which should have the knowledge > > of where to find /usr/lib/libf2c.so*. I haven't had much success > > trying to configure so that that information is in dse.so. None > > of the usual things seem to help, so I suspect R itself needs to > > be able to find the library. If someone can explain this I would > > very much appreciate it.DB> One thing you can do is to check the R.binary file with "nm -g" to find DB> out what symbols are defined in it. On my machine R.binary includes DB> pow_dd and pow_di but not pow_ii. This is a general problem we need a solution to. Recently, Kurt Hornik has changed the configuration procedures so that fortran is located and used to load R. I thought this would fix this kind of problem. (Any references to fortran things like pow_ii should be removed from the C sources). I'd suggest that you get in touch with Kurt directly: Kurt.Hornik@ci.tuwien.ac.at to sort this out. Ross -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Martin Maechler <maechler@stat.math.ethz.ch> writes:> Jim> On my Red Hat 5, the f2c library is included by the -lf2c in the > Jim> Makefile. > makes sense. > > Jim> However, my son has just installed a new version of > Jim> Slackware and we can find no way to convince gcc to include the > All I ever hear about Slackware is that you should not use it anymore... > [I used to have a 0.99x version of Linux.. and *did* have Slackware then..] > > Jim> f2c library. (With the previous version of Slackware that he had, > Jim> it could be tricked by placing -L/usr/lib right before -lf2c, > Jim> something I never understood.) > > -L/usr/lib says to that -lf2c should also search for libf2c.a or .so > in /usr/lib. > However that is standard (in Linux), so I don't understand either.I've seen some similar cases in the distant past, apparently related to argument order of the link command arguments. If all else fails, one can always specify /usr/lib/libf2c.so directly. Provided that the file is actually there, of course... -- 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 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._