[Xapian-discuss] Mac OS X building...
Chris McDonough
chrism at plope.com
Sun Sep 18 20:36:39 BST 2005
>> Then, in the "make" step, I needed to ensure that the environment
>> variable "MACOSX_DEPLOYMENT_TARGET" was set to "10.3".
>>
>>
>
> I believe that only this last step is needed, i.e.:
>
>
>
>> $ MACOSX_DEPLOYMENT_TARGET=10.3 make
>>
>>
>
> If you do this, libtool should pass "-undefined dynamic_lookup"
> automatically.
>
Aha. Excellent, thank you. I should have searched for "tiger" in
the Gmane archives! ;-)
> It's unclear to me if xapian should force this to be set always, or if
> we detect 10.3 or newer, or what. The environment variable name
> suggests that it depends what platform the code is to be deployed on
> but it may be poorly named...
>
Some Python setup code from the SciPy project does this:
if sys.platform=='darwin':
target = os.environ.get('MACOSX_DEPLOYMENT_TARGET', None)
if target is None:
target = '10.3'
major, minor = target.split('.')
if int(minor) < 3:
minor = '3'
warnings.warn('Environment variable '
'MACOSX_DEPLOYMENT_TARGET reset to 10.3')
os.environ['MACOSX_DEPLOYMENT_TARGET'] = '%s.%s' % (major,
minor)
opt.extend(['-undefined', 'dynamic_lookup', '-bundle'])
else:
opt.append("-shared")
Where "opts" are the linker flags, though as you say maybe that's
unnecessary. I have no idea whether this is correct. Given that
most folks are probably running either Panther (10.3) or Tiger (10.4)
nowadays, it would probably work for more people than it would not.
> Any further insight would be welcome. Otherwise all I can safely do
> is to document the need to set MACOSX_DEPLOYMENT_TARGET in future
> releases.
>
Yep, thanks. I don't know either.
- C
More information about the Xapian-discuss
mailing list