Hi all, Second and hopefully final pre-release is here: http://downloads.xiph.org/releases/flac/beta/ I have personally tested this code on: x86-linux x86_64-linux powerpc-linux armhf-linux i386-freebsd9.1 i386-openbsd5.2 I also cross-compiled from Linux to 32 bit Windows and the compile ran to completion (the test suite requires a bunch of hacking before it can run under Wine). Ben Alison has also did the hard work required to make it compile with MSVC. Still need to work on the changelog. Cheers, Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
Erik, Sorry for the confusion. There is one more patch. I had it in the first attempt I made but somehow these changes weren't in the redone patch. As mentioned before, this removes some of the 'inline' from the bitreader and bitwriter functions that were used in another translation unit. I'm surprised that this code works on other platform. It must be a bug in GCC, or maybe deliberately non-standard behavior. See 6.7.4 of the C99 spec for details. -Ben Allison> Hi all, > > Second and hopefully final pre-release is here: > > http://downloads.xiph.org/releases/flac/beta/ > > I have personally tested this code on: > > x86-linux > x86_64-linux > powerpc-linux > armhf-linux > i386-freebsd9.1 > i386-openbsd5.2 > > I also cross-compiled from Linux to 32 bit Windows and the compile ran to > completion (the test suite requires a bunch of hacking before it can run > under Wine). > > Ben Alison has also did the hard work required to make it compile with > MSVC. > > Still need to work on the changelog. > > Cheers, > Erik > > -- > ---------------------------------------------------------------------- > Erik de Castro Lopo > http://www.mega-nerd.com/ > _______________________________________________ > flac-dev mailing list > flac-dev at xiph.org > http://lists.xiph.org/mailman/listinfo/flac-dev >-------------- next part -------------- A non-text attachment was scrubbed... Name: FLAC-1-3-0-MSVC-round-three.patch Type: application/octet-stream Size: 4072 bytes Desc: not available Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20130309/b5cc9030/attachment.obj
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 09.03.2013 15:37, Erik de Castro Lopo wrote:> Hi all, > > Second and hopefully final pre-release is here: > > http://downloads.xiph.org/releases/flac/beta/ >src/libFLAC/metadata_iterators.c:442:4: warning: implicit declaration of function 'ftello' [-Wimplicit-function-declaration] Same with ftello, it's all over the source code. Curiously, config.h contains: /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ /* #undef HAVE_FSEEKO */ for me, but FLAC doesn't seem to care... Here's a patch i've used. Compiles (mingw.org i386 gcc 4.7.2 + MSYS), passes the testsuite. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRPCQTAAoJEOs4Jb6SI2Cwu/gH/RgqFvNay07Fywz0rUcGqzRm c2jX1TRQ4dYg94x8dgn2VxGG/um1py1pko36zcxH22lx3hnz3AqttDrRBEy57Wxh dwXQyxbhgpJX1fG1mkj78n+Klh+G4bT5ALl/mvvBPgp8DI+KHwGKKn6LoCwRLhkS A2MbgAUBkMcLpctG9Q1V+mkNpWOq0IJM5LDbtGlJ+VQsVUt7IpxC+0ORT5bqot+M p8DtYkQxXyL0AUKrW3LkpA+MDPIK0iaH0fmhtZJCjcAjWH1Xf/q98mYa+FtpnCbi cZeeMTcoWtogLWkJEmCa0BnkCN4Gcyvoq1u2Zb1itBjszhK84V9rJD1+w22l49M=9CjS -----END PGP SIGNATURE----- -------------- next part -------------- --- flac-1.3.0pre2/include/share/compat.h.orig 2013-03-08 13:22:15 +0400 +++ flac-1.3.0pre2/include/share/compat.h 2013-03-10 09:30:43 +0400 @@ -55,6 +55,12 @@ #ifndef ftello #define ftello ftell #endif +#else +/* MinGW */ +#if !defined(HAVE_FSEEKO) +# define fseeko fseeko64 +# define ftello ftello64 +#endif #endif #endif
LRN wrote:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 09.03.2013 15:37, Erik de Castro Lopo wrote: > > Hi all, > > > > Second and hopefully final pre-release is here: > > > > http://downloads.xiph.org/releases/flac/beta/ > > > src/libFLAC/metadata_iterators.c:442:4: warning: implicit declaration > of function 'ftello' [-Wimplicit-function-declaration] > > Same with ftello, it's all over the source code.Patch applied. Thanks. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
Here's a patch that fixes the creation of larger than 2 GB FLAC files. Without this patch both GCC and MSVC compiles of FLAC will fail on Windows when they have written 2 GB file while encoding from stdin. And after 4GB when encoding from WAV file. It includes Ben Allison's MSVC changes and JonY's MinGW changes with some tweaks to make both environments happy. And I had to do some more inline changing to get my MSVC 2012 to compile the sources. There may still be some bug in FLAC's large input wav handling as the test FLAC I created by encoding over 22 hours of 24 bit data makes foobar2000 report one sample mismatch in reported and decoded length. Or it's a rounding bug in foobar2000. On 9.3.2013 13:37, Erik de Castro Lopo wrote:> Hi all, > > Second and hopefully final pre-release is here: > > http://downloads.xiph.org/releases/flac/beta/ > > I have personally tested this code on: > > x86-linux > x86_64-linux > powerpc-linux > armhf-linux > i386-freebsd9.1 > i386-openbsd5.2 > > I also cross-compiled from Linux to 32 bit Windows and the compile ran to > completion (the test suite requires a bunch of hacking before it can run > under Wine). > > Ben Alison has also did the hard work required to make it compile with MSVC. > > Still need to work on the changelog. > > Cheers, > Erik >-------------- next part -------------- A non-text attachment was scrubbed... Name: support_2gb_output.zip Type: application/x-zip-compressed Size: 12868 bytes Desc: not available Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20130310/8c8d6e8a/attachment-0001.bin
On Sat, Mar 09, 2013 at 12:28:28PM -0500, Ben Allison wrote:> Erik, > > Sorry for the confusion. There is one more patch. I had it in the first > attempt I made but somehow these changes weren't in the redone patch. > > As mentioned before, this removes some of the 'inline' from the bitreader > and bitwriter functions that were used in another translation unit. I'm > surprised that this code works on other platform. It must be a bug in > GCC, or maybe deliberately non-standard behavior. See 6.7.4 of the C99 > spec for details.I don't see the problem. What exactly is the compiler error? It seems the declarations in the header files don't have inline and they are included with the definitions, so they shouldn't be inline definitions and should be callable from other units. -- Miroslav Lichvar
Janne Hyv?rinen wrote:> Here's a patch that fixes the creation of larger than 2 GB FLAC files. > Without this patch both GCC and MSVC compiles of FLAC will fail on > Windows when they have written 2 GB file while encoding from stdin. And > after 4GB when encoding from WAV file.Ok.> It includes Ben Allison's MSVC changes and JonY's MinGW changes with > some tweaks to make both environments happy.Please don't do that. Adding bits of other patches makes it more difficult to evaluate and review this patch which is already difficult to review because of its size.> And I had to do some more > inline changing to get my MSVC 2012 to compile the sources.I would still like to have this problem explained to me.> There may still be some bug in FLAC's large input wav handling as the > test FLAC I created by encoding over 22 hours of 24 bit data makes > foobar2000 report one sample mismatch in reported and decoded length. Or > it's a rounding bug in foobar2000.Is it not possible to test this without involving foobar2000? Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
Ben Allison wrote:> As mentioned before, this removes some of the 'inline' from the bitreader > and bitwriter functions that were used in another translation unit. I'm > surprised that this code works on other platform. It must be a bug in > GCC, or maybe deliberately non-standard behavior. See 6.7.4 of the C99 > spec for details.I've read section 6.7.4 from here: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf My reading of that section suggests that the usage in FLAC is valid and correct. As for the addition of safe_malloc_mul_2op_ to file src/share/utf8/utf8.c, that simply should not be necessary. I suggest this is an error in the Visual Studio project files. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
Hi, On 03/09/13 03:37 am, Erik de Castro Lopo wrote:> Hi all, > > Second and hopefully final pre-release is here: > > http://downloads.xiph.org/releases/flac/beta/OS/2 now needs this patch. --- configure.ac.orig 2013-03-11 21:52:54.000000000 -0700 +++ configure.ac 2013-03-11 21:53:30.000000000 -0700 @@ -378,7 +378,7 @@ XIPH_ADD_CFLAGS([-D_FORTIFY_SOURCE=2]) case "$host_os" in - mingw32msvc | mingw32 | freebsd* ) + mingw32msvc | mingw32 | freebsd* | os2*) # Stack protector not working on these platforms 2013/03/09. ;; *) Dave
Dave Yeo wrote:> OS/2 now needs this patch. > --- configure.ac.orig 2013-03-11 21:52:54.000000000 -0700 > +++ configure.ac 2013-03-11 21:53:30.000000000 -0700 > @@ -378,7 +378,7 @@ > XIPH_ADD_CFLAGS([-D_FORTIFY_SOURCE=2]) > > case "$host_os" in > - mingw32msvc | mingw32 | freebsd* ) > + mingw32msvc | mingw32 | freebsd* | os2*) > # Stack protector not working on these platforms 2013/03/09. > ;; > *)Thats good feeback Dave, but I'm actually going to fix this by detecting at configure time if the stack protector stuff works correctly. Cheersm Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/