tech-pkg archive

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

Re: math/nlopt rb_tree* collides with libc

Greg Troxel wrote:
> Paul Ripke <> writes:
> > 
> > In trying to get PrusaSlicer going, I tripped over the fact that
> > math/nlopt's built-in rb_tree implementation has symbols that collide
> > with NetBSD's implementation in libc.
> >
> > The following math/nlopt Makefile fragment works around the issue,
> > but I'm left wondering if there's an alternate solution to what must
> > be a fairly commonly seen issue?
> >
> > SUBST_CLASSES+=         rbtree
> > SUBST_FILES.rbtree+=    */*.[ch]
> > SUBST_MESSAGE.rbtree=   Changing rb_tree symbols that collide with NetBSD libc.
> > SUBST_SED.rbtree=       -e "s|rb_tree|nlopt_rb_tree|g"
> > SUBST_STAGE.rbtree=     post-extract  
> This seems reasonable to me, but it would be good to file a bug
> upstream.  I would expect this to collide on other BSDs as well.
> Technically, the namespace should be clean from all non-POSIX-required
> symbols, but that's a bit tilting-at-windmills.

This should at least be the case if the application explicitly defines
_POSIX_C_SOURCE (or _XOPEN_SOURCE respectively):

Otherwise there are OS specific symbols in the namespace not only on

Michael Bäuerle

Home | Main Index | Thread Index | Old Index