Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default CMake configuration cannot build in Arch Linux using included fluidsynth #91

Open
MiltosKoutsokeras opened this issue Apr 4, 2019 · 0 comments

Comments

@MiltosKoutsokeras
Copy link

The compilation fails in Arch Linux when the default CMake RelWithDebInfo configuration is used, with ENABLE_SYSTEM_FLUIDSYNTH=OFF. This build command fails:

cmake svkaiser/Doom64EX && make

with a warning considered as error (-Werror=stringop-truncation) about string operation truncation on included fluidsynth library:

svkaiser/Doom64EX/fluidsynth/src/utils/fluidsynth_priv.h:209:38: error: ‘strncpy’ output may be truncated copying 16 bytes from a string of length 16 [-Werror=stringop-truncation] #define FLUID_STRNCPY(_dst,_src,_n) strncpy(_dst,_src,_n) ^~~~~~~~~~~~~~~~~~~~~ svkaiser/Doom64EX/fluidsynth/src/synth/fluid_synth.c:1339:9: note: in expansion of macro ‘FLUID_STRNCPY’ FLUID_STRNCPY (resptr, name, 16); ^~~~~~~~~~~~~ cc1: all warnings being treated as errors

This error can be worked around by:

  • Using the system fluidsynth library provided by pacman. Install with sudo pacman -S fluidsynth and then build with the flag enabled cmake -DENABLE_SYSTEM_FLUIDSYNTH=ON svkaiser/Doom64EX && make

  • Compile with no optimization flag -O2 by removing the compiler flag from the CMakeLists.txt and fluidsynth/CMakeLists.txt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant