Skip to content

meson: fix missing libm link on Fedora#557

Merged
mm2 merged 2 commits into
masterfrom
copilot/556-add-libm-to-linker
Apr 20, 2026
Merged

meson: fix missing libm link on Fedora#557
mm2 merged 2 commits into
masterfrom
copilot/556-add-libm-to-linker

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 20, 2026

liblcms2_dep was declared without dependencies: deps, so m_dep (libm) and threads_dep were not propagated to consumers. Static library builds and certain linker configurations (e.g. --as-needed on Fedora) would fail to link executables because -lm never appeared in their link command.

Changes

  • src/meson.build: add dependencies: deps to declare_dependency() so libm and pthreads are transitively carried to all consumers of liblcms2_dep
# before
liblcms2_dep = declare_dependency(
  link_with: liblcms2_lib,
  include_directories: [inc_dirs, include_directories('.')],
)

# after
liblcms2_dep = declare_dependency(
  link_with: liblcms2_lib,
  include_directories: [inc_dirs, include_directories('.')],
  dependencies: deps,
)

Copilot AI assigned Copilot and mm2 Apr 20, 2026
@mm2 mm2 marked this pull request as ready for review April 20, 2026 14:33
@mm2 mm2 merged commit 095033b into master Apr 20, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants