-flat_namespace and -undefined suppress

Joshua Root jmr at macports.org
Fri Oct 31 00:07:10 PDT 2008


Ryan Schmidt wrote:
> Joshua,
> 
> I saw many commits come through today with log messages like this:
> 
> On Oct 30, 2008, at 23:47, jmr at macports.org wrote:
> 
>> don't use -flat_namespace or -undefined suppress
> 
> Could you tell us a bit more about what the implications are here? Can
> you speculate about why that was in the portfiles in the first place,
> and tell us why you're removing it now? I've seen it in many portfiles
> and never really known why.

Correct me if I'm wrong on any of this, but this is my understanding of
the situation.

Before Panther, there was only flat namespace. The dynamic linker always
loaded symbols from the first-loaded library that defined them.

Panther introduced two-level namespace, which keeps track of which
library each symbol is meant to come from. Two-level namespace has been
the default for a long time now.

Specifying -flat_namespace was a compatibility hack that was often
needed back when Panther was new, for software that expected that
behaviour. Practically everything, including libtool, now does the right
thing with two-level namespace.

Forcing -flat_namespace these days is usually just a recipe for pain, as
seen in some recent tickets about php5 and libxml2.

I haven't been bumping revisions because it generally isn't causing
immediate issues, so telling everyone to recompile seems unwarranted.

- Josh


More information about the macports-dev mailing list