Last Comment Bug 750652 - MACOSX_DEPLOYMENT_TARGET mismatch when installing mozmill on 10.7 machines
: MACOSX_DEPLOYMENT_TARGET mismatch when installing mozmill on 10.7 machines
Status: RESOLVED FIXED
:
Product: Thunderbird
Classification: Client Software
Component: Testing Infrastructure (show other bugs)
: Trunk
: All Mac OS X
: -- normal (vote)
: Thunderbird 15.0
Assigned To: Mark Banner (:standard8) (afk until 26th July)
:
Mentors:
Depends on: 774203
Blocks: 748628
  Show dependency treegraph
 
Reported: 2012-05-01 03:08 PDT by Mark Banner (:standard8) (afk until 26th July)
Modified: 2012-07-16 01:51 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
The fix (630 bytes, patch)
2012-05-01 03:08 PDT, Mark Banner (:standard8) (afk until 26th July)
no flags Details | Diff | Splinter Review
Another fix (599 bytes, patch)
2012-07-12 13:12 PDT, Philipp Kewisch [:Fallen]
standard8: review+
Details | Diff | Splinter Review

Description Mark Banner (:standard8) (afk until 26th July) 2012-05-01 03:08:36 PDT
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.
Comment 1 Siddharth Agarwal [:sid0] (inactive) 2012-05-01 03:09:44 PDT
ugh :(
Comment 2 Mark Banner (:standard8) (afk until 26th July) 2012-05-01 06:48:45 PDT
Comment on attachment 619883 [details] [diff] [review]
The fix

I got rs from Callek for this over irc.
Comment 3 Mark Banner (:standard8) (afk until 26th July) 2012-05-02 07:51:22 PDT
Checked in:

https://hg.mozilla.org/comm-central/rev/f1fe5128601e
Comment 4 Philipp Kewisch [:Fallen] 2012-07-12 13:04:41 PDT
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.
Comment 5 Philipp Kewisch [:Fallen] 2012-07-12 13:12:37 PDT
Created attachment 641571 [details] [diff] [review]
Another fix

This is the fix I was talking about. It works for the calendar mac builder.
Comment 6 Mark Banner (:standard8) (afk until 26th July) 2012-07-16 01:33:26 PDT
(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).
Comment 7 Philipp Kewisch [:Fallen] 2012-07-16 01:51:08 PDT
Comment on attachment 641571 [details] [diff] [review]
Another fix

I've moved this patch to bug 774203, sorry for reopening this one.

Note You need to log in before you can comment on or make changes to this bug.