[MacPorts] #22234: gcc44 should use --enable-fully-dynamic-string
MacPorts
noreply at macports.org
Sun Oct 25 01:02:15 PDT 2009
#22234: gcc44 should use --enable-fully-dynamic-string
--------------------------------+-------------------------------------------
Reporter: jwiegley@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone: MacPorts 1.8.2
Component: ports | Version: 1.8.1
Keywords: | Port: gcc44
--------------------------------+-------------------------------------------
Because Snow Leopard has been built with _GLIBCXX_FULLY_DYNAMIC_STRING
(see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41645), the gcc ports for
10.6 must also. Otherwise, you will get fatal errors if you obtain an
empty string from the standard library and then pass it to any library or
executable built with your MacPorts gcc. This code, using the "boost"
port, demonstrates the problem:
{{{
#include <string>
#include <sstream>
#include <boost/variant.hpp>
int main()
{
std::ostringstream buf;
boost::variant<bool, std::string> data;
data = buf.str();
data = false;
return 0;
}
}}}
The empty string from ostringstream is different from the empty string as
known by Boost, so it will try to deallocate it when the variant changes
kind. This is fatal if fully dynamic strings are disabled.
The solution is to add --enable-fully-dynamic-string to the Portfile.
--
Ticket URL: <http://trac.macports.org/ticket/22234>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list