First off, let me say that I understand that what I’m trying to do is not officially supported.
I am attempting to build Aether from git master on Arch Linux. Backend and Frontend build correctly with a few makefile tweaks.
Makefile diff:
diff --git a/aether/makefile b/aether/makefile
index 39e7c80..2352d65 100644
--- a/aether/makefile
+++ b/aether/makefile
@@ -132,7 +132,7 @@ ARM64=GOARCH=arm64
ARM32=GOARCH=arm
# Cross-compile flags
-CCFLAGS_LINUX_X64=CC=x86_64-linux-musl-gcc CXX=x86_64-linux-musl-g++
+CCFLAGS_LINUX_X64=CC=gcc CXX=g++
CCFLAGS_LINUX_X86=CC=i486-linux-musl-gcc CXX=i486-linux-musl-g++
CCFLAGS_LINUX_ARM64=CC=aarch64-linux-musl-gcc CXX=aarch64-linux-musl-g++
CCFLAGS_LINUX_ARM32=CC=arm-linux-musleabi-gcc CXX=arm-linux-musleabi-g++
@@ -173,8 +173,7 @@ LINUX_ARM32_NAME=-linux-arm32
## Desktop
compile-mac: compile-mac-x64 move-mac-x64-be move-mac-x64-fe
compile-win: compile-win-x64 compile-win-x86 move-win-x64-be move-win-x64-fe move-win-x86-be move-win-x86-fe
-compile-linux: compile-linux-x64 compile-linux-x86 compile-linux-arm64 compile-linux-arm32 move-linux-x64-be move-linux-x64-fe move-linux-x86-be move-linux-x86-fe move-linux-arm64-be move-linux-arm64-fe move-linux-arm32-be move-linux-arm32-fe
-
+compile-linux: compile-linux-x64 move-linux-x64-be move-linux-x64-fe
## Server
# compile-linux-extv-server: compile-linux-x64-extverify-be move-linux-x64-extverify-be compress-linux-x64-extverify-be version-linux-x64-extverify-be
# compile-linux-server: compile-linux-x64-be move-linux-x64-be compress-linux-x64-be version-linux-x64-be
Basic methodology is to replace the cross compile toolchain with just the native gcc install. Note that you do need the binutils
package installed, heck, just install the whole base-devel
group if you haven’t already.
You also will need to install go
and upx
. No AUR packages needed, all of these packages are in the core repositories.
If you are using Arch Linux 32
You should define the compile-linux
target to use the x86 targets instead of the x64 ones
Then we have building the client.
I have not gotten this working yet!
Basically, Arch Linux packages a newer version of Node.js than @b is using to develop Aether.
This causes issues with installing the node.js grpc package. The solution is to use a newer version of the grpc package. Another issue is that the git version number that is generated is not acceptable to Node.js. I don’t know why it cares. Here are my steps so far. Note that for these steps you must have the docker
package installed, you must start the docker service AND you must be in the docker
group. If one of these is not true, this will fail.
Here are the changes I made to aether/aether/client/package.json
:
diff --git a/aether/client/package.json b/aether/client/package.json
index b35e794..1d3f67e 100644
--- a/aether/client/package.json
+++ b/aether/client/package.json
@@ -1,6 +1,6 @@
{
"name": "Aether",
- "version": "2.0.0-dev.6+1811211332.746ec27e.d",
+ "version": "1.0.0",
"description": "Aether",
"readme": "https://getaether.net",
"main": "src/app/mainmain.js",
@@ -13,15 +13,16 @@
"wpwatch": "webpack --watch",
"dist-mac": "npm run update-version-string && electron-builder --mac -c.extraMetadata.version=$(node ./buildresources/get-version-from-git.js print)",
"dist-win": "npm run update-version-string && electron-builder --win -c.extraMetadata.version=$(node ./buildresources/get-version-from-git.js print)",
- "dist-linux-docker-trigger": "electron-builder --linux -c.extraMetadata.version=$BVERSION",
+ "dist-linux-docker-trigger": "npx electron-builder --linux -c.extraMetadata.version=$BVERSION",
"dist-linux-docker-install-deps": "docker run --rm -ti --env ELECTRON_CACHE=\"/root/.cache/electron\" --env ELECTRON_BUILDER_CACHE=\"/root/.cache/electron-builder\" -v ${PWD}:/project -v ${PWD}/../../../BundledReleases:/BundledReleases -v ${PWD##*/}-node-modules:/project/node_modules -v ~/.cache/electron:/root/.cache/electron -v ~/.cache/electron-builder:/root/.cache/electron-builder electronuserland/builder:10 npm install",
"dist-linux": "npm run update-version-string && docker run --rm -ti --env ELECTRON_CACHE=\"/root/.cache/electron\" --env ELECTRON_BUILDER_CACHE=\"/root/.cache/electron-builder\" -v ${PWD}:/project -v ${PWD}/../../../BundledReleases:/BundledReleases -v ${PWD}/../../../ReleaseArchive:/ReleaseArchive -v ${PWD##*/}-node-modules:/project/node_modules -v ${PWD}/../../../.git:/project/.git -v ~/.cache/electron:/root/.cache/electron -v ~/.cache/electron-builder:/root/.cache/electron-builder -e BVERSION=$(node ./buildresources/get-version-from-git.js print) electronuserland/builder:10 npm run dist-linux-docker-trigger",
"dist-linux-server": "VERSIONATSTART=$(node ./buildresources/get-version-from-git.js print) && mv ./MAKE_BINARIES/aether-backend-linux-x64 ./MAKE_BINARIES/aether-backend-linux-x64-$VERSIONATSTART 2> /dev/null || true && node ./buildresources/aftercompile.js run && mv ./MAKE_BINARIES/aether-backend-linux-x64-extverify ./MAKE_BINARIES/aether-backend-linux-x64-extverify-$VERSIONATSTART 2> /dev/null || true && node ./buildresources/aftercompile.js run",
"dist": "npm run update-version-string && VERSIONATSTART=$(node ./buildresources/get-version-from-git.js print) && electron-builder --mac --win -c.extraMetadata.version=$VERSIONATSTART && docker run --rm -ti --env ELECTRON_CACHE=\"/root/.cache/electron\" --env ELECTRON_BUILDER_CACHE=\"/root/.cache/electron-builder\" -v ${PWD}:/project -v ${PWD}/../../../BundledReleases:/BundledReleases -v ${PWD}/../../../ReleaseArchive:/ReleaseArchive -v ${PWD##*/}-node-modules:/project/node_modules -v ${PWD}/../../../.git:/project/.git -v ~/.cache/electron:/root/.cache/electron -v ~/.cache/electron-builder:/root/.cache/electron-builder -e BVERSION=$VERSIONATSTART electronuserland/builder:10 npm run dist-linux-docker-trigger && mv ./MAKE_BINARIES/aether-backend-linux-x64 ./MAKE_BINARIES/aether-backend-linux-x64-$VERSIONATSTART 2> /dev/null || true && node ./buildresources/aftercompile.js run && mv ./MAKE_BINARIES/aether-backend-linux-x64-extverify ./MAKE_BINARIES/aether-backend-linux-x64-extverify-$VERSIONATSTART 2> /dev/null || true && node ./buildresources/aftercompile.js run",
"pack": "electron-builder --dir",
"rebuild": "electron-rebuild",
- "update-version-string": "node ./buildresources/get-version-from-git.js",
- "quickpublish": "../../support/quickpublish/quickpublish.sh"
+ "update-version-string": "echo 1.0.0",
+ "quickpublish": "../../support/quickpublish/quickpublish.sh",
+ "postinstall": "npx electron-builder install-app-deps"
},
"author": {
"name": "Air Labs",
@@ -61,7 +62,7 @@
"electron-is-dev": "^0.3.0",
"electron-store": "^2.0.0",
"electron-unhandled": "^1.1.0",
- "electron-updater": "^3.1.2",
+ "electron-updater": "^4.0.0",
"electron-util": "^0.9.1",
"google-protobuf": "^3.6.0",
"grpc": "^1.12.4",
Before running make linux
, you should cd
into the client directory and run npm install
so that it downloads and installs the JavaScript dependencies. Once you have done this, you should be able to compile the backend and frontend. The client will probably fail with the following log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'dist-linux' ]
2 info using npm@6.9.0
3 info using node@v11.14.0
4 verbose run-script [ 'predist-linux', 'dist-linux', 'postdist-linux' ]
5 info lifecycle Aether@1.0.0~predist-linux: Aether@1.0.0
6 info lifecycle Aether@1.0.0~dist-linux: Aether@1.0.0
7 verbose lifecycle Aether@1.0.0~dist-linux: unsafe-perm in lifecycle true
8 verbose lifecycle Aether@1.0.0~dist-linux: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/micah/builds/aether/aether/client/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/cuda/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/micah/bin:/home/micah/.local/bin:/home/micah/.gem/ruby/2.1.0/bin:/home/micah/dev/go/bin:/home/micah/.gem/ruby/2.4.0/bin
9 verbose lifecycle Aether@1.0.0~dist-linux: CWD: /home/micah/builds/aether/aether/client
10 silly lifecycle Aether@1.0.0~dist-linux: Args: [ '-c',
10 silly lifecycle 'npm run update-version-string && docker run --rm -ti --env ELECTRON_CACHE="/root/.cache/electron" --env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" -v ${PWD}:/project -v ${PWD}/../../../BundledReleases:/BundledReleases -v ${PWD}/../../../ReleaseArchive:/ReleaseArchive -v ${PWD##*/}-node-modules:/project/node_modules -v ${PWD}/../../../.git:/project/.git -v ~/.cache/electron:/root/.cache/electron -v ~/.cache/electron-builder:/root/.cache/electron-builder -e BVERSION=$(node ./buildresources/get-version-from-git.js print) electronuserland/builder:10 npm run dist-linux-docker-trigger' ]
11 silly lifecycle Aether@1.0.0~dist-linux: Returned: code: 1 signal: null
12 info lifecycle Aether@1.0.0~dist-linux: Failed to exec dist-linux script
13 verbose stack Error: Aether@1.0.0 dist-linux: `npm run update-version-string && docker run --rm -ti --env ELECTRON_CACHE="/root/.cache/electron" --env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" -v ${PWD}:/project -v ${PWD}/../../../BundledReleases:/BundledReleases -v ${PWD}/../../../ReleaseArchive:/ReleaseArchive -v ${PWD##*/}-node-modules:/project/node_modules -v ${PWD}/../../../.git:/project/.git -v ~/.cache/electron:/root/.cache/electron -v ~/.cache/electron-builder:/root/.cache/electron-builder -e BVERSION=$(node ./buildresources/get-version-from-git.js print) electronuserland/builder:10 npm run dist-linux-docker-trigger`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:193:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:193:13)
13 verbose stack at maybeClose (internal/child_process.js:999:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:266:5)
14 verbose pkgid Aether@1.0.0
15 verbose cwd /home/micah/builds/aether/aether/client
16 verbose Linux 5.0.7-arch1-1-ARCH
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "dist-linux"
18 verbose node v11.14.0
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error Aether@1.0.0 dist-linux: `npm run update-version-string && docker run --rm -ti --env ELECTRON_CACHE="/root/.cache/electron" --env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" -v ${PWD}:/project -v ${PWD}/../../../BundledReleases:/BundledReleases -v ${PWD}/../../../ReleaseArchive:/ReleaseArchive -v ${PWD##*/}-node-modules:/project/node_modules -v ${PWD}/../../../.git:/project/.git -v ~/.cache/electron:/root/.cache/electron -v ~/.cache/electron-builder:/root/.cache/electron-builder -e BVERSION=$(node ./buildresources/get-version-from-git.js print) electronuserland/builder:10 npm run dist-linux-docker-trigger`
22 error Exit status 1
23 error Failed at the Aether@1.0.0 dist-linux script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
What it looks like to me, is that whatever docker container is trying to build the client, can’t get at the JavaScript dependencies that it needs. I am not skilled enough with docker to resolve this and it’s late here. I hope this is useful to someone, and maybe someone here can give me a clue on how to resolve this issue.