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

[Linux - Fix] Dynamic libraries no longer deadlock when missing, and use the correct headers #109

Open
wants to merge 8 commits into
base: stable
Choose a base branch
from

Conversation

Kodikuu
Copy link

@Kodikuu Kodikuu commented May 21, 2024

  1. Failed dynamic lib loading would cause a deadlock, terminating the app (Resolved)
  2. Custom headers for libjpeg, libpng, and libasound, are not a great idea (Now uses installed headers)

I would've done the same for libcrypto, libcurl, libssl, libudev, and libx11, but those appear more involved, and seem to be more consistent between versions. It would take much more time to extend this work to those.

Install libasound2-dev, libjpeg-dev, and libpng-dev, to build MTY on Linux

@Kodikuu Kodikuu self-assigned this May 21, 2024
@Kodikuu Kodikuu added the 2. Review requested You have coded your code, and can now be reviewed. label May 21, 2024
@@ -246,6 +56,12 @@ static bool libjpeg_global_init(void)
bool r = true;

LIBJPEG_SO = MTY_SOLoad("libjpeg.so.8");
if (!LIBJPEG_SO)
Copy link

Choose a reason for hiding this comment

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

i would have probably factored out a function that takes an array of strings, and attempts to MTY_SOLoad each in turn, because we do it for N libraries M times each. and, it would make it easy for us to add logging etc. in a central spot, without having to paste the logging code multiple times.

Copy link

@bmcnett bmcnett left a comment

Choose a reason for hiding this comment

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

lgtm

@Namaneo Namaneo added 3. 2nd review stage 2nd opinion has reviewed the code. and removed 2. Review requested You have coded your code, and can now be reviewed. labels May 24, 2024
@Kodikuu Kodikuu changed the title Fixes for dynamic Linux libs [Linux - Fix] Dynamic libraries no longer deadlock, and use the correct headers Sep 11, 2024
@Kodikuu Kodikuu changed the title [Linux - Fix] Dynamic libraries no longer deadlock, and use the correct headers [Linux - Fix] Dynamic libraries no longer deadlock when missing, and use the correct headers Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. 2nd review stage 2nd opinion has reviewed the code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants