Error [solved] with shared_dynamic_cast in opensaml2

Steven D. Brewer sbrewer at
Tue Feb 26 14:48:55 EST 2013

Building shibboleth-2.5.1 on a recent ubuntu, I ran into a problem
compiling opensaml-2.5.2 with boost-1.53:

> saml2/metadata/impl/EntityAttributesEntityMatcher.cpp: In constructor 'opensaml::saml2md::EntityAttributesEntityMatcher::EntityAttributesEntityMatcher(const xercesc_3_1::DOMElement*)':
> saml2/metadata/impl/EntityAttributesEntityMatcher.cpp:110:26: error: 'shared_dynamic_cast' is not a member of 'boost'
> saml2/metadata/impl/EntityAttributesEntityMatcher.cpp:110:62: error: expected primary-expression before '>' token
> make[2]: *** [EntityAttributesEntityMatcher.lo] Error 1

After a bit of googling, I found this URL:
which suggested that shared_dynamic_cast had been deprecated in favor of
dynamic_pointer_cast.  Holding my breath, I found the two instances of
> root at host:/usr/local/src/opensaml/opensaml-2.5.2/saml/saml2/metadata/impl# grep shared_dynamic *
> EntityAttributesEntityMatcher.cpp:        m_tags.push_back(boost::shared_dynamic_cast<Attribute>(obj));
> EntityAttributesMetadataFilter.cpp:            m_attributes.push_back(boost::shared_dynamic_cast<Attribute>(obj));

And I edited the files to change them to dynamic_pointer_cast:
> root at host:/usr/local/src/opensaml/opensaml-2.5.2/saml/saml2/metadata/impl# grep dynamic_pointer *
> EntityAttributesEntityMatcher.cpp:        m_tags.push_back(boost::dynamic_pointer_cast<Attribute>(obj));
> EntityAttributesMetadataFilter.cpp:            m_attributes.push_back(boost::dynamic_pointer_cast<Attribute>(obj));

And I was able to successfully build opensaml and shibboleth -- and
shibd appears, minimally, to start up and run without errors.  Whether
it actually works will require more testing.

Perhaps this is a well-known issue -- or is intuitively obvious to the
casual observer -- but I couldn't find any relevant pointers and,
therefore, respectfully report the (solved) issue to the list.


Steven D. BREWER <sbrewer at>
||   Director, Biology Computer Resource Center
||   Interim Director, Information Technology Program
Por ĉiu plezuro devas esti mezuro.

More information about the users mailing list