Re: [Boost-bugs] [Boost C++ Libraries] #11784: basic_xml_grammar.hpp

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11784: basic_xml_grammar.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-11-05 23:52:24

#11784: basic_xml_grammar.hpp
  Reporter: epsilonomega2k@… | Owner: ramey
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: serialization
   Version: Boost 1.59.0 | Severity: Problem
Resolution: invalid | Keywords:

Comment (by epsilonomega2k@…):

 This actually is a subtle problem on my platform and by extension I expect
 it to be a problem for some other people, so here are the details:

 The compiler/linker does not make the symbols created by the instantiation
 of basic_xml_grammar<char> inside xml_grammar.cpp available in They are available in
 libboost_serialization.a, so static linking is unaffected. I observed this
 by running nm -g -C on both libraries.

 To correct the problem for my local copy I just placed
 __attribute__ ((visibility ("default")))

 in the definitions of the member functions of basic_xml_grammar inside
 basic_xml_grammar.ipp . This forces the symbols to be placed inside the
 dynamic shared object library in the case of g++ (I am using g++ (Ubuntu
 4.8.4-2ubuntu1~14.04) 4.8.4).

 I am not versed enough in compilers, pragmas and such to recommend a
 solution in the generic case, but I suggest that someone at least manually
 check that these dynamic libraries export the symbols for the members of
 basic_xml_grammar<char> when the compilation is made with the latest
 versions of g++. One does not run into this problem until one tries link
 versus the dynamic libraries and I am not certain that anyone ever tested
 this before making the release, especially if this happens only on some
 compilers and not others.

Ticket URL: <>
Boost C++ Libraries <>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC