Opened 5 months ago

Closed 5 months ago

Last modified 2 months ago

#10668 closed defect (fixed)

ScummVM: Compiling error (FluidSynth)

Reported by: ctoroman Owned by: digitall
Priority: normal Component: Audio
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 Changed 5 months ago by ctoroman

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

comment:2 Changed 5 months ago by digitall

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 Changed 5 months ago by ctoroman

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 Changed 5 months ago by digitall

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 Changed 5 months ago by digitall

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 Changed 5 months ago by digitall

Owner: set to digitall
Resolution: fixed
Status: newclosed

comment:7 Changed 5 months ago by ctoroman

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 5 months ago by ctoroman (previous) (diff)

comment:8 Changed 5 months ago by digitall

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 Changed 2 months ago by digitall

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