GitSquared / edex-ui

A cross-platform, customizable science fiction terminal emulator with advanced monitoring & touchscreen support.
GNU General Public License v3.0
40.49k stars 2.55k forks source link

Fix CI pipeline for MacOS arm64 target #1054

Open boneskewer69 opened 3 years ago

boneskewer69 commented 3 years ago

Technical information

Using version:

Running on:

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


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?

wrac4242 commented 3 years ago

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

GitSquared commented 3 years ago

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

boneskewer69 commented 3 years ago

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 commented 3 years ago

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

GitSquared commented 3 years ago

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 commented 3 years ago

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

boneskewer69 commented 3 years ago

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 

> edex-ui@2.2.6 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 node-gyp@7.1.2
npm ERR! gyp info using node@15.11.0 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.9.2 found at "/opt/homebrew/opt/python@3.9/bin/python3.9"
npm ERR! gyp info spawn /opt/homebrew/opt/python@3.9/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 commented 3 years ago

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

boneskewer69 commented 3 years ago

Well i thought this link would work...

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

GitSquared commented 3 years ago

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

GitSquared commented 3 years ago

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

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 commented 3 years ago

@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 commented 3 years ago

Got it, thanks

ghost commented 3 years ago

Ehehehehhehehehehheheh