Skip to content

dependencies in .so files

1 message · Guido Masarotto

#
Martin Maechler writes:
If I can give suggestions:
1) Independently from the RTLD_GLOBAL flag, I will change RTLD_LAZY to
   RTLD_NOW. As Luke T. summarized yesterday in this way a shared library
   which cannot resolve all its symbols (in R.binary or in other libraries)
   cannot be load. This give three   advantages:
   a) At least under Linux, if I call a dynamic linked routine which
      cannot resolve its dependencies, I get a segmentation fault and
      R exit. Of course, we can try to intercept this problem but
      as also Luke noted, it is difficult to be sure that all the systems 
      will trigs an  appropriate signal; in addition
   b) debugging of a shared library becomes simple; at least, we are
      sure that all the functions in the library can be called.
   c) This correspond to the standard for not Unix machine; I am
      sure for Windows but, if I remember, Luke said also for the Mac.
   Perhaps, if a library cannot be loaded, the corresponding dlerror()
   string should be used for giving to the user some information
   on why.
2) Coming to RTDL_GLOBAL; here the question is the one raised by
   Luke: portability. I suppose that the solution suggested by
   Luke (use "recursive" shared libraries)  is more portable than mine. 
   After a first failure, I was   able to run my "silly" example setting 
   the LD_LIBRARY_PATH shell variable,i.e., instructing ld.so about where 
   to search.
I had no time. I downloaded a snapshot next week but I didn't make
any trial. Is the unix/system.c changed a lot? I have just looked
to it now and it seems quite similar to the 0.61.x one.

To all the R people: have a nice day.
guido m.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._