Skip to content

Conversation

gruenich
Copy link
Contributor

@gruenich gruenich commented Mar 24, 2025

Newer version of CMake (since 3.30) warn that versions older than 3.10 are deprecated.

@RossBencina
Copy link
Collaborator

Set project language explicitly

src/hostapi/asio/pa_asio.cpp is C++ do we need to add something extra for that?

@RossBencina RossBencina added the build-cmake CMake build system label Mar 24, 2025
@RossBencina RossBencina added this to the V19.8 milestone Mar 24, 2025
@RossBencina RossBencina added the P3 Priority: Normal label Mar 24, 2025
@gruenich gruenich force-pushed the feature/cmake-3.10 branch from 9219e5a to c431aee Compare March 24, 2025 23:17
@gruenich
Copy link
Contributor Author

You are right, I missed the C++ part. I updated my second commit.

@gruenich gruenich force-pushed the feature/cmake-3.10 branch from c431aee to 6782033 Compare March 25, 2025 06:23
@dmitrykos
Copy link
Collaborator

dmitrykos commented Mar 25, 2025

Requesting minimum CMake 3.10 will limit build to Ubuntu 18.04 with default build tools and thus will affect Docker builds. Currently it is CMake 3.1.0 which is supported by Ubuntu 16.04 by default.

  • Ubuntu 14.04 (Trusty Tahr): CMake 2.8.12
  • Ubuntu 16.04 (Xenial Xerus): CMake 3.5.1

  • Ubuntu 18.04 (Bionic Beaver): CMake 3.10
  • Ubuntu 20.04 (Focal Fossa): CMake 3.16
  • Ubuntu 22.04 (Jammy Jellyfish): CMake 3.22
  • Ubuntu 24.04 (Noble Numbat): CMake 3.28.3
  • Ubuntu 24.10 (Oracular Oriole): CMake 3.30.3

More comments from other PortAudio users are needed regarding this change as it will drop support for Ubuntu 16.04 builds with default tools.

@gruenich
Copy link
Contributor Author

gruenich commented Mar 29, 2025

Ready to be merged. Unless you want to reduce the minimum required version to 3.5. This will trigger a deprecation warning. It is your decision.

@jpr42
Copy link

jpr42 commented Apr 1, 2025

FWIW picking 3.10 as the min would close #1016 where as picking 3.5 as the minimum wouldn't

@peter-toft-greve
Copy link

Great - super annoying for cmake 4. Looking forward to see this merged

@martinblech
Copy link

I would humbly suggest making the much safer 3.5 min version upgrade first to fix the build in CMake >=4 without dropping support for any popular Ubuntu versions in docker builds out there (as pointed out by #1013 (comment)). The 3.10 min version upgrade should be addressed separately as it will take longer to verify that this can be done safely.

@peter-toft-greve
Copy link

peter-toft-greve commented Apr 4, 2025

Ubuntu 16.04 had EOL April 30, 2021. Given the amount of security updates since I would strongly recommend to upgrade.
Keep 16.04 support should not be a priority

@gruenich
Copy link
Contributor Author

gruenich commented Apr 4, 2025

Please either merge this or give a clear feedback that you would prefer a CMake minimum version of 3.5.

@dmitrykos
Copy link
Collaborator

I hope @RossBencina and @philburk comment on this PR. I am personally ok with targeting 3.10.

@philburk
Copy link
Collaborator

philburk commented Apr 5, 2025

I am not a CMake expert. But I tend to agree with the suggestion from @martinblech to upgrade first to 3.5 to address the immediate compatibility issues. Then, maybe a week later, to upgrade to a minimum CMake of 3.10 so that we are more current.

Then if someone needs the 3.5 CMake for Ubuntu 16.04 they can use the older commit.

@RossBencina - what do you think?

@gruenich
Copy link
Contributor Author

gruenich commented Apr 5, 2025

I created !1019 to bump CMake to 3.5. Would be great to have it merged. Getting a minor release would be the cherry on top, because than packages do not have to apply the patch manually.

I will rebase this merge request once !1019 is merged.

@RossBencina
Copy link
Collaborator

I agree to first merge #1019 (update to CMake 3.5).

It's not 100% clear to me whether we should merge the 3.10 patch before or after the PA V19.8 release (the one we are trying to close off on). Is the Ubuntu 16.04 breakage the only downside of moving to 3.10? Would this actually affect anyone that we know of?

While I am here, there are five open CMake related issues blocking the 19.8 release: https://github.com/PortAudio/portaudio/milestone/10 neither Phil nor I have the requisite experience to deal with CMake, and we have plenty to keep us busy elsewhere. We have been asking for help with the CMake build system for literally years now. At this point you guys are taking the piss. You're happy to lobby for CMake support and jump to action when things actually break, but no one is doing the maintenance work. If the situation does not improve, sooner or later I'm going to snap and delete CMake build support from the tree. </rant>

@dmitrykos
Copy link
Collaborator

Is the Ubuntu 16.04 breakage the only downside of moving to 3.10?

Yes. For an older system, developer could alter cmake_minimum_required(VERSION 3.5) manually in the project. I propose to merge this PR and wait for any further issues regarding this change.

@philburk
Copy link
Collaborator

This will have to be rebased because we merged #1019.

@gruenich gruenich force-pushed the feature/cmake-3.10 branch from 6782033 to 9252d8e Compare April 25, 2025 06:05
@gruenich gruenich force-pushed the feature/cmake-3.10 branch from 9252d8e to cf99b6a Compare April 25, 2025 06:07
@gruenich gruenich marked this pull request as ready for review April 25, 2025 06:08
@gruenich
Copy link
Contributor Author

Rebased, ready to be merged. I don't mind if you make a release before merging this.

CMake 3.31 and newer warn that versions older than 3.10
are deprecated.
Copy link
Collaborator

@philburk philburk left a comment

Choose a reason for hiding this comment

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

Dmitry wrote regarding breaking Ubuntu 16

For an older system, developer could alter cmake_minimum_required(VERSION 3.5)

That is a compelling reason to approve.
Also developers on old systems can use an old version of PortAudio.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-cmake CMake build system P3 Priority: Normal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants