Skip to content

Instantly share code, notes, and snippets.

@nytpu
Last active May 9, 2020 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nytpu/4f97df9e9c4b0b5d365a15dacabe020c to your computer and use it in GitHub Desktop.
Save nytpu/4f97df9e9c4b0b5d365a15dacabe020c to your computer and use it in GitHub Desktop.
Compiling Aether on Arch Linux

The author of Aether now has pushed some fixes, read his easier to follow instructions here: https://gist.github.com/nehbit/4a8c3d81d543e85c9df974f521732b1e

This thing is based off of this, this, and this.

I'm planning to put it on the AUR sometime hopefully, so we'll see how that goes.

To start, I'm assuming you're on Arch, but it should be easy to adapt this to most Linux distros. Also, depending on when you're reading this, these patches have a high chance of not working after and Aether update or if grpc gets an update or if anything changes in the slightest.

Dependencies (that I know of): nvm (AUR package), nodejs, binutils, clang, go, docker
You also need aether_git.patch and aether_grpc.patch
Then, follow these steps:

  1. Clone repository:
    git clone https://github.com/nehbit/aether.git
  2. Prepare nvm:
    source /usr/share/nvm/init-nvm.sh
    nvm install 11
    nvm use 11
  3. cd aether
  4. Apply first patch to fix a couple issues
    git apply path/to/aether_git.patch
  5. cd aether-core/aether/backend
  6. Build backend:
    go run main.go
    Even though https://getaether.net/docs/developers/ claims that “it should print an identifier and terminate itself” it will actually say: “You've attempted to run the Aether Runtime Environment without any commands.”
  7. cd ../frontend
  8. Build frontend:
    go run main.go
    It has a similar message to the backend
  9. cd ../client
  10. Install dependencies:
    npm ci
  11. Compile some dependencies:
    npm run wpwatch
    For some reason this will hang after it's done, so press Ctrl-C once everything seems to be finished (if no errors)
  12. Apply patch to get grpc to compile:
    patch -p0 < path/to/aether_grpc.patch
  13. Build some c stuff, it may take a while without seeming to do much:
    npm run rebuild
  14. Make sure that if you’re running Aether in your computer, you have it shut down, otherwise Electron’s single instance lock will trigger and terminate without errors. Run:
    npm start
    Click through the "begin" menu without creating an account to make sure that you can get to the main screen without errors.
  15. cd ..
  16. Finally build for linux:
    make linux
  17. Once it finishes, go back to the root of the repo. The compiled snap will be in ./ReleaseArchive/Aether-2.0.0-dev.14/[build number]/linux/ and the normal Aether binary is in ./BundledReleases/linux-unpacked/

An explanation of what was broken for those curious:

The first thing that needs to be done is use nvm to install and use Node 11 (the one packaged with Arch is v14). This will solve almost all of the issues that mpnordland was having on meta.getaether.net

The next thing that deviates from a standard build is aether_git.patch, which fixes a few issues:

  • It fixes a typo in aether-core/aether/client/src/app/components/a-breadcrumbs.vuethat has Logo-sm-h.png as logo-sm-h.png
  • It fixes typos in aether-core/aether/client/src/app/scss/typefaces.scss, that has SourceSansPro-SemiBold.ttfand SourceSansPro-SemiBoldItalic.ttf listed as SourceSansPro-Semibold.ttf and SourceSansPro-SemiboldItalic.ttf, respectively
  • It makes some modifications to the makefile and package.json (most coming from here):
    • Uses normal gcc/g++ instead of a cross-compile toolchain
    • Adds npm install to dist-linux-docker-trigger, which does automatically what mpnordland had to do manually in his thread

Then the build continues normally, following the instructions here, until it gets to compiling the C and C++ stuff, when we have to patch one of the dependencies called grpc. At some point the devs of grpc renamed the function gettid(); to sys_gettid();, but didn't successfully rename it in all of the source files, so I had to go manually change some. Found this solution here and here. It also uses the -Werror build flag and it has a few build warnings that then cause the build to error and fail, so I removed the -Werror flag because it still works afterwards.

After that, then everything can proceed as normal to the end of the build.

@nehbit
Copy link

nehbit commented May 9, 2020

I pushed some fixes based on the instructions here to ideally remove the need for the patches and created a gist pointing to this one for the new instructions at https://gist.github.com/nehbit/4a8c3d81d543e85c9df974f521732b1e.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment