[gmx-developers] C++ Address mangling

David van der Spoel spoel at xray.bmc.uu.se
Sun Dec 13 14:07:22 CET 2015


On 13/12/15 11:31, Robert McGibbon wrote:
> Hi,
>
> When I run them through c++filt, I see
>
> ```
>
> $ c++filt _ZN9OpenBabel5OBMol8NextBondERN9__gnu_cxx17__normal_iteratorIPPNS_6OBBondESt6vectorIS4_SaIS4_EEEE
> OpenBabel::OBMol::NextBond(__gnu_cxx::__normal_iterator<OpenBabel::OBBond**,  std::vector<OpenBabel::OBBond*,  std::allocator<OpenBabel::OBBond*>   >   >&)
>
> $ c++filt _ZN9OpenBabel5OBMol8NextBondERN11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPPNS_6OBBondENSt6__norm6vectorIS6_SaIS6_EEEEENSt7__debug6vectorIS6_SA_EEEE
> OpenBabel::OBMol::NextBond(__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<OpenBabel::OBBond**,  std::__norm::vector<OpenBabel::OBBond*,  std::allocator<OpenBabel::OBBond*>   >   >,  std::__debug::vector<OpenBabel::OBBond*,  std::allocator<OpenBabel::OBBond*>   >   >&)
>
> ```
>
> Looks like the difference is related to debug symbols, or separate
> namespaces being used for debug implementations.

Thanks for putting me on the right track! When I recompiled openbabel 
without Debug symbols (-DBUILD_TYPE=Release) it worked.

>
> -Robert
>
>
> On Sun, Dec 13, 2015 at 1:56 AM, David van der Spoel
> <spoel at xray.bmc.uu.se <mailto:spoel at xray.bmc.uu.se>> wrote:
>
>     Hi,
>
>     I'm trying to link my development branch to OpenBabel but have
>     problems with name mangling.
>
>     In openbabel
>     % nm libopenbabel.so | grep NextBond
>     00000000005f4c6a T
>     _ZN9OpenBabel5OBMol8NextBondERN11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPPNS_6OBBondENSt6__norm6vectorIS6_SaIS6_EEEEENSt7__debug6vectorIS6_SA_EEEE
>
>
>     In gromacs branch
>     % nm lib/libAlexandria.so | grep NextBond
>     U
>     _ZN9OpenBabel5OBMol8NextBondERN9__gnu_cxx17__normal_iteratorIPPNS_6OBBondESt6vectorIS4_SaIS4_EEEE
>
>     The compilers are the same in both cases (gcc-4.8.2)
>
>     Any clues why name mangling could be different?
>
>     Thanks!
>     --
>     David van der Spoel, Ph.D., Professor of Biology
>     Dept. of Cell & Molec. Biol., Uppsala University.
>     Box 596, 75124 Uppsala, Sweden. Phone: +46184714205
>     <tel:%2B46184714205>.
>     spoel at xray.bmc.uu.se <mailto:spoel at xray.bmc.uu.se>
>     http://folding.bmc.uu.se
>     --
>     Gromacs Developers mailing list
>
>     * Please search the archive at
>     http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List
>     before posting!
>
>     * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
>     * For (un)subscribe requests visit
>     https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers
>     or send a mail to gmx-developers-request at gromacs.org
>     <mailto:gmx-developers-request at gromacs.org>.
>
>
>
>


-- 
David van der Spoel, Ph.D., Professor of Biology
Dept. of Cell & Molec. Biol., Uppsala University.
Box 596, 75124 Uppsala, Sweden. Phone:	+46184714205.
spoel at xray.bmc.uu.se    http://folding.bmc.uu.se


More information about the gromacs.org_gmx-developers mailing list