tech-pkg archive

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

math/nlopt rb_tree* collides with libc

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

fwiw, the crash was:

Core was generated by `prusa-slicer'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000070b67185d940 in nil () from /usr/pkg/lib/
(gdb) bt
#0  0x000070b67185d940 in nil () from /usr/pkg/lib/
#1  0x000070b66896a67c in rb_tree_insert_node () from /usr/lib/
#2  0x000070b668e0cabb in pthread.init () from /usr/lib/
#3  0x000070b66896caca in _libc_init () from /usr/lib/
#4  0x000070b668841d64 in ?? () from /usr/lib/
#5  0x000070b671e12400 in ?? ()
#6  0x000070b66883ce39 in _init () from /usr/lib/
#7  0x0000000000000000 in ?? ()

Paul Ripke
"Great minds discuss ideas, average minds discuss events, small minds
 discuss people."
-- Disputed: Often attributed to Eleanor Roosevelt. 1948.

Home | Main Index | Thread Index | Old Index