server icon indicating copy to clipboard operation
server copied to clipboard

Fails to build web artifacts on ARM64

Open CameronNemo opened this issue 4 years ago • 7 comments

Can the issue be reproduced with the latest available release? (y/n) y

Which one is the environment gotify server is being bullt for?

  • [ ] Docker
  • [x] Linux machine
  • [ ] Windows machine

What did you do?

Ran yarn and yarn build in the ui directory on ARM64 Linux.

What did you expect to see?

I expected yarn build to succeed in building the web ui assets.

What did you see instead? (Include screenshots, android logcat/request dumps if possible)

error /builddir/server-2.0.20/ui/node_modules/puppeteer: Command failed.
Exit code: 1
Command: node install.js
Arguments:
Directory: /builddir/server-2.0.20/ui/node_modules/puppeteer
Output:
The chromium binary is not available for arm64:
If you are on Ubuntu, you can install with:

 apt-get install chromium-browser

/builddir/server-2.0.20/ui/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js:112
            throw new Error();
            ^

Error
    at /builddir/server-2.0.20/ui/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js:112:19
    at FSReqCallback.oncomplete (fs.js:181:21)
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

CameronNemo avatar Jan 03 '21 21:01 CameronNemo

Hey, could you retry after doing the following things:

  • remove the puppeteer dependencies from ui/package.json (both @types/puppeteer and puppeteer)
  • remove all files from ui/src/tests

jmattheis avatar Jan 03 '21 21:01 jmattheis

That gets it building, but I have yet to test the result. Thanks for the tips.

CameronNemo avatar Jan 03 '21 23:01 CameronNemo

Unfortunately, the resulting binary segfaults right when executed. That could certainly be a separate issue, though.

CameronNemo avatar Jan 05 '21 17:01 CameronNemo

Does the arm64 binary from https://github.com/gotify/server/releases/tag/v2.0.20 work?

jmattheis avatar Jan 05 '21 17:01 jmattheis

That binary works fine on glibc but not musl. The binaries I am building behave the same (I am building the musl binary in a musl environment and glibc binary in a glibc environment, though). I get a Segmentation fault on musl.

CameronNemo avatar Jan 06 '21 03:01 CameronNemo

Hmm, I don't know. I tried building gotify on amd64 with musl gcc inside docker, this worked fine. I currently don't have an arm64 machine, thus, I can't really debug this issue :/

jmattheis avatar Jan 06 '21 09:01 jmattheis