Changes between Version 2 and Version 3 of Ticket #6474


Ignore:
Timestamp:
Mar 27, 2022, 10:16:03 AM (2 years ago)
Author:
Langbart
Comment:

possible workaround

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #6474 – Description

    v2 v3  
    1212Why could I build SM 2 weeks ago and now it fails?
    1313
     14Two players (`minohaka` and `minohaka`) have also reported this issue.
     15* IRC 0ad-dev [https://irclogs.wildfiregames.com/%230ad-dev/2022-03-26-QuakeNet-%230ad-dev.log 26/Mar/22]
     16
     17{{{
     1815:05 < minohaka> I got an m1 mac and python v3.10.0 installed through pyenv
     1915:06 < minohaka> whenever I try to build the libs I get this error: AttributeError: module 'distutils' has no attribute 'sysconfig'. Did you mean: 'config'?
     2015:07 <@Stan> Hey minohaka
     21}}}
     22
     23* IRC 0ad-dev - [https://irclogs.wildfiregames.com/%230ad-dev/2022-03-13-QuakeNet-%230ad-dev.log 13/Mar/22]
     24
     25{{{
     2607:31 < kumikumi> I spent some time today trying to build the latest release on M1, with not particularly high expectations. I had to upgrade some dependencies and I tried to do something with python and virtualenv, now I'm stuck at "AttributeError: module 'distutils' has no attribute 'sysconfig'"
     2707:31 < kumikumi> but I think there may still be some bigger obstacles ahead
     28}}}
     29
     30Both players also tested the special [https://github.com/wraitii/0ad/tree/esr91-0AD wraitii/0ad/tree/esr91-0AD] branch from `wraitii` and the issue did not occur there.\\
     31
     32
    1433==== Traceback
    15 
    1634{{{
    1735Traceback (most recent call last):
     
    5775ERROR: Error building spidermonkey
    5876}}}
     77
     78
     79==== possible workaround
     80Adding the following lines to [https://code.wildfiregames.com/source/0ad/browse/ps/trunk/libraries/source/spidermonkey/FixMacBuild.diff FixMacBuild.diff] solved the problem for me and made it possible to build Spidermonkey.
     81
     82{{{
     83--- a/build/moz.configure/init.configure
     84+++ b/build/moz.configure/init.configure
     85@@ -375,9 +375,6 @@
     86         sys.exit(subprocess.call([python] + sys.argv))
     87 
     88     # We are now in the virtualenv
     89-    if not distutils.sysconfig.get_python_lib():
     90-        die('Could not determine python site packages directory')
     91-
     92     str_version = '.'.join(str(v) for v in version)
     93 
     94     return namespace(
     95}}}
     96
     97The lines were also removed by `mhentges (Mitchell Hentges)` with diff [https://phabricator.services.mozilla.com/D129863 D129863 - Bug 1730712: Use consistent Python version throughout configure].
     98Hacky way for the time being to build Spidermonkey until `wraitii` moves 0 A.D. to SM91.