Got a bit of an interesting problem I encountered with Darwin and
building PHP the other day.  I brought this up on the php-dev list
and I'd like to consider what our options are to fixing this.

First off, Darwin requires that all modules be self-contained by
default.  So, if we try to build with PHP with apxs, we will get
symbol not defined errors for all of the apr and apr-util functions.

This can be turned off by -flat_namespace -undefined suppress - see
<[EMAIL PROTECTED]>.  But, for certain reasons
the PHP developers would prefer to use bundles instead - the
approach Apple uses outlined in Sander's post above.  So, we have
a few alternatives and I'd like to post them here to see what we
think the preferred solution is before replying on php-dev.

1) Tell PHP tough - they must use -flat_namespace.  Problem solved.
2) Teach PHP about apr-config and apu-config so that they know
where APR is and can link them when building the module.  I think
the problem would be solved.
3) Have APXS expose apr and apr-util in a consistent manner so
that it is possible to build self-contained libraries.

In email exchanges with a PHP developer (Marko?), he really didn't
like option 1 or 2.  He would like to see #3.  Personally, I say
#2, but I'd like to see what everyone else thinks.  -- justin

Reply via email to