[lxml-dev] lxml Mac installation idea

Mark Bestley lxml{ at bestley.co.uk
Wed Nov 12 11:45:32 CET 2008


Guntsche Michael <mike at it-loops.com> writes:

> On Nov 11, 2008, at 21:47, Stefan Behnel wrote:
>
>> Hi,
>>
>> Guntsche Michael wrote:

> If you use distutils or setuptools the flags are added automatically.  
> I quickly looked at distutils and saw that you could check for a
> the UNIVERSALSDK config_var
>
>  >>> from distutils import sysconfig
>  >>> sysconfig.get_config_var('UNIVERSALSDK')
> '/Developer/SDKs/MacOSX10.4u.sdk'
>
> which should be empty on non-Universal Binary builds.
>
well it is set on my macports 2.5 single architecture, a 2.6 dual from
python.org but not on Apple's dual system one ;( (+ we need Tiger's 2.3
etc )

>
>> 2) how do you configure the build of libxml2/libxslt/libiconv to be  
>> universal?
>> Mark wrote that "-arch i386 -arch ppc" will do the trick. Is that  
>> the right
>> way of doing it?
> you need
>
> -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
>
> in CFLAGS and LDFLAGS, isysroot is needed if you are building on a PPC  
> machine.
> Furthermore you need to pass the "--disable-dependency-tracking"  
> switch to ./configure, since this does not work with universal builds  
> of the library.
> This way you can get a static and dynamic library in Universal Binary  
> form.
>
> Example:
> ========
>
> CFLAGS="-arch i386 -arch ppc" LDFLAGS="-arch i386 -arch ppc" ./ 
> configure --without-python --disable-dependency-tracking --disable- 
> shared
>
> for libxslt and static libs.
>

Seemes to for the command line you gave but not with the isysroot
variable set.
Apple's docs are not consistant
<http://developer.apple.com/documentation/DeveloperTools/Conceptual/cross_development/Using/chapter_3_section_2.html>
says set isysroot but python specific docs say it is not
<http://developer.apple.com/releasenotes/OpenSource/PerlExtensionsRelNotes/>

So I'll leave for the time being.

-- 
Mark



More information about the lxml-dev mailing list