Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#10668 closed defect (fixed)

ScummVM: Compiling error (FluidSynth)

Reported by: ctoroman Owned by: digitall
Priority: normal Component: Audio
Version: Keywords:
Cc: Game:

Description

C++ audio/softsynth/appleiigs.o
C++ audio/softsynth/fluidsynth.o

audio/softsynth/fluidsynth.cpp: In member function 'void MidiDriver_FluidSynth::setInt(const char*, int)':
audio/softsynth/fluidsynth.cpp:91:44: error: invalid conversion from 'const char*' to 'char*'
audio/softsynth/fluidsynth.cpp: In member function 'void MidiDriver_FluidSynth::setNum(const char*, double)':
audio/softsynth/fluidsynth.cpp:95:44: error: invalid conversion from 'const char*' to 'char*'
audio/softsynth/fluidsynth.cpp: In member function 'void MidiDriver_FluidSynth::setStr(const char*, const char*)':
audio/softsynth/fluidsynth.cpp:99:44: error: invalid conversion from 'const char*' to 'char*'
audio/softsynth/fluidsynth.cpp:99:44: error: invalid conversion from 'const char*' to 'char*'
make: * [audio/softsynth/fluidsynth.o] Error 1

Change History (9)

comment:1 by ctoroman, 6 years ago

Summary: ScummVM: Compiling error (Fluidsynth)ScummVM: Compiling error (FluidSynth)

comment:2 by digitall, 6 years ago

This appears to be a regression from https://github.com/scummvm/scummvm/commit/a726b3bc896001041e2c73e7090900908349a207 which appears to actually be necessary in some cases.

@ctoroman Can you tell me what version of ScummVM you are trying to compile, on what Operating System and what version of Fluidsynth you are compiling against?

comment:3 by ctoroman, 6 years ago

ScummVM v2.1 (newest source code, downloaded via Git). Also tried download zip archive. The result is the same
OS Windows 7 x64, Windows 10 x64
FluidSynth v1.0.9

comment:4 by digitall, 6 years ago

Ah. Have identified the issue. That change broke compilation with older versions of Fluidsynth as the function signature was only made const char* in v1.1.7 release.

Since v1.0.9 is pretty old, you really should try using the latest v1.X release i.e. v1.1.11:
https://github.com/FluidSynth/fluidsynth/releases/tag/v1.1.11

The v2.0 releases have changed the API and thus will not be compatible without some code patches to ScummVM.

I would not normally do this, but since the code required to keep this working with earlier versions of Fluidsynth than v1.1.7 is pretty trivial, I will patch the code to allow linking against older versions. However, using the latest version of Fluidsynth would be highly recommended.

comment:5 by digitall, 6 years ago

Should be fixed by either updating to Fluidsynth v1.1.11 and/or using ScummVM git after https://github.com/scummvm/scummvm/commit/93ed8a2c47055f4b737d79925bf0bca30adda24f

comment:6 by digitall, 6 years ago

Owner: set to digitall
Resolution: fixed
Status: newclosed

comment:7 by ctoroman, 6 years ago

Thank you very much for your help. I have little experience in compiling programs. Fluidsynth v1.1.11 does not have a configure file. I have not yet figured out how to build it.

P.S. By the way, the instructions on wiki.scummvm.org say the following:
http://wiki.scummvm.org/index.php/Compiling_ScummVM/MinGW#Compiling_ScummVM_with_Minimalist_GNU_for_Windows_.28MINGW.29

fluidsynth. Optional, for soundfont MIDI support.
You need at least v1.0.9. Newer versions than this should work, but require GTK's glib and CMAKE to build.

Last edited 6 years ago by ctoroman (previous) (diff)

comment:8 by digitall, 6 years ago

Read the INSTALL file here:
https://github.com/FluidSynth/fluidsynth/blob/v1.1.11/INSTALL
https://github.com/FluidSynth/fluidsynth/blob/v1.1.11/README.cmake

Either use ./autogen.sh to build the configure and proceed (but this is deprecated) ... or use cmake i.e. https://cmake.org/

Ah OK. Thanks for letting us know.

comment:9 by digitall, 5 years ago

Component: --Unset--Audio
Note: See TracTickets for help on using tickets.