8000 [sink_flac] missing SWAPS definition by tperale · Pull Request #407 · aubio/aubio · GitHub
[go: up one dir, main page]

Skip to content

[sink_flac] missing SWAPS definition - #407

Closed
tperale wants to merge 1 commit into
aubio:masterfrom
tperale:fix_swaps
Closed

tperale wants to merge 1 commit into
aubio:masterfrom
tperale:fix_swaps

Conversation

@tperale
@tperale tperale commented Sep 22, 2024
Copy link
Copy Markdown
Contributor

On big endian architecture with libflac enabled the following error would happen when cross-compiling aubio with buildroot.

[ 75/243] Linking build/tests/test-pitchshift
/home/autobuild/autobuild/instance-16/output-1/per-package/aubio/host/bin/../lib/gcc/mips64-buildroot-linux-gnu/13.3.0/../../../../mips64-buildroot-linux-gnu/bin/ld: src/libaubio.so: undefined reference to `SWAPS'
collect2: error: ld returned 1 exit status

Waf: Leaving directory `/home/autobuild/autobuild/instance-16/output-1/build/aubio-152d6819b360c2e7b379ee3f373d444ab3df0895/build'
Build failed

Indeed there is a missing definition of the SWAPS macro in /src/io/sink_flac.c file.
This commit copy the SWAPS definition from the
/src/io/sink_wavwrite.c file in sink_flac.c to fix this issue.

The build logs are available here https://autobuild.buildroot.org/?reason=aubio-152d6819b360c2e7b379ee3f373d444ab3df0895

On big endian architecture with libflac enabled the following error
would happen when cross-compiling aubio with buildroot.

```
[ 75/243] Linking build/tests/test-pitchshift
/home/autobuild/autobuild/instance-16/output-1/per-package/aubio/host/bin/../lib/gcc/mips64-buildroot-linux-gnu/13.3.0/../../../../mips64-buildroot-linux-gnu/bin/ld: src/libaubio.so: undefined reference to `SWAPS'
collect2: error: ld returned 1 exit status

Waf: Leaving directory `/home/autobuild/autobuild/instance-16/output-1/build/aubio-152d6819b360c2e7b379ee3f373d444ab3df0895/build'
Build failed
```

Indeed there is a missing definition of the `SWAPS` macro in
`/src/io/sink_flac.c` file.
This commit copy the `SWAPS` definition from the
`/src/io/sink_wavwrite.c` file in `sink_flac.c` to fix this issue.

Signed-off-by: Thomas Perale <thomas.perale@mind.be>
joshsc63 pushed a commit to joshsc63/aubio-modernized that referenced this pull request Oct 28, 2025
Merges essential compatibility fixes from upstream aubio community:

- PR aubio#418: FFmpeg deprecated channel layout fix (Lluc Simó)
- PR aubio#416: Python regex raw strings (Pink Serenity)
- PR aubio#407: Big-endian FLAC support (Thomas Perale)
- PR aubio#371: MSVC UTF-8 encoding (lidotcircle)
- PR aubio#321: Documentation typo fix (Tim Gates)
- PR aubio#411: Demo script output fix (Stefan Sauer)

These fixes enhance aubio-modernized compatibility with:
✅ FFmpeg 7.0/8.0+ (channel layout API)
✅ Python 3.x best practices (raw strings)
✅ Big-endian architectures (MIPS, PowerPC)
✅ Windows MSVC (UTF-8 support)
✅ Documentation quality
✅ Demo usability

All changes are minimal, targeted fixes from community contributors.
Credits to original PR authors for their excellent work.

Related: aubio#418, aubio#416, aubio#407, aubio#371, aubio#321, aubio#411
@joshsc63
Copy link
Copy Markdown

Thank you @tperale for this essential big-endian architecture fix! 🎉

Your fix has been included in PR #428, which consolidates 8 community PRs for easier maintainer review:
#428

What's Included

PR #428 includes your big-endian FLAC support alongside:

  • NumPy 1.26.4 + GCC 14 compatibility
  • FFmpeg 7.0/8.0 compatibility
  • Python regex improvements
  • Windows MSVC UTF-8 encoding
  • Documentation fixes
  • Demo improvements

Why Consolidate?

Since this PR and several others have been awaiting review for extended periods, I've consolidated them to:

  • ✅ Speed up integration of valuable community fixes
  • ✅ Reduce review overhead for maintainers
  • ✅ Preserve all original authorship (git history intact)
  • ✅ Benefit the entire aubio ecosystem

Your Credit

Your authorship is fully preserved in:

Your fix ensures aubio works on MIPS, PowerPC, and other big-endian systems. Thank you for improving aubio's architecture compatibility!

@joshsc63
Copy link
Copy Markdown

🚀 Available Now in aubio-modernized

Your big-endian FLAC fix is already live in aubio-modernized!

Installation

pip install git+https://github.com/joshsc63/aubio-modernized.git@master

Repository

https://github.com/joshsc63/aubio-modernized

Users on MIPS, PowerPC, and other big-endian systems can benefit from your fix immediately. Thank you for improving architecture compatibility!

@piem piem closed this in b34ed46 Nov 16, 2025
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.

2 participants

0