Opened 4 years ago

Last modified 5 months ago

#61606 assigned defect

mozjs60: ERROR: virtualenv is not compatible with this system or executable

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: bigsur monterey Cc:
Port: mozjs60

Description

mozjs60 fails to build on arm64 because the build process uses a python virtualenv which is apparently not compatible with arm64.

https://build.macports.org/builders/ports-11_arm64-builder/builds/926/steps/install-dependencies/logs/stdio

Attachments (1)

main.log (67.4 KB) - added by cjones051073 (Chris Jones) 3 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 4 years ago by codesmythe (Rob Gowin)

This port uses an embedded copy of virtualenv to create a python2.7 virtual environment. On arm64, the created (copied?) python has an invalid code signature and is killed when run. This pull request: https://github.com/macports/macports-ports/pull/9898 adds a patch to ad-hoc code sign the created python executable on arm64.

After this patch, the mozjs60/arm64 fails because the configure environment assumes it is building on iphoneos when it detects an arm machine.

checking for hfs_tool... not found
checking for autoconf... /opt/local/bin/autoconf213
creating cache ./config.cache
checking host system type... arm-apple-darwin20.2.0
checking target system type... arm-apple-darwin20.2.0
checking build system type... arm-apple-darwin20.2.0
configure: error: iOS SDK 'iphoneos' could not be found.
ERROR: old-configure failed

comment:2 Changed 3 years ago by cjones051073 (Chris Jones)

This port now fails on intel as well....

` Oberon ~/Projects/MacPorts/ports > sudo port -v install mozjs60 ---> Computing dependencies for mozjs60. ---> Fetching archive for mozjs60 ---> mozjs60-60.8.0_0.darwin_21.x86_64.tbz2 doesn't seem to exist in /opt/local/var/macports/incoming/verified ---> Attempting to fetch mozjs60-60.8.0_0.darwin_21.x86_64.tbz2 from https://packages.macports.org/mozjs60

% Total % Received % Xferd Average Speed Time Time Time Current

Dload Upload Total Spent Left Speed

0 126 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0

---> Attempting to fetch mozjs60-60.8.0_0.darwin_21.x86_64.tbz2 from https://mse.uk.packages.macports.org/mozjs60

% Total % Received % Xferd Average Speed Time Time Time Current

Dload Upload Total Spent Left Speed

0 196 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0

---> Attempting to fetch mozjs60-60.8.0_0.darwin_21.x86_64.tbz2 from https://ema.uk.packages.macports.org/mozjs60

% Total % Received % Xferd Average Speed Time Time Time Current

Dload Upload Total Spent Left Speed

0 315 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0

---> Fetching distfiles for mozjs60 ---> Verifying checksums for mozjs60 ---> Checksumming mozjs-60.8.0.tar.bz2 ---> Extracting mozjs60 ---> Extracting mozjs-60.8.0.tar.bz2 Executing: cd "/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work" && /usr/bin/bzip2 -dc '/opt/local/var/macports/distfiles/mozjs60/mozjs-60.8.0.tar.bz2' | /usr/bin/tar -xf - ---> Applying patches to mozjs60 ---> Applying patch-js.pc.in.diff Executing: cd "/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0" && /usr/bin/patch -p0 < '/Users/chris/Projects/MacPorts/ports/lang/mozjs60/files/patch-js.pc.in.diff' patching file js/src/build/js.pc.in ---> Applying patch-js-config.in.diff Executing: cd "/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0" && /usr/bin/patch -p0 < '/Users/chris/Projects/MacPorts/ports/lang/mozjs60/files/patch-js-config.in.diff' patching file js/src/build/js-config.in ---> Applying patch-virtualenv-arm64-codesign.diff Executing: cd "/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0" && /usr/bin/patch -p0 < '/Users/chris/Projects/MacPorts/ports/lang/mozjs60/files/patch-virtualenv-arm64-codesign.diff' patching file third_party/python/virtualenv/virtualenv.py ---> Patching rules.mk: s|@executable_path|/opt/local/lib|g ---> Configuring mozjs60 Executing: cd "/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0/js/src/obj" && ../configure --prefix=/opt/local --with-system-nspr --disable-readline --host=x86_64-apple-darwin21 --target=x86_64-apple-darwin21 Creating Python environment New python executable in /opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0/js/src/obj/_virtualenv/bin/python ERROR: The executable /opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0/js/src/obj/_virtualenv/bin/python is not functioning ERROR: It thinks sys.prefix is u'/opt/local/Library/Frameworks/Python.framework/Versions/2.7' (should be u'/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0/js/src/obj/_virtualenv') ERROR: virtualenv is not compatible with this system or executable Traceback (most recent call last):

File "../../../configure.py", line 127, in <module>

sys.exit(main(sys.argv))

File "../../../configure.py", line 29, in main

sandbox.run(os.path.join(os.path.dirname(file), 'moz.configure'))

File "/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0/python/mozbuild/mozbuild/configure/init.py", line 399, in run

self.include_file(path)

File "/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0/python/mozbuild/mozbuild/configure/init.py", line 390, in include_file

exec_(code, self)

File "/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0/python/mozbuild/mozbuild/util.py", line 59, in exec_

exec(object, globals, locals)

File "/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0/moz.configure", line 7, in <module>

include('build/moz.configure/init.configure')

File "/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0/python/mozbuild/mozbuild/configure/init.py", line 694, in include_impl

self.include_file(what)

File "/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0/python/mozbuild/mozbuild/configure/init.py", line 390, in include_file

exec_(code, self)

File "/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0/python/mozbuild/mozbuild/util.py", line 59, in exec_

exec(object, globals, locals)

File "/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0/build/moz.configure/init.configure", line 207, in <module>

@imports('distutils.sysconfig')

File "/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0/python/mozbuild/mozbuild/configure/init.py", line 677, in decorator

depends = DependsFunction(self, func, dependencies, when=when)

File "/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0/python/mozbuild/mozbuild/configure/init.py", line 96, in init

sandbox._value_for(self)

File "/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0/python/mozbuild/mozbuild/configure/init.py", line 474, in _value_for

return self._value_for_depends(obj, need_help_dependency)

File "/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0/python/mozbuild/mozbuild/util.py", line 944, in method_call

cache[args] = self.func(instance, *args)

File "/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0/python/mozbuild/mozbuild/configure/init.py", line 483, in _value_for_depends

return obj.result(need_help_dependency)

File "/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0/python/mozbuild/mozbuild/util.py", line 944, in method_call

cache[args] = self.func(instance, *args)

File "/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0/python/mozbuild/mozbuild/configure/init.py", line 123, in result

return self._func(*resolved_args)

File "/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0/python/mozbuild/mozbuild/configure/init.py", line 1003, in wrapped

return new_func(*args, kwargs)

File "/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0/build/moz.configure/init.configure", line 255, in virtualenv_python

manager.build(python)

File "/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0/python/mozbuild/mozbuild/virtualenv.py", line 439, in build

self.create(python)

File "/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0/python/mozbuild/mozbuild/virtualenv.py", line 203, in create

'Failed to create virtualenv: %s' % self.virtualenv_root)

Exception: Failed to create virtualenv: /opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0/js/src/obj/_virtualenv Command failed: cd "/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0/js/src/obj" && ../configure --prefix=/opt/local --with-system-nspr --disable-readline --host=x86_64-apple-darwin21 --target=x86_64-apple-darwin21 Exit code: 1 Error: Failed to configure mozjs60: consult /opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0/js/src/obj/config.log Error: Failed to configure mozjs60: configure failure: command execution failed Error: See /opt/local/var/macports/logs/_Users_chris_Projects_MacPorts_ports_lang_mozjs60/mozjs60/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. Error: Processing of port mozjs60 failed `

Version 0, edited 3 years ago by cjones051073 (Chris Jones) (next)

Changed 3 years ago by cjones051073 (Chris Jones)

Attachment: main.log added

comment:3 Changed 3 years ago by jmroot (Joshua Root)

Keywords: bigsur monterey added; arm64 removed

comment:4 Changed 3 years ago by breadncup

this blocks to get emacs with xwidget variant.

comment:5 Changed 3 years ago by halogeno

pidgin also depends on mozjs60 and can't be installed.

comment:6 Changed 3 years ago by someuser12

FWIW, it seems mozjs78 can be built on arm64 (and then policykit also builds), see https://github.com/macports/macports-ports/pull/13652. Maybe it can be a solution to install at least some of the ports which depend on mozjs60?

comment:7 Changed 3 years ago by evanmiller (Evan Miller)

Cc: evanmiller added

comment:8 Changed 5 months ago by evanmiller (Evan Miller)

Cc: evanmiller removed
Note: See TracTickets for help on using tickets.