-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Electron/Linux: librsvg-2.so.2: undefined symbol: cairo_font_options_get_variations #2058
Comments
I'm attempting to build on bionic to see if it makes a difference. |
Yes, We are getting the same error. Version 0.23.4 works perfectly. These new symbols are added in the latest Cairo but on 0.24 the libcairo seems to be older. |
The prebuilt binaries for sharp v0.23.x provided cairo v1.17.2 but this caused #1895 so sharp v0.24.x reverted to cairo v0.16.0. The My best guess would be that there is another native dependency that also depends upon cairo. |
I've built an Electron app: https://github.com/ExamProCo/fast-author
It throws this error as well:
What is confusing is that if I test Sharp in a sample app it works with no issue on Ubuntu |
It looks like the prebuilt
If you depend on a globally-installed libcairo for electron then you'll also have to depend on a globally-installed libvips that uses the same libcairo. |
@lovell I am confused... this might be just my lack of understanding the issue. Are you suggesting that this is actually an Electron bug? Does this mean that there isn't a fix that would restore the working functionality of v0.23? |
Some prebuilt electron binaries on Linux depend on the system cairo. If you are using this with the prebuilt binaries provided by sharp and the versions of cairo happen to match, then it will appear to work. If they do not match then it might work or it might not. It's about versions of cairo rather than versions of sharp or electron. The best advice I can offer right now is as before:
The use of static linking for the prebuilt binaries provided by sharp is being considered to prevent this kind of problem - see lovell/sharp-libvips#39 You might also consider compiling your own Electron with its dependencies statically-linked. |
Thank you for clarifying, that helps! |
I hope this information helped. Please feel free to re-open with more details if further assistance is required. |
@lovell Ubuntu: 18.04 depends on Cairo lib v1.15 Both options are failing:: I believe the reason being even though we built the latest libvips, it depends on the old version of system Cairo with limited features. To make sharp easy for all node environments including electron, it might be important to build a static version of Libvips (Long term) Do you have any short term solution for our case? also, I believe you would have evaluated the trade-off for downgrading the Cairo version. Thanks and let me know if I am missing something. |
@lovell any suggestions would greatly help. |
@janakg Please see my comment above at #2058 (comment) |
Did you see the documentation relating to installation?
yes
Have you ensured the platform and version of Node.js used for
npm install
is the same as the platform and version of Node.js used at runtime?The build script uses 'electron-builder install-app-deps' to ensure the correct version.
If you are installing as a
root
orsudo
user, have you tried with thenpm install --unsafe-perm
flag?not installing as root
If you are using the
ignore-scripts
feature ofnpm
, have you tried with thenpm install --ignore-scripts=false
flag?not using this
What is the complete output of running
npm install --verbose sharp
? Have you checked this output for useful error messages?It builds fine, but a user running the electron app gets the error in the title
What is the output of running
npx envinfo --binaries --languages --system --utilities
?This is the information from the original bug report:
This is the error the reporter gets:
The app is built on travis on ubuntu xenial:
https://travis-ci.com/mix-blockchain/mix-acuity/jobs/277504135#L2310
What is the best way to proceed to resolve this for them?
Original bug report:
acuity-network/acuity-browser-old#43
The text was updated successfully, but these errors were encountered: