[MacPorts] #15750: build libxml2 with two-level namespace

MacPorts noreply at macports.org
Thu Jun 26 12:22:40 PDT 2008


#15750: build libxml2 with two-level namespace
---------------------------------+------------------------------------------
  Reporter:  ricci at macports.org  |       Owner:  macports-tickets at lists.macosforge.org
      Type:  defect              |      Status:  new                                  
  Priority:  Normal              |   Milestone:  Port Bugs                            
 Component:  ports               |     Version:  1.6.0                                
Resolution:                      |    Keywords:                                       
---------------------------------+------------------------------------------
Comment (by ricci at macports.org):

 Well, it is related to auto*/configure/libtool, so it is kinda magic (the
 dark kind...).
         Something in the libxml2 package (sorry, I'm not remembering what
 it was for libxml2, been diving into too many different packages recently)
 doesn't understand which rev. of Mac OS X (darwin) its running on (and
 doesn't seem to pick up MACOSX_DEPLOYMENT_TARGET to know), so sets
 -flat_namespace.  This results in binaries linked against MP libxml2 that
 will pull in both MP libxml2 (via the linking they have) and the system-
 installed libxml2 (via other libs they use, including system frameworks).
 Then while running the binary will call functions in the "wrong" libxml2,
 resulting in crashes.
         Redoing the autoconf stuff teaches/fixes "it" (configure or
 libtool I think) to not include -flat_namespace, and all is good.
         You can check if a dylib is built with two-level namespace with:

                 otool -hv PATH/TO/LIBRARY

         and look in the 'flags' section, there should be a 'TWOLEVEL' word
 in there if it was built with two-level namespace.


                         -eric

-- 
Ticket URL: <http://trac.macports.org/ticket/15750#comment:3>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list