Fluidsynth-related compilation error on Arch Linux #219

Closed
opened 2019-03-14 03:08:14 +00:00 by kforney · 2 comments
kforney commented 2019-03-14 03:08:14 +00:00 (Migrated from github.com)

I received the following error while attempting to compile mkxp on Arch Linux:

/data/devel/arch/AUR/mkxp-git/src/mkxp/src/fluid-fun.cpp: In function ‘void initFluidFunctions()’:                                                                                           
/data/devel/arch/AUR/mkxp-git/src/mkxp/src/fluid-fun.h:42:49: error: invalid conversion from ‘void (*)(fluid_synth_t*)’ {aka ‘void (*)(_fluid_synth_t*)’} to ‘DELETEFLUIDSYNTHPROC’ {aka ‘int (*)(_fluid_synth_t*)’} [-fpermissive]
  FLUID_FUN2(delete_synth, DELETEFLUIDSYNTHPROC, delete_fluid_synth)
                                                 ^~~~~~~~~~~~~~~~~~
/data/devel/arch/AUR/mkxp-git/src/mkxp/src/fluid-fun.cpp:35:15: note: in definition of macro ‘FLUID_FUN2’                                                                                    
  fluid.name = real_name;
               ^~~~~~~~~
/data/devel/arch/AUR/mkxp-git/src/mkxp/src/fluid-fun.cpp:55:1: note: in expansion of macro ‘FLUID_FUNCS2’                                                                                    
 FLUID_FUNCS2
 ^~~~~~~~~~~~
make[2]: *** [CMakeFiles/mkxp.dir/build.make:713: CMakeFiles/mkxp.dir/src/fluid-fun.cpp.o] Error 1                                                                                           
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/mkxp.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

If it matters, my FluidSynth version is 2.0.4.

I received the following error while attempting to compile mkxp on Arch Linux: ``` /data/devel/arch/AUR/mkxp-git/src/mkxp/src/fluid-fun.cpp: In function ‘void initFluidFunctions()’: /data/devel/arch/AUR/mkxp-git/src/mkxp/src/fluid-fun.h:42:49: error: invalid conversion from ‘void (*)(fluid_synth_t*)’ {aka ‘void (*)(_fluid_synth_t*)’} to ‘DELETEFLUIDSYNTHPROC’ {aka ‘int (*)(_fluid_synth_t*)’} [-fpermissive] FLUID_FUN2(delete_synth, DELETEFLUIDSYNTHPROC, delete_fluid_synth) ^~~~~~~~~~~~~~~~~~ /data/devel/arch/AUR/mkxp-git/src/mkxp/src/fluid-fun.cpp:35:15: note: in definition of macro ‘FLUID_FUN2’ fluid.name = real_name; ^~~~~~~~~ /data/devel/arch/AUR/mkxp-git/src/mkxp/src/fluid-fun.cpp:55:1: note: in expansion of macro ‘FLUID_FUNCS2’ FLUID_FUNCS2 ^~~~~~~~~~~~ make[2]: *** [CMakeFiles/mkxp.dir/build.make:713: CMakeFiles/mkxp.dir/src/fluid-fun.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/mkxp.dir/all] Error 2 make: *** [Makefile:84: all] Error 2 ``` If it matters, my FluidSynth version is 2.0.4.
Ancurio commented 2019-03-21 06:22:44 +00:00 (Migrated from github.com)

Looks like the signature changed in version 2.0, so I'd expect it to stay stable now. Best way is probably to single out the destructor and reinterpret_cast the function pointer, so we still compile with earlier versions.

Looks like the signature changed in version 2.0, so I'd expect it to stay stable now. Best way is probably to single out the destructor and reinterpret_cast the function pointer, so we still compile with earlier versions.
Ancurio commented 2019-03-21 06:53:17 +00:00 (Migrated from github.com)

Actually scratch that, the source incompatibility is only an issue if compilation is done with FLUID_SHARED enabled (ie. directly linking); since the default mode (dlsym'ing) still works regardless, I think it's reasonable to expect people wishing to link directly to have the most recent fluidsynth present.

Actually scratch that, the source incompatibility is only an issue if compilation is done with FLUID_SHARED enabled (ie. directly linking); since the default mode (dlsym'ing) still works regardless, I think it's reasonable to expect people wishing to link directly to have the most recent fluidsynth present.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: MapleShrine/mkxp#219
No description provided.