Reply 21 of 29, by andy504

User metadata
Rank Newbie

Hi- There is a new bug when compiling the most recent source. CMake configures and generates fine, as far as I can tell. I now encounter this error, during 'make':

[ 98%] Building CXX object mt32emu_qt/CMakeFiles/mt32emu-qt.dir/src/audiodrv/QtAudioDriver.cpp.o
/munt-munt-ae9a535/mt32emu_qt/src/audiodrv/QtAudioDriver.cpp:70:34: error:
'estimateActualSampleRate' is a protected member of 'AudioStream'
realSampleRate = AudioStream::esti...
/Volumes/Mac_USB_HD/Andy/Downloads/munt-munt-ae9a535/mt32emu_qt/src/audiodrv/AudioDriver.h:17:16: note:
declared protected here
static double estimateActualSampleRate(const double sampleRate, ...
1 error generated.
make[2]: *** [mt32emu_qt/CMakeFiles/mt32emu-qt.dir/src/audiodrv/QtAudioDriver.cpp.o] Error 1
make[1]: *** [mt32emu_qt/CMakeFiles/mt32emu-qt.dir/all] Error 2
make: *** [all] Error 2

Same system as before. Any help would be appreciated. Thank you for all your hard work. 😀

Reply 24 of 29, by andy504

User metadata
Rank Newbie

I have found the solution. The problem is with Xcode's version of Clang. Mt32emu-qt compiled once I specified the compilers to /usr/bin/gcc and /usr/bin/g++ in CMake. That should be a temporary solution until/if Apple fixes the bug in its version of Clang.

Reply 25 of 29, by Dominus

User metadata
Rank DOSBox Moderator
DOSBox Moderator

Funnily as you are on Lion and thus on Xcode 4.2 or 4.3x you don't actually have gcc 😉 those gcc & g++ in usr/bin are just symlinks to lvm-gcc/g++
I've run into something like that too before some time ago. You could send Apple a bug report if you are in thd developer program.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox

Reply 27 of 29, by realnc

User metadata
Rank Member

I've tried to compile this in Linux. The cmake step failed because it couldn't find PulseAudio. I deleted that from the CMakeLists.txt.

Aftet that, the build aborted because it couldn't find "asoundlib.h". I've fixed mt32emu_qt/src/audiodrv/AlsaAudioDriver.h to #include <alsa/asoundlib.h> instead.

That worked and I got a binary. I ran it, but when I select "Options->ROM Configuration", it crashes with:

Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.

terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc

I'm on Qt 4.8.2.

Reply 28 of 29, by sergm

User metadata
Rank Oldbie

Oh, thanks.

As it reads at http://www.cmake.org/files/v2.8/CMakeChangeLog-2.8.8
Changes in CMake 2.8.8-rc1 (since 2.8.7)
FindALSA: Fix incorrect include path detection
The software world surely evolves 😀