From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,915496c75a4ca0d7 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-07-21 11:09:06 PST Path: nntp.gmd.de!xlink.net!howland.reston.ans.net!swrinde!elroy.jpl.nasa.gov!ames!decwrl!pa.dec.com!nntpd.lkg.dec.com!icecub.ako.dec.com!huston From: huston@icecub.ako.dec.com (Steve Huston) Newsgroups: comp.unix.osf.osf1 Subject: Re: Problems with Shared Libraries Date: 21 Jul 1994 17:26:37 GMT Organization: CompuCraft Distribution: world Message-ID: <30mb4d$d5h@nntpd.lkg.dec.com> References: <30jf4l$g7g@msuinfo.cl.msu.edu> Reply-To: huston@icecub.ako.dec.com NNTP-Posting-Host: icecub.ako.dec.com In article <30jf4l$g7g@msuinfo.cl.msu.edu>, scottge1@cps.msu.edu (George M. Scott) writes: >Now if I create shared libraries that use libc.so, libm.so, or even libcxx.so >everything is fine when loaded with dlopen. However if the library >has dependencies of the form -lpthreads -lmach -lcxx -lc_r -lc, and the >library contains global c++ constructors which make pthreads calls then >the library cannot be properly loaded and initialized. (snip) >This problem goes away if the program which calls dlopen is linked with >-lpthreads -lmach -lcxx -lc_r, but this seems ridiculous and unecessary. > >Does anyone know the true cause of this problem? Yes. I'm not an official Digital contact, and this isn't an official Digital response, and I'm a consultant, not an employee.... end of disclaimers. The problem is that the pthreads initialization stuff does not get invoked properly unless pthreads is linked into the main program. It's a known problem, and they're working on it. >Is DEC going to fix it? I believe so, though I couldn't comment on any availability release/date. -- Steve Huston CompuCraft CompuServe: 72133,2372 61 Nadeau Drive Internet: 72133.2372@CompuServe.COM Wrentham, MA 02093-1618 huston@icecub.ako.dec.com (508) 384-5770