Created attachment 1136783 [details] sample cpp file to test compiling against openbabel Description of problem: The most recent openbabel-devel rpm package for Fedora 22 openbabel-devel-2.3.2-11 still has in /usr/include/openbabel-2.0/openbabel/shared_ptr.h #ifdef USE_BOOST #include <boost/shared_ptr.hpp> #define shared_ptr boost::shared_ptr #else #include <memory> #if __GNUC__ == 4 //&& __GNUC_MINOR__ < 3 removed at the suggestion of Konst antin Tokarev #include <tr1/memory> #endif using std::tr1::shared_ptr; #endif The current version of GCC on Fedora 22 is gcc-5.1.1-4.fc22 and it comes with shared_ptr in std. This has most likely been fixed already in OB source, but the rpm package is still in fedora repos and is unusable. The error message when trying to compile against openbabel-devel headers and library is: In file included from /usr/include/openbabel-2.0/openbabel/alias.h:19:0, from obtest.cpp:5: /usr/include/openbabel-2.0/openbabel/shared_ptr.h:27:14: error: ‘std::tr1’ has not been declared using std::tr1::shared_ptr; here is the trivial fix - put the following in #ifdef USE_BOOST #include <boost/shared_ptr.hpp> #define shared_ptr boost::shared_ptr #else #include <memory> #if __GNUC__ == 4 #include <tr1/memory> #endif #if __GNUC__ < 5 using std::tr1::shared_ptr; #else using std::shared_ptr; #endif #endif The user code will probably need to be compiled with -std=c++11 option. Version-Release number of selected component (if applicable): openbabel-devel-2.3.2-11 How reproducible: Always Steps to Reproduce: 1. Try to compile user code against openbabel-devel provided headers (see attached sample file). 2. g++ -o obtest -I/usr/include/openbabel-2.0/ obtest.cpp -lopenbabel 3. g++ -std=c++11 -o obtest -I/usr/include/openbabel-2.0/ obtest.cpp -lopenbabel Actual results: In file included from /usr/include/openbabel-2.0/openbabel/alias.h:19:0, from obtest.cpp:5: /usr/include/openbabel-2.0/openbabel/shared_ptr.h:27:14: error: ‘std::tr1’ has not been declared using std::tr1::shared_ptr; Expected results: compilation successful. Additional info: Attached a sample cpp file to test building against openbabel.
It does seem to work on F23+ with -std=c++11, so the bug affects F22 only. I'll try to apply your fix shortly.
openbabel-2.3.2-12.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-9e7cb1c296
openbabel-2.3.2-12.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-9e7cb1c296
openbabel-2.3.2-12.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.