Back to the Vavoom Forum Archives


Forum

[Fixed] [1.25-Linux X86_64] build fails with flac-1.2.1 [SOL

Wed, 24 Oct 2007 19:32:44

scen

On Linux, Vavoom 1.25 and later fails to compile if FLAC support is enabled (--with-flac) and [u:46mj1zv5]flac-1.2.1[/u:46mj1zv5] is installed. The error is:
g2 -W -Wall -pthread -D_REENTRANT  -c -o _____MAIN_EXE_-s_flac.o `test -f 's_flac.cpp' || echo './'`s_flac.cpp
s_flac.cpp: In member function ‘virtual void VFlacSampleLoader::Load(sfxinfo_t&, VStream&)’:
s_flac.cpp:149: error: cannot allocate an object of abstract type ‘VFlacSampleLoader::FStream’
s_flac.cpp:41: note:   because the following virtual functions are pure within ‘VFlacSampleLoader::FStream’:
/usr/include/FLAC++/decoder.h:160: note:        virtual FLAC__StreamDecoderReadStatus FLAC::Decoder::Stream::read_callback(FLAC__byte*, size_t*)
s_flac.cpp: In static member function ‘static VAudioCodec* VFlacAudioCodec::Create(VStream*)’:
s_flac.cpp:604: error: cannot allocate an object of abstract type ‘VFlacAudioCodec::FStream’
s_flac.cpp:71: note:   because the following virtual functions are pure within ‘VFlacAudioCodec::FStream’:
/usr/include/FLAC++/decoder.h:160: note:        virtual FLAC__StreamDecoderReadStatus FLAC::Decoder::Stream::read_callback(FLAC__byte*, size_t*)
make[2]: *** [_____MAIN_EXE_-s_flac.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/var/tmp/portage/games-fps/vavoom-9999/work/vavoom-9999/source'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/games-fps/vavoom-9999/work/vavoom-9999/source'
make: *** [all-recursive] Error 1
[EDIT] It occurs only on Linux X86_64, on x86 systems it builds fine.
Sat, 03 Nov 2007 18:45:30

Phenax

Confirmed on my box.
Sat, 10 Nov 2007 12:09:24

Janis Legzdinsh

Hopefully fixed. Check it out.
Sat, 10 Nov 2007 20:30:57

scen

The error is partially solved. The second part of the error output remains:
s_flac.cpp: In static member function ‘static VAudioCodec* VFlacAudioCodec::Create(VStream*)’:
s_flac.cpp:604: error: cannot allocate an object of abstract type ‘VFlacAudioCodec::FStream’
s_flac.cpp:71: note:   because the following virtual functions are pure within ‘VFlacAudioCodec::FStream’:
/usr/include/FLAC++/decoder.h:160: note:        virtual FLAC__StreamDecoderReadStatus FLAC::Decoder::Stream::read_callback(FLAC__byte*, size_t*)
[EDIT] Wow, i figure out how fix this issue <!-- s8) --><img src="{SMILIES_PATH}/icon_cool.gif" alt="8)" title="Cool" /><!-- s8) --> Here's the missing patch:
--- s_flac.cpp.bak      2007-11-10 21:24:53.000000000 +0100
+++ s_flac.cpp  2007-11-10 21:33:36.000000000 +0100
@@ -92,7 +92,7 @@
        protected:
                //      FLAC decoder callbacks.
                ::FLAC__StreamDecoderReadStatus read_callback(FLAC__byte buffer[],
-                       unsigned *bytes);
+                       size_t *bytes);
                ::FLAC__StreamDecoderWriteStatus write_callback(
                        const ::FLAC__Frame *frame, const FLAC__int32 * const buffer[]);
                void metadata_callback(const ::FLAC__StreamMetadata *metadata);
@@ -477,7 +477,7 @@
 //==========================================================================

 ::FLAC__StreamDecoderReadStatus VFlacAudioCodec::FStream::read_callback(
-       FLAC__byte buffer[], unsigned* bytes)
+       FLAC__byte buffer[], size_t* bytes)
 {
        guard(VFlacAudioCodec::FStream::read_callback);
        if (*bytes > 0)
Sun, 11 Nov 2007 19:12:53

Firebrand

I tried compiling this on winblows myself, but the game freezes when playing the flac samples <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->. Maybe there's some other change in the new version of libflac.
Sat, 17 Nov 2007 10:10:58

Janis Legzdinsh

Should compile fine now.
Sun, 18 Nov 2007 23:34:52

scen

[quote="Janis Legzdinsh":2ixt3rtf]Should compile fine now. Yeah, it's finally fixed. i can confirm it. <!-- s8) --><img src="{SMILIES_PATH}/icon_cool.gif" alt="8)" title="Cool" /><!-- s8) -->

Back to the Vavoom Forum Archives