Skip to content

[sdl2] Fix could not find found library alsa#42964

Closed
WangWeiLin-MV wants to merge 1 commit intomicrosoft:masterfrom
WangWeiLin-MV:ports/sdl2/missing-found-alsa
Closed

[sdl2] Fix could not find found library alsa#42964
WangWeiLin-MV wants to merge 1 commit intomicrosoft:masterfrom
WangWeiLin-MV:ports/sdl2/missing-found-alsa

Conversation

@WangWeiLin-MV
Copy link
Contributor

Fix #42929, error with Could NOT find ALSA (missing: ALSA_LIBRARY) (found version "1.2.13")

Remove set(CMAKE_REQUIRE_FIND_PACKAGE_ALSA 1).

Checklist

  • Changes comply with the maintainer guide.
  • SHA512s are updated for each updated download.
  • The "supports" clause reflects platforms that may be fixed by this new version.
  • Any fixed CI baseline entries are removed from that file.
  • Any patches that are no longer applied are deleted from the port's directory.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is added to each modified port's versions file.

Test

The installation vcpkg install sdl2[alsa] imgui[sdl2-binding,sdl2-renderer-binding] tests pass with the following triplets:

  • x64-linux

@WangWeiLin-MV WangWeiLin-MV added category:port-bug The issue is with a library, which is something the port should already support info:internal labels Dec 27, 2024
@WangWeiLin-MV
Copy link
Contributor Author

WangWeiLin-MV commented Dec 27, 2024

@dg0yt #39709

This error seems from set(CMAKE_REQUIRE_FIND_PACKAGE_ALSA 1) with ports/alsa/vcpkg-cmake-wrapper.cmake.

set(SDL_ALSA_SHARED @SDL_ALSA_SHARED@)
-if(SDL_ALSA AND NOT SDL_ALSA_SHARED AND TARGET SDL2::SDL2-static)
+if(SDL_ALSA)
+ set(CMAKE_REQUIRE_FIND_PACKAGE_ALSA 1)
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't make sense. If the user asks for alsa, and the dependency alsa is installed, then CMAKE_REQUIRE_FIND_PACKAGE_ALSA doesn't cause an error, but it catches errors.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It can be reproduced by find_package(SDL2 CONFIG REQUIRED) twice.

find_package(SDL2 CONFIG REQUIRED)
find_package(SDL2 CONFIG REQUIRED)

Copy link
Contributor

Choose a reason for hiding this comment

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

Can be reproduced with find_package(ALSA). Fix in #43008.

Copy link
Contributor

Choose a reason for hiding this comment

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

Reproduced in #43009.

@WangWeiLin-MV
Copy link
Contributor Author

Wait fix in #42912

@WangWeiLin-MV WangWeiLin-MV added the depends:different-pr This PR or Issue depends on a PR which has been filed label Dec 30, 2024
Copy link
Contributor

@dg0yt dg0yt left a comment

Choose a reason for hiding this comment

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

Invalid. Fix in #43008.

@ArashPartow ArashPartow mentioned this pull request Dec 30, 2024
7 tasks
@WangWeiLin-MV WangWeiLin-MV removed the depends:different-pr This PR or Issue depends on a PR which has been filed label Dec 31, 2024
@WangWeiLin-MV
Copy link
Contributor Author

Fixed at fa643c3

@WangWeiLin-MV WangWeiLin-MV deleted the ports/sdl2/missing-found-alsa branch January 3, 2025 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:port-bug The issue is with a library, which is something the port should already support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[imgui,sdl2,alsa] Build error on x64-linux

3 participants