Skip to content

audio/alsa-plugins: fix build failure on DragonFly#1547

Closed
dragonflybot wants to merge 1 commit into
masterfrom
agentic/audio-alsa-plugins-20260601-143332Z
Closed

audio/alsa-plugins: fix build failure on DragonFly#1547
dragonflybot wants to merge 1 commit into
masterfrom
agentic/audio-alsa-plugins-20260601-143332Z

Conversation

@dragonflybot

Copy link
Copy Markdown
Member

Generated by the DragonFly agentic build-fix loop and verified in a clean dev-env. Reviewed and accepted by operator operator before submission.

Problem

The build failed on @2026Q2 — classified compile-error, confidence high.

The DragonFly‑specific static patch patch‑oss_pcm__oss.c removes the caps field from struct snd_pcm_oss, but the oss_hw_constraint() function contains a #ifdef __FreeBSD__ block with a caps‑free implementation and an #else block that still references oss->caps. Because DragonFly does not define __FreeBSD__, the #else path is compiled against the modified struct, triggering the member‑not‑found error.

Evidence:

  • From errors.txt (tail of build log):
    pcm_oss.c:574:5: error: 'snd_pcm_oss_t' {aka 'struct snd_pcm_oss'} has no member named 'caps'
      oss->caps = 0;
         ^~
    pcm_oss.c:575:45: error: 'snd_pcm_oss_t' {aka 'struct snd_pcm_oss'} has no member named 'caps'
      if (ioctl(oss->fd, SNDCTL_DSP_GETCAPS, &oss->caps) >= 0) {
                                                 ^~
    pcm_oss.c:576:13: error: 'snd_pcm_oss_t' {aka 'struct snd_pcm_oss'} has no member named 'caps'
       if (! (oss->caps & DSP_CAP_TRIGGER))
                 ^~
    
  • The existing patch file ports/audio/alsa-plugins/dragonfly/patch‑oss_pcm__oss.c shows the struct change and the +#ifdef __FreeBSD__ guard that does not extend to __DragonFly__.

Fix

Automated fix for the build failure in audio/alsa-plugins.

What changed

3 files changed, +7/-4

  • ports/audio/alsa-plugins/Makefile.DragonFly
  • ports/audio/alsa-plugins/STATUS
  • ports/audio/alsa-plugins/overlay.dops

Verification

Built successfully in a DragonFly dev-env (dsynth) for target @2026Q2.
Verified 2026-06-01T20:24:58.374466+00:00.

Provenance

  • Operator: operator
  • Agent: model=deepseek/deepseek-v4-pro attempts=1 tokens=896461

> Generated by the DragonFly agentic build-fix loop and verified in a clean dev-env. Reviewed and accepted by operator `operator` before submission.

## Problem

The build failed on `@2026Q2` — classified `compile-error`, confidence `high`.

The DragonFly‑specific static patch `patch‑oss_pcm__oss.c` removes the `caps` field from `struct snd_pcm_oss`, but the `oss_hw_constraint()` function contains a `#ifdef __FreeBSD__` block with a caps‑free implementation and an `#else` block that still references `oss->caps`. Because DragonFly does not define `__FreeBSD__`, the `#else` path is compiled against the modified struct, triggering the member‑not‑found error.

**Evidence:**

- From `errors.txt` (tail of build log):
  ```
  pcm_oss.c:574:5: error: 'snd_pcm_oss_t' {aka 'struct snd_pcm_oss'} has no member named 'caps'
    oss->caps = 0;
       ^~
  pcm_oss.c:575:45: error: 'snd_pcm_oss_t' {aka 'struct snd_pcm_oss'} has no member named 'caps'
    if (ioctl(oss->fd, SNDCTL_DSP_GETCAPS, &oss->caps) >= 0) {
                                               ^~
  pcm_oss.c:576:13: error: 'snd_pcm_oss_t' {aka 'struct snd_pcm_oss'} has no member named 'caps'
     if (! (oss->caps & DSP_CAP_TRIGGER))
               ^~
  ```
- The existing patch file `ports/audio/alsa-plugins/dragonfly/patch‑oss_pcm__oss.c` shows the struct change and the `+#ifdef __FreeBSD__` guard that does not extend to `__DragonFly__`.

## Fix

Automated fix for the build failure in `audio/alsa-plugins`.

## What changed

3 files changed, +7/-4

- `ports/audio/alsa-plugins/Makefile.DragonFly`
- `ports/audio/alsa-plugins/STATUS`
- `ports/audio/alsa-plugins/overlay.dops`

## Verification

Built successfully in a DragonFly dev-env (dsynth) for target `@2026Q2`.
Verified 2026-06-01T20:24:58.374466+00:00.

## Provenance

- Operator: operator
- Agent: model=deepseek/deepseek-v4-pro attempts=1 tokens=896461

Signed-off-by: Fred [bot] <github@dragonflybsd.org>
@tuxillo tuxillo closed this Jun 1, 2026
@tuxillo tuxillo deleted the agentic/audio-alsa-plugins-20260601-143332Z branch June 1, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants