MACOSX_DEPLOYMENT_TARGET mismatch when installing mozmill on 10.7 machines

RESOLVED FIXED in Thunderbird 15.0

Status

Thunderbird
Testing Infrastructure
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: standard8, Assigned: standard8)

Tracking

Trunk
Thunderbird 15.0
All
Mac OS X
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
Created attachment 619883 [details] [diff] [review]
The fix

The mac machines that Firefox uses have Python 2.7 which is configured for a MACOSX_DEPLOYMENT_TARGET of 10.7. However, when we come along doing cross-compiles back to 10.5 or 10.6, it complains with:

distutils.errors.DistutilsPlatformError: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.5" but "10.7" during configure
Failure to install virtualenv

As this is just the installation/set-up of virtualenv and that env is going to be run on 10.7 boxes, then I think it is safe to just clear MACOSX_DEPLOYMENT_TARGET - it won't affect the Thunderbird build, and it shouldn't affect the mode the executable is run in, it is just all python stuff.
Attachment #619883 - Flags: review?(jhopkins)
ugh :(
(Assignee)

Comment 2

5 years ago
Comment on attachment 619883 [details] [diff] [review]
The fix

I got rs from Callek for this over irc.
Attachment #619883 - Flags: review?(jhopkins)
(Assignee)

Comment 3

5 years ago
Checked in:

https://hg.mozilla.org/comm-central/rev/f1fe5128601e
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
(Assignee)

Updated

5 years ago
Target Milestone: --- → Thunderbird 15.0
This in turn is breaking my local build and also the mac calendar builder with the following traceback:

Traceback (most recent call last):

  File "<string>", line 1, in <module>
  File "/var/folders/h2/7nps6bvn5h33xdx61v7lrfpm0000gp/T/pip-6lYzCc-build/setup.py", line 88, in <module>
    run_setup(not IS_PYPY)
  File "/var/folders/h2/7nps6bvn5h33xdx61v7lrfpm0000gp/T/pip-6lYzCc-build/setup.py", line 84, in run_setup
    cmdclass={'build_ext': ve_build_ext},
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/builds/slave/ca-macosx64-nightly/build/objdir-tb/i386/mozilla/_tests/mozmill-virtualenv/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/install.py", line 56, in run
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install.py", line 563, in run
    self.run_command('build')
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build.py", line 127, in run
    self.run_command(cmd_name)
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/var/folders/h2/7nps6bvn5h33xdx61v7lrfpm0000gp/T/pip-6lYzCc-build/setup.py", line 53, in run
    build_ext.run(self)
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build_ext.py", line 339, in run
    self.build_extensions()
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build_ext.py", line 448, in build_extensions
    self.build_extension(ext)
  File "/var/folders/h2/7nps6bvn5h33xdx61v7lrfpm0000gp/T/pip-6lYzCc-build/setup.py", line 59, in build_extension
    build_ext.build_extension(self, ext)
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build_ext.py", line 498, in build_extension
    depends=ext.depends)
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/ccompiler.py", line 572, in compile
    self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/unixccompiler.py", line 178, in _compile
    extra_postargs)
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/ccompiler.py", line 873, in spawn
    spawn(cmd, dry_run=self.dry_run)
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/spawn.py", line 34, in spawn
    _spawn_posix(cmd, search_path, dry_run=dry_run)
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/spawn.py", line 122, in _spawn_posix
    if _cfg_target_split > [int(x) for x in cur_target.split('.')]:
ValueError: invalid literal for int() with base 10: ''

Looking at spawn.py cur_target is filled using os.environ.get('MACOSX_DEPLOYMENT_TARGET', _cfg_target)

So I see two options fixing this:

1. Install self-compiled python 2.7 on the 10.7 machines that deploys to 10.5. The actual process is easy, i just did this on our mac machine

2. Try to use unset to really unset the value, so it defaults to the configured deployment target.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Created attachment 641571 [details] [diff] [review]
Another fix

This is the fix I was talking about. It works for the calendar mac builder.
Attachment #641571 - Flags: review?(bugspam.Callek)
Attachment #641571 - Flags: review?(bugspam.Callek) → review?(mbanner)
(Assignee)

Updated

5 years ago
Attachment #641571 - Flags: review?(mbanner) → review+
(Assignee)

Comment 6

5 years ago
(although generally this sort of follow-up should be on a separate bug as this did fix the instance it reported, and this has already been on a branch).
Depends on: 774203
Comment on attachment 641571 [details] [diff] [review]
Another fix

I've moved this patch to bug 774203, sorry for reopening this one.
Attachment #641571 - Attachment is obsolete: true
Status: REOPENED → RESOLVED
Last Resolved: 5 years ago5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.