My guess is that you’re trying to use an ANSI build of WxWidgets rather than a Unicode build.
Do you really need to build audacity from source? I thought that Open Suse already had a fairly up to date version of Audacity?
I installed wxWidgets from source, by default unicode is supported
it seems that the compilation issue I had is solved (thanks for your tip !),
however, I run now into a problem with ffmpeg (v2.6.2):
thanks for any suggestions,
[...]
g++ -DHAVE_CONFIG_H -I. -Wno-deprecated-declarations -D__STDC_CONSTANT_MACROS -DLIBDIR=\"/usr/lib64\" -I../lib-src/portaudio-v19/include -I../lib-src/libsndfile/src -I../lib-src/libsndfile/src -I../lib-src/libsoxr/src -I../lib-src/lib-widget-extra -I/usr/lib64/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I/usr/include/FLAC++ -I/usr/include/FLAC -I../lib-src/libnyquist -I../lib-src/lv2/include -I../lib-src/lv2/include -I../lib-src/portsmf -I../lib-src/sbsms/include -I../lib-src/libvamp -I/usr/lib64/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -Wno-unused-local-typedefs -I../lib-src/portmixer/include -DwxDEBUG_LEVEL=0 -Wall -I../include -I../lib-src/FileDialog -MT audacity-AudacityApp.o -MD -MP -MF .deps/audacity-AudacityApp.Tpo -c -o audacity-AudacityApp.o `test -f 'AudacityApp.cpp' || echo './'`AudacityApp.cpp
In file included from AudacityApp.cpp:73:0:
FFmpeg.h: In function ‘AVOutputFormat* av_oformat_next(AVOutputFormat*)’:
FFmpeg.h:692:25: error: declaration of C function ‘AVOutputFormat* av_oformat_next(AVOutputFormat*)’ conflicts with
(AVOutputFormat *f),
^
FFmpeg.h:486:18: note: in definition of macro ‘FFMPEG_FUNCTION_WITH_RETURN’
inline r n a \
^
In file included from FFmpeg.h:44:0,
from AudacityApp.cpp:73:
/usr/include/libavformat/avformat.h:1827:17: error: previous declaration ‘AVOutputFormat* av_oformat_next(const AVOutputFormat*)’ here
AVOutputFormat *av_oformat_next(const AVOutputFormat *f);
^
In file included from AudacityApp.cpp:73:0:
FFmpeg.h: In function ‘int av_fifo_size(AVFifoBuffer*)’:
FFmpeg.h:759:23: error: declaration of C function ‘int av_fifo_size(AVFifoBuffer*)’ conflicts with
(AVFifoBuffer *f),
^
FFmpeg.h:486:18: note: in definition of macro ‘FFMPEG_FUNCTION_WITH_RETURN’
inline r n a \
^
In file included from FFmpeg.h:45:0,
from AudacityApp.cpp:73:
/usr/include/libavutil/fifo.h:76:5: error: previous declaration ‘int av_fifo_size(const AVFifoBuffer*)’ here
int av_fifo_size(const AVFifoBuffer *f);
^
In file included from AudacityApp.cpp:73:0:
FFmpeg.h: In function ‘AVDictionaryEntry* av_dict_get(AVDictionary*, const char*, const AVDictionaryEntry*, int)’:
FFmpeg.h:805:82: error: declaration of C function ‘AVDictionaryEntry* av_dict_get(AVDictionary*, const char*, const AVDictionaryEntry*, int)’ conflicts with
(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags),
^
FFmpeg.h:486:18: note: in definition of macro ‘FFMPEG_FUNCTION_WITH_RETURN’
inline r n a \
^
In file included from /usr/include/libavcodec/avcodec.h:37:0,
from FFmpeg.h:43,
from AudacityApp.cpp:73:
/usr/include/libavutil/dict.h:104:20: error: previous declaration ‘AVDictionaryEntry* av_dict_get(const AVDictionary*, const char*, const AVDictionaryEntry*, int)’ here
AVDictionaryEntry *av_dict_get(const AVDictionary *m, const char *key,
^
AudacityApp.cpp: At global scope:
AudacityApp.cpp:240:13: warning: ‘void wxOnAssert(const wxChar*, int, const wxChar*)’ defined but not used [-Wunused-function]
static void wxOnAssert(const wxChar *fileName, int lineNumber, const wxChar *msg)
^
Makefile:2645: recipe for target 'audacity-AudacityApp.o' failed
make[2]: *** [audacity-AudacityApp.o] Error 1
make[2]: Leaving directory '/home/laurent/Download/audacity-minsrc-2.1.2/src'
Makefile:1346: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/laurent/Download/audacity-minsrc-2.1.2/src'
Makefile:716: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
I can answer my own post: my ffmpeg version is too high and not supported by audacity.
So I configured audacity without ffmpeg;
Doing so, I got:
[...]
g++ -DHAVE_CONFIG_H -I. -Wno-deprecated-declarations -D__STDC_CONSTANT_MACROS -DLIBDIR=\"/usr/lib64\" -I../lib-src/portaudio-v19/include -I../lib-src/libsndfile/src -I../lib-src/libsndfile/src -I../lib-src/libsoxr/src -I../lib-src/lib-widget-extra -I/usr/lib64/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I/usr/include/FLAC++ -I/usr/include/FLAC -I../lib-src/libnyquist -I../lib-src/lv2/include -I../lib-src/lv2/include -I../lib-src/portsmf -I../lib-src/sbsms/include -I../lib-src/libvamp -I/usr/lib64/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -Wno-unused-local-typedefs -I../lib-src/portmixer/include -DwxDEBUG_LEVEL=0 -Wall -I../include -I../lib-src/FileDialog -MT audacity-Menus.o -MD -MP -MF .deps/audacity-Menus.Tpo -c -o audacity-Menus.o `test -f 'Menus.cpp' || echo './'`Menus.cpp
In file included from NoteTrack.h:22:0,
from Menus.cpp:83:
../lib-src/portsmf/allegro.h: In member function ‘Alg_event*& Alg_events::operator[](int)’:
../lib-src/portsmf/allegro.h:338:33: error: ‘assert’ was not declared in this scope
assert(i >= 0 && i < len);
^
../lib-src/portsmf/allegro.h: In member function ‘Alg_beat& Alg_beats::operator[](int)’:
../lib-src/portsmf/allegro.h:453:33: error: ‘assert’ was not declared in this scope
assert(i >= 0 && i < len);
^
../lib-src/portsmf/allegro.h: In member function ‘const char* Serial_read_buffer::get_string()’:
../lib-src/portsmf/allegro.h:573:44: error: ‘assert’ was not declared in this scope
assert(ptr < fence);
^
../lib-src/portsmf/allegro.h: In member function ‘void Serial_read_buffer::check_input_buffer(long int)’:
../lib-src/portsmf/allegro.h:578:42: error: ‘assert’ was not declared in this scope
assert(get_posn() + needed <= len); }
^
../lib-src/portsmf/allegro.h: In member function ‘void Serial_write_buffer::store_long(long int, long int)’:
../lib-src/portsmf/allegro.h:595:40: error: ‘assert’ was not declared in this scope
assert(offset <= get_posn() - 4);
^
../lib-src/portsmf/allegro.h: In member function ‘void Serial_write_buffer::set_string(const char*)’:
../lib-src/portsmf/allegro.h:602:27: error: ‘assert’ was not declared in this scope
assert(ptr < fence);
^
../lib-src/portsmf/allegro.h: In member function ‘virtual Alg_event*& Alg_track::operator[](int)’:
../lib-src/portsmf/allegro.h:656:33: error: ‘assert’ was not declared in this scope
assert(i >= 0 && i < len);
^
../lib-src/portsmf/allegro.h: In member function ‘Alg_time_sig& Alg_time_sigs::operator[](int)’:
../lib-src/portsmf/allegro.h:861:33: error: ‘assert’ was not declared in this scope
assert(i >= 0 && i < len);
^
../lib-src/portsmf/allegro.h: In member function ‘Alg_track& Alg_tracks::operator[](int)’:
../lib-src/portsmf/allegro.h:892:33: error: ‘assert’ was not declared in this scope
assert(i >= 0 && i < len);
^
../lib-src/portsmf/allegro.h: In member function ‘virtual void Alg_seq::add(Alg_event_ptr)’:
../lib-src/portsmf/allegro.h:1100:49: error: ‘assert’ was not declared in this scope
void add(Alg_event_ptr event) { assert(false); } // call add_event instead
^
Menus.cpp: In member function ‘void AudacityProject::OnPaste()’:
Menus.cpp:4125:21: warning: unused variable ‘bResult’ [-Wunused-variable]
bool bResult = tmp->InsertSilence(0.0, msClipT1 - msClipT0); // MJS: Is this correct?
^
Menus.cpp: In member function ‘bool AudacityProject::HandlePasteNothingSelected()’:
Menus.cpp:4261:15: warning: unused variable ‘bResult’ [-Wunused-variable]
bool bResult = pNewTrack->Paste(0.0, pClip);
^
Makefile:3065: recipe for target 'audacity-Menus.o' failed
make[2]: *** [audacity-Menus.o] Error 1
make[2]: Leaving directory '/home/laurent/Download/audacity-minsrc-2.1.2/src'
Makefile:1346: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/laurent/Download/audacity-minsrc-2.1.2/src'
Makefile:716: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
this is curious since ./lib-src/portsmf/allegro.h has #include <assert.h>
so I do not understand what’s going on here;
any help would be appreciated;
I also tried building it on openSUSE 13.2 and I get this error. But I don’t get, what the problem is: what about that ANSI vs. Unicode thing?
How do I solve this now? Do I really have to compile wxWidgets to solve this problem?
As I assume you know, to help someone with a compilation error we need a minimum of the lines leading up to the error, and ideally the commands you used to configure Audacity.
Default Audacity configure is with unicode and you should not change that. So if you are trying to build Audacity 2.1.2, build it with a unicode version of wxWidgets 3.0.x, ideally 3.0.2. wxWidgets 3 defaults to unicode.