PF4Public / gentoo-overlay

Personal Gentoo overlay
80 stars 20 forks source link

net-im/element-desktop: fails to build with "USE=-build-online" #255

Closed stikonas closed 1 year ago

stikonas commented 1 year ago

net-im/element-desktop-1.11.43 fails to build with USE=-build-online

Looks like it is trying to download a binary version of electron. I would find it a bit strange even for USE=build-online as element-desktop already depends on electron ebuild.

yarn config v1.22.19
success Set "disable-self-update-check" to "true".
Done in 0.11s.
yarn config v1.22.19
success Set "nodedir" to "/usr/include/electron-26/node".
Done in 0.11s.
yarn config v1.22.19
success Set "yarn-offline-mirror" to "/var/tmp/portage/net-im/element-desktop-1.11.43/distdir".
Done in 0.10s.
 * Removing playwright from dependencies
 * Installing node_modules
yarn install v1.22.19
[1/5] Validating package.json...
[2/5] Resolving packages...
warning Resolution field "@types/node@16.18.41" is incompatible with requested version "@types/node@^17.0.36"
warning Resolution field "@types/node@16.18.41" is incompatible with requested version "@types/node@^18.11.18"
[3/5] Fetching packages...
[4/5] Linking dependencies...
warning " > eslint-plugin-matrix-org@1.2.1" has unmet peer dependency "@babel/eslint-parser@*".
warning " > eslint-plugin-matrix-org@1.2.1" has unmet peer dependency "@babel/eslint-plugin@*".
warning " > eslint-plugin-matrix-org@1.2.1" has unmet peer dependency "eslint-plugin-deprecate@*".
warning " > eslint-plugin-matrix-org@1.2.1" has unmet peer dependency "eslint-plugin-jest@*".
warning " > eslint-plugin-matrix-org@1.2.1" has unmet peer dependency "eslint-plugin-jsx-a11y@*".
warning " > eslint-plugin-matrix-org@1.2.1" has unmet peer dependency "eslint-plugin-react@*".
warning " > eslint-plugin-matrix-org@1.2.1" has unmet peer dependency "eslint-plugin-react-hooks@*".
[5/5] Building fresh packages...
Done in 51.51s.
 * Editing ElectronFramework.js
  • electron-builder  version=24.6.4 os=6.1.53-gentoo-gnu
  • loaded configuration  file=package.json ("build" field)
  • writing effective config  file=dist/builder-effective-config.yaml
  • packaging       platform=linux arch=x64 electron=26.2.1 appOutDir=dist/linux-unpacked
  ⨯ Get "https://github.com/electron/electron/releases/download/v26.2.1/electron-v26.2.1-linux-x64.zip": dial tcp: lookup github.com on [fdf0:1de0:3348::1]:53: dial udp [fdf0:1de0:3348::1]:53: connect: network is unreachable
github.com/develar/app-builder/pkg/download.(*Downloader).follow.func1
        /Volumes/data/Documents/app-builder/pkg/download/downloader.go:206
github.com/develar/app-builder/pkg/download.(*Downloader).follow
        /Volumes/data/Documents/app-builder/pkg/download/downloader.go:234
github.com/develar/app-builder/pkg/download.(*Downloader).DownloadNoRetry
        /Volumes/data/Documents/app-builder/pkg/download/downloader.go:128
github.com/develar/app-builder/pkg/download.(*Downloader).Download
        /Volumes/data/Documents/app-builder/pkg/download/downloader.go:112
github.com/develar/app-builder/pkg/electron.(*ElectronDownloader).doDownload
        /Volumes/data/Documents/app-builder/pkg/electron/electronDownloader.go:192
github.com/develar/app-builder/pkg/electron.(*ElectronDownloader).Download
        /Volumes/data/Documents/app-builder/pkg/electron/electronDownloader.go:177
github.com/develar/app-builder/pkg/electron.downloadElectron.func1.1
        /Volumes/data/Documents/app-builder/pkg/electron/electronDownloader.go:73
github.com/develar/app-builder/pkg/util.MapAsyncConcurrency.func2
        /Volumes/data/Documents/app-builder/pkg/util/async.go:68
runtime.goexit
        /usr/local/Cellar/go/1.17/libexec/src/runtime/asm_amd64.s:1581  
  ⨯ /var/tmp/portage/net-im/element-desktop-1.11.43/work/element-desktop-1.11.43/node_modules/app-builder-bin/linux/x64/app-builder process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Exit code:
1  failedTask=build stackTrace=Error: /var/tmp/portage/net-im/element-desktop-1.11.43/work/element-desktop-1.11.43/node_modules/app-builder-bin/linux/x64/app-builder process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Exit code:
1
    at ChildProcess.<anonymous> (/var/tmp/portage/net-im/element-desktop-1.11.43/work/element-desktop-1.11.43/node_modules/builder-util/src/util.ts:250:14)
    at Object.onceWrapper (node:events:629:26)
    at ChildProcess.emit (node:events:514:28)
    at maybeClose (node:internal/child_process:1105:16)
PF4Public commented 1 year ago

Looks like it is trying to download a binary version of electron. I would find it a bit strange even for USE=build-online as element-desktop already depends on electron ebuild.

I'm hijacking their packaging for Debian, which bundles electron binary. I remember disabling this particular download, but it seems they overcame it somehow. I'll address it later.

~BTW, I wonder if you've noticed that you're downloading yet another unused electron binary? :D~ EDIT: never mind, it used to be a binary, but now it is a package used to actually download a binary, which should be prevented.

PF4Public commented 1 year ago

So when I thought that this cannot get any more crazy, they roll out a statically linked binary in Go… Brilliant! Web-developers never stop surprising me. 🤦🏻 %sarcasm%

I've commented out electron builder, we can try expanding @TheCodex6824 solution for ppc64 to other platforms.

@stikonas Please check if it builds and(!) runs for you with latest changes.

stikonas commented 1 year ago

thanks, it works now.