Skip to content

Fix build failures with modern CMake and Clang#27

Open
kenchangh wants to merge 1 commit into
tfcollins:fix-gtk-upgradefrom
kenchangh:fix-modern-macos-build
Open

Fix build failures with modern CMake and Clang#27
kenchangh wants to merge 1 commit into
tfcollins:fix-gtk-upgradefrom
kenchangh:fix-modern-macos-build

Conversation

@kenchangh

Copy link
Copy Markdown

Summary

  • Add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to libiio, libad9361-iio, and iio-oscilloscope to fix CMake 4.x rejecting cmake_minimum_required versions below 3.5
  • Add -Wno-error=implicit-function-declaration to libad9361-iio and iio-oscilloscope to fix Clang 16+ treating missing #include <stdio.h> as a hard error
  • Remove libglade dependency from iio-oscilloscope — it was removed from Homebrew in 2023 and is not actually needed (the code uses GtkBuilder to load .glade files, not the deprecated libglade library)

Test plan

  • Verified brew install --build-from-source succeeds for all three formulae on macOS 26.2 (arm64) with Xcode 26.2 and CMake 4.2.3
  • Verified osc --help runs successfully after installation
  • Verified osc GUI launches without errors

🤖 Generated with Claude Code

- Add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to libiio, libad9361-iio, and
  iio-oscilloscope to fix CMake 4.x rejecting cmake_minimum_required < 3.5
- Add -Wno-error=implicit-function-declaration to libad9361-iio and
  iio-oscilloscope to fix Clang 16+ treating missing includes as errors
- Remove libglade dependency from iio-oscilloscope as it was removed from
  Homebrew and is not needed (the code uses GtkBuilder, not libglade)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant