Skip to content

Test failure on 32-bit x86 (round-trip test (rt-1-12-1.aifc) encode... decode... compare... rt-1-12-1.aifc rt.aifc differ: char 8, line 1) #804

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
thesamesam opened this issue Feb 13, 2025 · 4 comments

Comments

@thesamesam
Copy link
Contributor

Building 1.5.0 or master (same) for x86 results in a failing test:

$ ./configure --prefix=/usr --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --target=i686-pc-linux-gnu --disable-programs CC="gcc -m32" CXX="g++ -m32" CFLAGS="-O2" CXXFLAGS="-O2" && make && make check
[...]
round-trip test (rt-8-12-1.aiff) encode... decode... compare... OK
round-trip test (rt-8-12-111.aiff) encode... decode... compare... OK
round-trip test (rt-8-12-4777.aiff) encode... decode... compare... OK
round-trip test (rt-8-16-1.aiff) encode... decode... compare... OK
round-trip test (rt-8-16-111.aiff) encode... decode... compare... OK
round-trip test (rt-8-16-4777.aiff) encode... decode... compare... OK
round-trip test (rt-8-20-1.aiff) encode... decode... compare... OK
round-trip test (rt-8-20-111.aiff) encode... decode... compare... OK
round-trip test (rt-8-20-4777.aiff) encode... decode... compare... OK
round-trip test (rt-8-24-1.aiff) encode... decode... compare... OK
round-trip test (rt-8-24-111.aiff) encode... decode... compare... OK
round-trip test (rt-8-24-4777.aiff) encode... decode... compare... OK
round-trip test (rt-8-8-1.aiff) encode... decode... compare... OK
round-trip test (rt-8-8-111.aiff) encode... decode... compare... OK
round-trip test (rt-8-8-4777.aiff) encode... decode... compare... OK
round-trip test (rt-1-12-1.aifc) encode... decode... compare... rt-1-12-1.aifc rt.aifc differ: char 8, line 1
ERROR: file mismatch
make[1]: *** [Makefile:716: check] Error 1
make[1]: Leaving directory '/home/sam/git/flac/test'
make: *** [Makefile:503: check-recursive] Error 1
~/git/flac/test $ diffoscope rt-1-12-1.aifc rt.aifc
--- rt-1-12-1.aifc
+++ rt.aifc
@@ -1,4 +1,4 @@
-00000000: 464f 524d 0000 0036 4149 4643 434f 4d4d  FORM...6AIFCCOMM
+00000000: 464f 524d 0000 0012 4149 4643 434f 4d4d  FORM....AIFCCOMM
 00000010: 0000 0018 0001 0000 0001 000c 400e ac44  [email protected]
 00000020: 0000 0000 0000 4e4f 4e45 0000 5353 4e44  ......NONE..SSND
 00000030: 0000 000a 0000 0000 0000 0000 0050       .............P

Logs above are w/ GCC 15 (unreleased) but I see the same w/ GCC 14 and 13.

The testsuite passes for amd64 (so dropping -m32) or if I drop --disable-programs.

@thesamesam
Copy link
Contributor Author

I suppose the actual difference is from write_iff.pl:

if ($format eq 'aiff') {
        die "sample data too big for format\n" if 46 + $datasize + $padding > 4294967295;
        # header
        print "FORM";
        print pack('N', 46 + $datasize + $padding);
        print "AIFF";
        # COMM chunk
        print "COMM";

What I don't yet see is how that relates to --disable-programs at all.

@thesamesam
Copy link
Contributor Author

The test is new in 669eae9

@thesamesam
Copy link
Contributor Author

thesamesam commented Feb 13, 2025

Oh, it's because with --disable-programs, it uses the system flac instead (rather than either always building the program for the tests but not installing it or skipping the tests).

We currently use --disable-programs for the multilib build in our packaging but we still want to test it if possible, while avoiding mutating the image / installed files based on whether tests are enabled.

@ktmf01
Copy link
Collaborator

ktmf01 commented Feb 13, 2025

Thanks for sifting through this. I'll fix this and add a CI entry.

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

No branches or pull requests

2 participants