Linux build failing on develop, OggVorbis issue

After updating to latest develop, my Linux CI Is failing:

/<path-to>/juce-src/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp:53:2: error: expected unqualified-id
 JUCE_BEGIN_NO_SANITIZE ("undefined")
 ^
/<path-to>/juce-src/modules/juce_core/system/juce_CompilerWarnings.h:214:9: note: expanded from macro 'JUCE_BEGIN_NO_SANITIZE'
        _Pragma(JUCE_TO_STRING(clang attribute push(__attribute__((no_sanitize(warnings))), apply_to=function)))
        ^
<scratch space>:119:8: note: expanded from here
 clang attribute push(__attribute__((no_sanitize("undefined"))), apply_to=function)
       ^
In file included from /<path-to>/juce-src/modules/juce_audio_formats/juce_audio_formats.cpp:67:
In file included from /<path-to>/juce-src/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp:57:
/<path-to>/juce-src/modules/juce_audio_formats/codecs/oggvorbis/vorbisfile.h:40:43: error: unknown type name 'ogg_int64_t'
  int    (*seek_func)  (void *datasource, ogg_int64_t offset, int whence);
                                          ^
/<path-to>/juce-src/modules/juce_audio_formats/codecs/oggvorbis/vorbisfile.h:113:3: error: unknown type name 'ogg_int64_t'
  ogg_int64_t      offset;
  ^
/<path-to>/juce-src/modules/juce_audio_formats/codecs/oggvorbis/vorbisfile.h:114:3: error: unknown type name 'ogg_int64_t'
  ogg_int64_t      end;
  ^
/<path-to>/juce-src/modules/juce_audio_formats/codecs/oggvorbis/vorbisfile.h:115:3: error: unknown type name 'ogg_sync_state'
  ogg_sync_state   oy;
  ^
/<path-to>/juce-src/modules/juce_audio_formats/codecs/oggvorbis/vorbisfile.h:120:3: error: unknown type name 'ogg_int64_t'
  ogg_int64_t     *offsets;
  ^
/<path-to>/juce-src/modules/juce_audio_formats/codecs/oggvorbis/vorbisfile.h:121:3: error: unknown type name 'ogg_int64_t'
  ogg_int64_t     *dataoffsets;
  ^
/<path-to>/juce-src/modules/juce_audio_formats/codecs/oggvorbis/vorbisfile.h:123:3: error: unknown type name 'ogg_int64_t'
  ogg_int64_t     *pcmlengths; /* overloaded to maintain binary
  ^
/<path-to>/juce-src/modules/juce_audio_formats/codecs/oggvorbis/vorbisfile.h:126:3: error: unknown type name 'vorbis_info'
  vorbis_info     *vi;
  ^
/<path-to>/juce-src/modules/juce_audio_formats/codecs/oggvorbis/vorbisfile.h:127:3: error: unknown type name 'vorbis_comment'
  vorbis_comment  *vc;
  ^
/<path-to>/juce-src/modules/juce_audio_formats/codecs/oggvorbis/vorbisfile.h:130:3: error: unknown type name 'ogg_int64_t'
  ogg_int64_t      pcm_offset;
  ^
/<path-to>/juce-src/modules/juce_audio_formats/codecs/oggvorbis/vorbisfile.h:138:3: error: unknown type name 'ogg_stream_state'
  ogg_stream_state os; /* take physical pages, weld into a logical
  ^
/<path-to>/juce-src/modules/juce_audio_formats/codecs/oggvorbis/vorbisfile.h:140:3: error: unknown type name 'vorbis_dsp_state'
  vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
  ^
/<path-to>/juce-src/modules/juce_audio_formats/codecs/oggvorbis/vorbisfile.h:141:3: error: unknown type name 'vorbis_block'
  vorbis_block     vb; /* local working space for packet->PCM decode */
  ^
/<path-to>/juce-src/modules/juce_audio_formats/codecs/oggvorbis/vorbisfile.h:165:8: error: unknown type name 'ogg_int64_t'
extern ogg_int64_t ov_raw_total(OggVorbis_File *vf,int i);
       ^
/<path-to>/juce-src/modules/juce_audio_formats/codecs/oggvorbis/vorbisfile.h:166:8: error: unknown type name 'ogg_int64_t'
extern ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i);
       ^
/<path-to>/juce-src/modules/juce_audio_formats/codecs/oggvorbis/vorbisfile.h:169:43: error: unknown type name 'ogg_int64_t'
extern int ov_raw_seek(OggVorbis_File *vf,ogg_int64_t pos);
                                          ^
/<path-to>/juce-src/modules/juce_audio_formats/codecs/oggvorbis/vorbisfile.h:170:43: error: unknown type name 'ogg_int64_t'
extern int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos);
                                          ^
/<path-to>/juce-src/modules/juce_audio_formats/codecs/oggvorbis/vorbisfile.h:171:48: error: unknown type name 'ogg_int64_t'
extern int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos);
                                               ^

Please note we are using the Tracktion fork of JUCE, at the tracktion/develop branch.

Can you let me know what compiler + version you’re using please?

Sure: clang 6.0

Thanks. I’m not sure exactly what’s going on here - clang 5 is able to compile simple programs using JUCE_BEGIN_NO_SANITIZE, at least on Compiler Explorer. I think the behaviour you’re seeing might be due to a compiler bug affecting Clang versions up to version 8.

In any case, we can work around this issue by making JUCE_BEGIN_NO_SANITIZE expand to nothing on clang versions lower than 9. Hopefully this change will be available shortly.

1 Like

The issue should be fixed here:

1 Like