pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Workaround for NetBSD initial-exec and dlopen is not supported?

On Tue, 25 Aug 2015 13:38:22 +0200
Joerg Sonnenberger <> wrote:

> On Mon, Aug 24, 2015 at 08:54:45PM -0700, David Shao wrote:

> > gbm: failed to open any driver (search paths /usr/pkg/lib/dri)
> > gbm: Last dlopen error: /usr/pkg/lib/ Use of initialized
> > Thread Local Storage with model initial-exec and dlopen is not
> > supported
> > 
> > This potential problem on NetBSD was already noted in the comments for
> > the MesaLib port.  Has a workaround been found for this problem yet?
> But it is supported? You shouldn't do repeated dlopen/dlclose cycles,
> but dlopen with initial-exec of not too large size certainly works.

Background to this problem can be read here:

TLDR: use of initial-exec in dlopen'ed shared libraries is not very
portable and glibc has some hacks to make it sort of work.

Perhaps it is best to patch it to use the global dynamic access model
for now, accept the performance penalty and deal with this issue later.

Kind regards,

Home | Main Index | Thread Index | Old Index