Symbols of static variables are deleted from object files and anyway can be replaced by plain static inline calls $ jade ld.so.1: openjade: fatal: relocation error: file /usr/lib/libostyle.so.0: symbol _ZN6OpenSP7LocNode3iidE: referenced symbol not found Killed --- openjade-1.3.2/spgrove/GroveBuilder.cxx.orig +++ openjade-1.3.2/spgrove/GroveBuilder.cxx @@ -5227,7 +5227,7 @@ bool BaseNode::queryInterface(IID iid, const void *&p) const { - if (iid == LocNode::iid) { + if (iid == LocNode::iid()) { const LocNode *ip = this; p = ip; return 1; --- openjade-1.3.2/spgrove/SdNode.h.orig +++ openjade-1.3.2/spgrove/SdNode.h @@ -26,10 +26,12 @@ getSd(ConstPtr &sd, ConstPtr &prologSyntax, ConstPtr &instanceSyntax) const = 0; - static const GROVE_NAMESPACE_SCOPE Node::IID iid; + SdNode() = default; + virtual ~SdNode() = default; + static inline const GROVE_NAMESPACE_SCOPE Node::IID iid() { return "SdNode"; } static const SdNode *convert(const GROVE_NAMESPACE_SCOPE NodePtr &nd) { const void *p; - if (nd && nd->queryInterface(iid, p)) + if (nd && nd->queryInterface(iid(), p)) return (const SdNode *)p; else return 0; --- openjade-1.3.2/spgrove/SdNode.cxx.orig +++ openjade-1.3.2/spgrove/SdNode.cxx @@ -13,8 +13,6 @@ using namespace GROVE_NAMESPACE; #endif -const Node::IID SdNode::iid = "SdNode"; - #ifdef SP_NAMESPACE } #endif --- openjade-1.3.2/grove/LocNode.h.orig +++ openjade-1.3.2/grove/LocNode.h @@ -22,10 +22,12 @@ class GROVE_API LocNode { public: virtual GROVE_NAMESPACE_SCOPE AccessResult getLocation(Location &) const = 0; - static const GROVE_NAMESPACE_SCOPE Node::IID iid; + LocNode() = default; + virtual ~LocNode() = default; + static inline const GROVE_NAMESPACE_SCOPE Node::IID iid() { return "LocNode"; } static const LocNode *convert(const GROVE_NAMESPACE_SCOPE NodePtr &nd) { const void *p; - if (nd && nd->queryInterface(iid, p)) + if (nd && nd->queryInterface(iid(), p)) return (const LocNode *)p; else return 0; --- openjade-1.3.2/grove/LocNode.cxx.orig +++ openjade-1.3.2/grove/LocNode.cxx @@ -13,8 +13,6 @@ using namespace GROVE_NAMESPACE; #endif -const Node::IID LocNode::iid = "LocNode"; - #ifdef SP_NAMESPACE } #endif