help with g++-mp-4.5

Titus von Boxberg titus at
Mon Jun 6 23:16:44 PDT 2011

Hi all,

the seemingly trivial program

#include <iostream>
#include <cppunit/AdditionalMessage.h>
int	main(int argc, char ** argv)
	CppUnit::AdditionalMessage	am("hallo");
} // main

compiled with
g++-mp-4.5 -Wall -g -I/opt/local/include -L/opt/local/lib -o testgcc45 testgcc45.cpp -lcppunit

crashes on my machine with
testgcc45(94494) malloc: *** error for object 0x7fff70e93500: pointer being freed was not allocated

When compiled with g++-4.2 or clang++ (of macports) it works.
I'm unable to see anything relevant from the callstack.
I can produce the same problem with with a similarly trivial source using boost::filesystem::path.

The same problem is given here:

But I currently do not understand the problem.
And the "solution" given there as far as I get it would mean that
macport's c++ libraries are useless in conjunction with mp-g++?

Any help to understand the underlying problem is appreciated!
And any hint what triggered this problem, since it worked some time ago.



More information about the macports-dev mailing list