Skip to content

Fails to build on MacOSX 15.4 #426

@rfdougherty

Description

@rfdougherty

System Information
Please provide the following information about your system:

  • Steam Audio version: 4.6.1
  • Operating System and version: MacOS 15.4
  • (Optional) CPU architecture (e.g. x86-64, armv7): arm64
  • cmake version 4.0.1

Issue Description
Building dependencies fails.

Steps To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/ValveSoftware/steam-audio.git
  2. git checkout tags/v4.6.1
  3. cd core/build
  4. python3 get_dependencies.py --platform osx

This results in the following cmake error for deps flatbuffers, zlib, mysofa, and pffft:

CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.

To fix this, I added this line to get_dependencies.py just after line 530:

cmake_args += ['-DCMAKE_POLICY_VERSION_MINIMUM=3.5']

This allowed cmake to build all the deps except zlib, which now fails with this error:

Command '['cmake', '--build', '/Users/bobd/git/steam-audio/core/deps-build/zlib/build/osx', '--config', 'Release', '--target', 'zlibstatic']' returned non-zero exit status 65.

which I believe is a result of this error:

In file included from steam-audio/core/deps-build/zlib/src/zlib/zutil.c:10:
In file included fromsteam-audio/core/deps-build/zlib/src/zlib/gzguts.h:21:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/stdio.h:61:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/_stdio.h:318:7: error: expected ')'
  318 | FILE    *fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fdopen));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions