Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prebuilt binaries for Electron (0.26+) #2440

Closed
fadri1 opened this issue Nov 13, 2020 · 6 comments
Closed

Prebuilt binaries for Electron (0.26+) #2440

fadri1 opened this issue Nov 13, 2020 · 6 comments
Labels

Comments

@fadri1
Copy link

fadri1 commented Nov 13, 2020

Thanks for your awesome work on sharp. It sounds like there isn't electron prebuilt binaries since the release of 0.26.
The latest prebuilt binary was on https://github.com/lovell/sharp/releases/tag/v0.25.4.

Is it intentional or is it an issue with CI?

@fadri1 fadri1 added the triage label Nov 13, 2020
@fadri1 fadri1 changed the title Prebuilt binaries for Electron for 0.26+ Prebuilt binaries for Electron (0.26+) Nov 13, 2020
@lovell
Copy link
Owner

lovell commented Nov 13, 2020

Hi, separate prebuilds are no longer required for Electron as all binaries support N-API version 3.

https://nodejs.org/api/n-api.html#n_api_n_api_version_matrix

@lovell lovell added question and removed triage labels Nov 13, 2020
@mceachen
Copy link
Contributor

@lovell thanks, as always, for your work on sharp!

I've had to pin to Electron v9.3 and sharp v0.23.4 to support Ubuntu 18.04.5 LTS.

(In other words, prior code and config does work, but electron v10 + sharp v0.26 + ubuntu 18.04 fails due to #2058).

  1. Is this error surprising, or expected? (I know that Electron is a huge dog's breakfast of problems, and I pre-apologize).

  2. If it's expected, do you have any links I can follow or clues I can pursue to get the latest sharp to work with electron across macOS, Windows 10, and Ubuntu? (We talked earlier about building Electron with statically-linked dependencies, but that doesn't seem to be a supported build config).

If there's a known-working happy path per OS, I'm happy to do whatever it takes to make each platform work individually.

Thanks again. I'd be happy to write up whatever turns out to be the magick recipes into a docs pull request.

@lovell
Copy link
Owner

lovell commented Nov 16, 2020

@mceachen I think the problem you're facing is because Electron depends on Chromium, which on Linux depends on GTK that depends on libcairo.

The prebuilt binaries currently provided by Electron for Linux depend on the system GTK and therefore the system libcairo.

There's some discussion about migrating Chromium in Electron from GTK to Aura at electron/electron#10915

@fadri1
Copy link
Author

fadri1 commented Nov 16, 2020

Hi, separate prebuilds are no longer required for Electron as all binaries support N-API version 3.

https://nodejs.org/api/n-api.html#n_api_n_api_version_matrix

Hi @lovell, thanks for your answer. I think my issue is related to #1697 (comment). electron-builder tries to find prebuilt binaries and fails. So that's not an issue with sharp.

image

@lovell
Copy link
Owner

lovell commented Nov 16, 2020

My best guess would be that electron-builder needs to be modified, either to skip dependencies that uses N-API, or to invoke prebuild-install with runtime=napi first, then fallback to runtime=electron.

@lovell
Copy link
Owner

lovell commented Nov 27, 2020

Downstream issue for this at electron-userland/electron-builder#5438

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants