apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@gmail.com>
Subject Re: Mac OS X Universal builds and APR
Date Sun, 18 Oct 2009 17:00:47 GMT
On Sun, Oct 18, 2009 at 11:58 AM, Jim Jagielski <jim@jagunet.com> wrote:
>
> On Oct 18, 2009, at 11:11 AM, Barry Scott wrote:
>
>> I'm the author of pysvn that depends on subversion that depends on APR.
>>
>> The convient way to build universal binaries on the Mac is to use -arch.
>> For example
>> to get a binary that is 32bit and 64bit:
>>
>>        gcc -arch i386 -arch x86_64
>>
>> This works so long as the code that is being compile is portable between
>> the
>> arch chosen.
>>
>> I have found that I cannot build subversion as a Mac OS X Universal binary
>> because of none portable code in apr.h created by configure.
>>
>> apr.h is configured for 32bit or 64bit and that causes either 32bit or
>> 64bit to
>> fail.
>>
>> Items that would need to handled are:
>>
>> apr_int64_t aways define as long long on Mac.
>>
>> APR_SIZEOF_VOIDP would need to be set based on preprocessor symbols.
>>
>> I'm sure there are more issues that I have not noticed.
>>
>> Are you aware of these issues?
>>
>> Do you consider they need fixing?

To solve the apr.h issue you can use diff to build a merged version of
apr.h after performing separate 32-bit and 64-bit builds (diff -D
some-symbol 32-bit/apr.h 64-bit/apr.h >merged/apr.h", where
some-symbol is whatever the compiler provides to select between 32-bit
and 64-bit).

I don't think anybody has spelled out explicitly how to run the apr
and apr-util builds and merge all necessary headers and so forth (not
that it is complicated, but it would be useful as a FAQ...).  (In
addition to the apr.h issues you outline, some of the APU_HAVE_foo in
apu.h could differ between 32-bit and 64-bit as well.)

(sticking with just plain Leopard for now ;) )

Mime
View raw message