Page 1 of 4

audacity 2.1.2 fails to compile on open suse 13.2

Permanent link to this postPosted: Wed Feb 03, 2016 9:35 pm
Posted by Laurent14
hello,

audacity 2.1.2 fails to compile on my suse 13.2 64 bits;
I get
Code: Select all
[...]
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 -DwxDEBUG_LEVEL=0 -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 -DwxDEBUG_LEVEL=0 -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-DirManager.o -MD -MP -MF .deps/audacity-DirManager.Tpo -c -o audacity-DirManager.o `test -f 'DirManager.cpp' || echo './'`DirManager.cpp
In file included from /usr/include/wx-3.0/wx/intl.h:17:0,
                 from /usr/include/wx-3.0/wx/filename.h:17,
                 from DirManager.h:16,
                 from DirManager.cpp:65:
blockfile/../ondemand/ODDecodeTask.h: In member function ‘virtual const wxChar* ODDecodeTask::GetTip()’:
/usr/include/wx-3.0/wx/translation.h:38:58: error: cannot convert ‘const wxString’ to ‘const wxChar* {aka const wchar_t*}’ in return
     #define _(s)                     wxGetTranslation((s))
                                                          ^
blockfile/../ondemand/ODDecodeTask.h:57:42: note: in expansion of macro ‘_’
    virtual const wxChar* GetTip(){return _("Decoding Waveform");}
                                          ^
DirManager.cpp: In static member function ‘static void DirManager::CleanTempDir()’:
DirManager.cpp:397:88: error: cannot convert ‘const wxString’ to ‘const wxChar* {aka const wchar_t*}’ for argument ‘5’ to ‘void RecursivelyRemove(wxArrayString&, int, bool, bool, const wxChar*)’
    RecursivelyRemove(filePathArray, count, true, true, _("Cleaning up temporary files"));
                                                                                        ^
DirManager.cpp: In member function ‘bool DirManager::SetProject(wxString&, wxString&, bool)’:
DirManager.cpp:523:91: error: cannot convert ‘const wxString’ to ‘const wxChar* {aka const wchar_t*}’ for argument ‘5’ to ‘void RecursivelyRemove(wxArrayString&, int, bool, bool, const wxChar*)’
          RecursivelyRemove(dirlist, count, false, true, _("Cleaning up cache directories"));
                                                                                           ^
DirManager.cpp: In member function ‘wxFileName DirManager::MakeBlockFilePath(wxString)’:
DirManager.cpp:592:9: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wparentheses]
       if(!dir.DirExists() && !dir.Mkdir(0777,wxPATH_MKDIR_FULL))
         ^
DirManager.cpp: In member function ‘int DirManager::ProjectFSCK(bool, bool)’:
DirManager.cpp:1395:17: error: cannot convert ‘const wxString’ to ‘const wxChar* {aka const wchar_t*}’ in initialization
             NULL};
                 ^
DirManager.cpp:1395:17: error: cannot convert ‘const wxString’ to ‘const wxChar* {aka const wchar_t*}’ in initialization
DirManager.cpp:1412:40: error: cannot convert ‘const wxString’ to ‘const wxChar* {aka const wchar_t*}’ for argument ‘7’ to ‘int RecursivelyEnumerateWithProgress(wxString, wxArrayString&, wxString, bool, bool, int, const wxChar*)’
       _("Inspecting project file data"));
                                        ^
DirManager.cpp:1449:20: error: cannot convert ‘const wxString’ to ‘const wxChar* {aka const wchar_t*}’ in initialization
                NULL};
                    ^
DirManager.cpp:1449:20: error: cannot convert ‘const wxString’ to ‘const wxChar* {aka const wchar_t*}’ in initialization
DirManager.cpp:1449:20: error: cannot convert ‘const wxString’ to ‘const wxChar* {aka const wchar_t*}’ in initialization
DirManager.cpp:1511:41: error: cannot convert ‘const wxString’ to ‘const wxChar* {aka const wchar_t*}’ in initialization
                                     NULL};
                                         ^
DirManager.cpp:1511:41: error: cannot convert ‘const wxString’ to ‘const wxChar* {aka const wchar_t*}’ in initialization
DirManager.cpp:1511:41: error: cannot convert ‘const wxString’ to ‘const wxChar* {aka const wchar_t*}’ in initialization
DirManager.cpp:1570:20: error: cannot convert ‘const wxString’ to ‘const wxChar* {aka const wchar_t*}’ in initialization
                NULL};
                    ^
DirManager.cpp:1570:20: error: cannot convert ‘const wxString’ to ‘const wxChar* {aka const wchar_t*}’ in initialization
DirManager.cpp:1570:20: error: cannot convert ‘const wxString’ to ‘const wxChar* {aka const wchar_t*}’ in initialization
DirManager.cpp:1629:17: error: cannot convert ‘const wxString’ to ‘const wxChar* {aka const wchar_t*}’ in initialization
             NULL};
                 ^
DirManager.cpp:1629:17: error: cannot convert ‘const wxString’ to ‘const wxChar* {aka const wchar_t*}’ in initialization
DirManager.cpp:1629:17: error: cannot convert ‘const wxString’ to ‘const wxChar* {aka const wchar_t*}’ in initialization
DirManager.cpp: In member function ‘void DirManager::RemoveOrphanBlockfiles()’:
DirManager.cpp:1817:40: error: cannot convert ‘const wxString’ to ‘const wxChar* {aka const wchar_t*}’ for argument ‘7’ to ‘int RecursivelyEnumerateWithProgress(wxString, wxArrayString&, wxString, bool, bool, int, const wxChar*)’
       _("Inspecting project file data"));
                                        ^
Makefile:2407: recipe for target 'audacity-DirManager.o' failed
make[2]: *** [audacity-DirManager.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


big thanks for any help !

best regards,
Laurent

Re: audacity 2.1.2 fails to compile on open suse 13.2

Permanent link to this postPosted: Wed Feb 03, 2016 10:49 pm
Posted by steve
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?

Re: audacity 2.1.2 fails to compile on open suse 13.2

Permanent link to this postPosted: Thu Feb 04, 2016 6:48 am
Posted by Laurent14
that's right, but it is not up-to-update,
and open suse compiled audacity without MP3 support as always...

Re: audacity 2.1.2 fails to compile on open suse 13.2

Permanent link to this postPosted: Thu Feb 04, 2016 7:11 am
Posted by Laurent14
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,

Code: Select all
[...]
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

Re: audacity 2.1.2 fails to compile on open suse 13.2

Permanent link to this postPosted: Thu Feb 04, 2016 11:50 am
Posted by Laurent14
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:

Code: Select all
[...]
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;

Re: audacity 2.1.2 fails to compile on open suse 13.2

Permanent link to this postPosted: Thu Feb 04, 2016 12:07 pm
Posted by Gale Andrews
Please, use the "Code" button when pasting logs.

Gale

Re: audacity 2.1.2 fails to compile on open suse 13.2

Permanent link to this postPosted: Thu Feb 04, 2016 12:19 pm
Posted by steve
Audacity can sometimes be coaxed into using newer versions of ffmpeg by configuring Audacity with the --disable-dynamic-loading option.
Code: Select all
../configure --disable-dynamic-loading

(The two dots at the start assume that you are building into a sub-directory of the source code)

Re: audacity 2.1.2 fails to compile on open suse 13.2

Permanent link to this postPosted: Thu Feb 04, 2016 12:22 pm
Posted by Gale Andrews
Laurent14 wrote:this is curious since ./lib-src/portsmf/allegro.h has #include <assert.h>

Have you tried configuring with local portsmf ?


Gale

Re: audacity 2.1.2 fails to compile on open suse 13.2

Permanent link to this postPosted: Thu Feb 04, 2016 12:24 pm
Posted by Gale Andrews
steve wrote:Audacity can sometimes be coaxed into using newer versions of ffmpeg by configuring Audacity with the --disable-dynamic-loading option.

True, but FFmpeg has never worked properly for me in Audacity when I tried that on Ubuntu 15.x.


Gale

Re: audacity 2.1.2 fails to compile on open suse 13.2

Permanent link to this postPosted: Thu Feb 04, 2016 1:09 pm
Posted by Laurent14
Gale Andrews wrote:
Laurent14 wrote:this is curious since ./lib-src/portsmf/allegro.h has #include <assert.h>

Have you tried configuring with local portsmf ?


Gale


no; I just tried but portmidi failed to compile...
here is the error message if it can be useful:
Code: Select all
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot open output file /Release/libpmjni.so: No such file or directory
collect2: error: ld returned 1 exit status
pm_common/CMakeFiles/pmjni.dir/build.make:236: recipe for target '/Release/libpmjni.so' failed
make[2]: *** [/Release/libpmjni.so] Error 1
CMakeFiles/Makefile2:77: recipe for target 'pm_common/CMakeFiles/pmjni.dir/all' failed
make[1]: *** [pm_common/CMakeFiles/pmjni.dir/all] Error 2
Makefile:117: recipe for target 'all' failed
make: *** [all] Error 2

in portmidi, I only made
mkdir build
cd build
cmake ..
make