Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Fix CI pipeline for MacOS arm64 target #1054

Open
3 tasks done
boneskewer69 opened this issue Feb 24, 2021 · 15 comments
Open
3 tasks done

Fix CI pipeline for MacOS arm64 target #1054

boneskewer69 opened this issue Feb 24, 2021 · 15 comments
Labels
bug Confirmed bugs. enhancement

Comments

@boneskewer69
Copy link

boneskewer69 commented Feb 24, 2021

Technical information

Using version:

  • latest (latest release, currently v2.2.6, arm64)

Running on:

  • macOS 11.2.1 (20D74), MacBook Air M1

How comfortable you are with your system and/or IT in general:

  • My machine is fully under my control, tell me what you need

Problem

I updated eDEX-UI by uninstalling the old one, downloading the new release from GitHub and copied the application into the application folder. When trying to launch eDEX-UI, I get the following warning:

Screenshot 2021-02-24 at 18 58 11

The Console Log (filtered by "eDEX-UI.app"):

default	19:02:14.882309+0100	lsd	Non-fatal error enumerating at <private>, continuing: Error Domain=NSCocoaErrorDomain Code=260 "The file “PlugIns” couldn’t be opened because there is no such file." UserInfo={NSURL=PlugIns/ -- file:///Applications/eDEX-UI.app/Contents/, NSFilePath=/Applications/eDEX-UI.app/Contents/PlugIns, NSUnderlyingError=0x12a605ed0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
default	19:02:14.882436+0100	lsd	- 45683955: Checking whether application is managed at file:///Applications/eDEX-UI.app//com.edex.ui
default	19:02:14.940917+0100	loginwindow	-[PersistentAppsSupport applicationReady:] | App: eDEX-UI.app, ready, updating active tracking timer
default	19:02:14.940973+0100	loginwindow	-[ApplicationManager checkInAppContext:eventData:] | ApplicationManager: Checked in app : eDEX-UI.app
default	19:02:14.946356+0100	tccd	AUTHREQ_ATTRIBUTION: msgID=350.35, attribution={accessing={identifier=Electron, pid=15282, auid=501, euid=501, binary_path=/Applications/eDEX-UI.app/Contents/MacOS/eDEX-UI}, requesting={identifier=com.apple.syspolicyd, pid=350, auid=0, euid=0, binary_path=/usr/libexec/syspolicyd}, },
default	19:02:14.948640+0100	runningboardd	Acquiring assertion targeting [app<application.com.edex.ui.12218393.12218586(501)>:15282] from originator [daemon<com.apple.coreservices.appleevents(55)>:478] with description <RBSAssertionDescriptor| "AE/eDEX-UI.app" ID:374-478-1726 target:15282 attributes:[
	<RBSDomainAttribute| domain:"com.apple.launchservicesd" name:"LSNotification" sourceEnvironment:"(null)">
	]>

What can I do to fix this?

@boneskewer69 boneskewer69 added the investigation Base triage label for bug reports. label Feb 24, 2021
@wrac4242
Copy link
Contributor

it looks like there is no file called /Applications/eDEX-UI.app/Contents/PlugIns
but could you try running from source

@GitSquared
Copy link
Owner

(and maybe try running the classic macos build, not the arm64)

@boneskewer69
Copy link
Author

The classic build works. But only through Rosetta. It would be cooler to have it run natively.

I installed npm via brew but wasn't able to get it to run. I'm missing something...

@wrac4242
Copy link
Contributor

what steps are you doing to get it to run?
try these instructions here

@GitSquared
Copy link
Owner

The classic build works. But only through Rosetta. It would be cooler to have it run natively.

Yeah, indeed. I think what we're experiencing on those builds is similar as #1051 - the GitHub Actions hardware that's building them cannot cross-compile to the target architecture correctly and so the build outputs are flawed.

In other words: need an M1 mac to build for M1 macs. Which is going to cost a lot of $$$ even if I'm just renting cloud instances.

@GitSquared
Copy link
Owner

Hyper, which is somewhat of a sister project to edex (same stack, terminal-wise), has an interesting thread about their own attempts to build mac m1 bins: vercel/hyper#5115

@GitSquared GitSquared added bug Confirmed bugs. enhancement and removed investigation Base triage label for bug reports. labels Mar 1, 2021
@GitSquared GitSquared changed the title macOS M1 | Application is damaged and can't be opened Fix CI pipeline for MacOS arm64 target Mar 1, 2021
@boneskewer69
Copy link
Author

Sorry for the late reply. So I downloaded the source code of the latest release and tried to run it as its described in the documentation.

what steps are you doing to get it to run?
try these instructions here

I haven't been able to run it successfully.
This is the console output. I've also attached the full log output.

boneskewer69@toka edex-ui-2.2.6 % npm run install-linux 

> [email protected] install-linux
> npm install && cd src && npm install && ./../node_modules/.bin/electron-rebuild -f -w node-pty && cd ..

npm ERR! code 1
npm ERR! path /Users/boneskewer69/Downloads/edex-ui-2.2.6/node_modules/lzma-native
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | arm64
npm ERR! gyp info find Python using Python version 3.9.2 found at "/opt/homebrew/opt/[email protected]/bin/python3.9"
npm ERR! gyp info spawn /opt/homebrew/opt/[email protected]/bin/python3.9
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/Users/boneskewer69/Downloads/edex-ui-2.2.6/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/boneskewer69/Downloads/edex-ui-2.2.6/node_modules/lzma-native/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/boneskewer69/Downloads/edex-ui-2.2.6/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/boneskewer69/Library/Caches/node-gyp/15.11.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/boneskewer69/Library/Caches/node-gyp/15.11.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/Users/boneskewer69/Downloads/edex-ui-2.2.6/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/boneskewer69/Library/Caches/node-gyp/15.11.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/boneskewer69/Downloads/edex-ui-2.2.6/node_modules/lzma-native',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: null
npm ERR! gyp ERR! stack     at ChildProcess.onCpExit (/Users/boneskewer69/Downloads/edex-ui-2.2.6/node_modules/node-gyp/lib/configure.js:351:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:378:20)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Darwin 20.3.0
npm ERR! gyp ERR! command "/opt/homebrew/Cellar/node/15.11.0/bin/node" "/Users/boneskewer69/Downloads/edex-ui-2.2.6/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /Users/boneskewer69/Downloads/edex-ui-2.2.6/node_modules/lzma-native
npm ERR! gyp ERR! node -v v15.11.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/boneskewer69/.npm/_logs/2021-03-07T14_57_50_956Z-debug.log

@wrac4242
Copy link
Contributor

wrac4242 commented Mar 7, 2021

could you post the logs?
(the file /Users/boneskewer69/.npm/_logs/2021-03-07T14_57_50_956Z-debug.log specifically)

@boneskewer69
Copy link
Author

Well i thought this link would work...

This is the console output. I've also attached the full log output.

@GitSquared
Copy link
Owner

I've seen that error a number of times, digging it up brings up this: addaleax/lzma-native#102 - not sure what we can do about it?

@GitSquared
Copy link
Owner

Unfortunately it looks like it's still a bit early for us to enable apple silicon builds.
What we need:

  • new Node.js LTS with m1-native bins
  • GitHub Actions macOS 11 images (currently in private beta) so I don't have to buy a Mac Mini just for this ;)

When we do have these upstream requirements it should be trivial to set up, I've already done some work on the linux cross-architecture builds which should help.

(Out of curiosity, could someone with an M1 post me the output of uname -a? I'm looking for the technical name of the cpu architecture that's used in compilers and such)

@evanbrierton
Copy link

@GitSquared

~ uname -a
Darwin Evans-MacBook-Pro-M1.local 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:06:51 PST 2021; root:xnu-7195.81.3~1/RELEASE_ARM64_T8101 arm64

@GitSquared
Copy link
Owner

Got it, thanks

@ghost

This comment has been minimized.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Confirmed bugs. enhancement
Projects
None yet
Development

No branches or pull requests

6 participants
@GitSquared @evanbrierton @wrac4242 @boneskewer69 and others