| 14 | Two 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 | {{{ |
| 18 | 15:05 < minohaka> I got an m1 mac and python v3.10.0 installed through pyenv |
| 19 | 15:06 < minohaka> whenever I try to build the libs I get this error: AttributeError: module 'distutils' has no attribute 'sysconfig'. Did you mean: 'config'? |
| 20 | 15: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 | {{{ |
| 26 | 07: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'" |
| 27 | 07:31 < kumikumi> but I think there may still be some bigger obstacles ahead |
| 28 | }}} |
| 29 | |
| 30 | Both 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 | |
| 77 | |
| 78 | |
| 79 | ==== possible workaround |
| 80 | Adding 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 | |
| 97 | The 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]. |
| 98 | Hacky way for the time being to build Spidermonkey until `wraitii` moves 0 A.D. to SM91. |