Skip to content

refactor: use stubs for gdk-pixbuf dependency - #34077

Merged
deepak1556 merged 7 commits into
electron:mainfrom
rzhao271:rzhao271/gdk-pixbuf-refactor
Jun 20, 2022
Merged

refactor: use stubs for gdk-pixbuf dependency#34077
deepak1556 merged 7 commits into
electron:mainfrom
rzhao271:rzhao271/gdk-pixbuf-refactor

Conversation

@rzhao271

@rzhao271 rzhao271 commented May 4, 2022

Copy link
Copy Markdown
Contributor

Description of Change

Fixes #34060

While adding automatic dependency generation for Debian packages in VS Code (microsoft/vscode#147335), I learned that Electron statically links to libgdk-pixbuf. But, on some versions of Ubuntu, the package is called libgdk-pixbuf-2.0-0, and on other versions, it's called libgdk-pixbuf2.0-0. Therefore, Electron should dynamically look for libgdk-pixbuf rather than statically link to the package, since its name varies depending on the Linux distro version.

This PR is based on #33650, which does something similar for libgtk in Electron.
Also, Chromium has already done something similar for their dependency on libgdk_pixbuf: https://source.chromium.org/chromium/chromium/src/+/3a5f2968e096ebe1faeb156510193e87f07980c9

CC @deepak1556

Checklist

Release Notes

Notes: On Linux, changed the libgdk-pixbuf dependency to be dynamically linked rather than statically linked.

@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label May 4, 2022
@electron-cation electron-cation Bot removed the new-pr 🌱 PR opened recently label May 11, 2022
@rzhao271
rzhao271 force-pushed the rzhao271/gdk-pixbuf-refactor branch from 4f1c058 to 6ae52e8 Compare June 13, 2022 22:11
@rzhao271
rzhao271 marked this pull request as ready for review June 14, 2022 19:23
@rzhao271
rzhao271 requested review from a team as code owners June 15, 2022 18:23
Comment thread patches/chromium/.patches Outdated
Comment thread shell/browser/electron_browser_main_parts.cc Outdated
@trop

trop Bot commented Jun 16, 2022

Copy link
Copy Markdown
Contributor

@rzhao271 has manually backported this PR to "18-x-y", please check out #34601

@nornagon nornagon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems legit

@trop

trop Bot commented Jun 16, 2022

Copy link
Copy Markdown
Contributor

@rzhao271 has manually backported this PR to "19-x-y", please check out #34602

@deepak1556

Copy link
Copy Markdown
Member

Failing tests are unrelated #34575, merging.

@deepak1556
deepak1556 merged commit 999a225 into electron:main Jun 20, 2022
@release-clerk

release-clerk Bot commented Jun 20, 2022

Copy link
Copy Markdown

Release Notes Persisted

On Linux, changed the libgdk-pixbuf dependency to be dynamically linked rather than statically linked.

@trop

trop Bot commented Jun 20, 2022

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "20-x-y", please check out #34635

khalwa pushed a commit to solarwindscloud/electron that referenced this pull request Feb 22, 2023
* refactor: use stubs for gdk-pixbuf dependency

* Adjust build file

* Add includes

* Merge gdk_pixbuf stubs into gtk stubs

* Split pixbuf sigs into own file again

* Add initialization check

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

Labels

semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: libgdk-pixbuf library is not dynamically linked

3 participants