Bug 2381102 - portmidi: FTBFS with change proposal CMake: Use ninja generator by default
Summary: portmidi: FTBFS with change proposal CMake: Use ninja generator by default
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: portmidi
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michael J Gruber
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2376112
TreeView+ depends on / blocked
 
Reported: 2025-07-16 15:21 UTC by Cristian Le
Modified: 2025-07-17 16:57 UTC (History)
3 users (show)

Fixed In Version: portmidi-217-75.fc43
Clone Of:
Environment:
Last Closed: 2025-07-17 16:00:24 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Cristian Le 2025-07-16 15:21:39 UTC
Dear package maintainer,

This is an automated bug created due to a FTBFS when rebuilding this package for the change proposal CMake: Use ninja generator by default.

The rebuild is being tracked in https://copr.fedorainfracloud.org/coprs/lecris/cmake-ninja/package/portmidi.

See https://fedoraproject.org/wiki/Changes/CMake_ninja_default for more information on how to make the package compatible.

More specifically, make sure you are using standard %cmake_* macros. If you find that there are hard dependencies on
the generator even after such transition, please ping me for closer investigation.

You can check the build locally following the instructions in the change proposal, or submit your build to the tracking
copr project.

Let me know if you encounter any issues, or need any other help.

Comment 1 Michael J Gruber 2025-07-17 13:58:04 UTC
I have a fix here:

https://src.fedoraproject.org/fork/mjg/rpms/portmidi/c/66c2c18cbf122575df5d6cc3109cd2a99d8276e3?branch=rawhide

It builds both on rawhide (with make) and lecris/cmake-ninja (with ninja).

BUT:

Once I up the cmake minimum version for the CMake 4.0 proposal as I do here:

https://src.fedoraproject.org/fork/mjg/rpms/portmidi/c/584568a8ffcd2dcee2ed5087d47b48ec5046bd04?branch=rawhide

Then the build works on rawhide and lecris/cmake-4.0, but not any more on lecris/cmake-ninja because ninja suddenly fails to find a file.

So, the change proposals appear to be interdependent, and a fix to one may break an apparant fix to another one.

And there's a third one, of course, for non-standard variables.

Comment 2 Cristian Le 2025-07-17 14:10:25 UTC
That is very odd. First thing that I notice, why did you add

```
%global __cmake_in_source_build 1
```
That would likely break a lot of stuff.

`CMAKE_CACHEFILE_DIR` is also a very weird one that needs checking. The documentation mentions it's not supposed to be writeable. It should expand to `%_vpath_builddir` if you need it anywhere else.

Do you have a log of how it breaks?

Also very much appreciate the notes on the policy incompatibility.

Comment 3 Fedora Update System 2025-07-17 15:57:27 UTC
FEDORA-2025-ab78c5fd26 (portmidi-217-75.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-ab78c5fd26

Comment 4 Fedora Update System 2025-07-17 16:00:24 UTC
FEDORA-2025-ab78c5fd26 (portmidi-217-75.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 5 Michael J Gruber 2025-07-17 16:06:10 UTC
Portmidi (1) is basically a stale ancient codebase, so I'm going for minimal fixes rather than trying to clean everything up.

For example, the cmake setup for the java part uses custom commands which - as such - work for an in-source build only. That's why I enforce that now in the proper way (it used to be "enforced" with "-B." and a direct make call).

Adjusting the version range makes cmake behave differently, so that should probably be the first change which one works out. Just as a hint :)

Comment 6 Cristian Le 2025-07-17 16:57:15 UTC
Ah, I see that upstream has changed to portmidi2. Good luck with that transition :)

I guess you've found a workaround, whatever works I guess :)


Note You need to log in before you can comment on or make changes to this bug.