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

Build failure when processing VersionResource.rc #1448

Closed
pedrolcl opened this issue Dec 8, 2024 · 1 comment · Fixed by #1449
Closed

Build failure when processing VersionResource.rc #1448

pedrolcl opened this issue Dec 8, 2024 · 1 comment · Fixed by #1449
Labels

Comments

@pedrolcl
Copy link
Contributor

pedrolcl commented Dec 8, 2024

FluidSynth version

[cmake] Build Summary:
[cmake] FluidSynth Version: 2.4.1
[cmake] Library version: 3.3.1
[cmake] Git revision: e604d9e
[cmake] Build type: Debug

This corresponds to the current git master branch.

Describe the bug

When building Fluidsynth with MSys2 and MinGW64's windres.exe, I get this error message:

[47/57 2.5/sec] Building RC object src/CMakeFiles/libfluidsynth-OBJ.dir/VersionResource.rc.obj
FAILED: src/CMakeFiles/libfluidsynth-OBJ.dir/VersionResource.rc.obj 
C:\msys64\mingw64\bin\windres.exe -O coff -DDEBUG -I C:/Users/plcl/Projects/fluidsynth/build/Debug -I C:/Users/plcl/Projects/fluidsynth/build/Debug/include -I C:/Users/plcl/Projects/fluidsynth/src -I C:/Users/plcl/Projects/fluidsynth/src/drivers -I C:/Users/plcl/Projects/fluidsynth/src/synth -I C:/Users/plcl/Projects/fluidsynth/src/rvoice -I C:/Users/plcl/Projects/fluidsynth/src/midi -I C:/Users/plcl/Projects/fluidsynth/src/utils -I C:/Users/plcl/Projects/fluidsynth/src/sfloader -I C:/Users/plcl/Projects/fluidsynth/src/bindings -I C:/Users/plcl/Projects/fluidsynth/include -I C:/msys64/mingw64/include/glib-2.0 -I C:/msys64/mingw64/lib/glib-2.0/include -I C:/msys64/mingw64/include -I C:/msys64/mingw64/include/dbus-1.0 -I C:/msys64/mingw64/lib/dbus-1.0/include -I C:/msys64/mingw64/include/readline -I C:/msys64/mingw64/include/readline/.. -D _UNICODE -D UNICODE -D _WIN32_WINNT=0x0A00 -D WINVER=0x0A00 -DFLUIDSYNTH_DLL_EXPORTS C:/Users/plcl/Projects/fluidsynth/build/Debug/src/VersionResource.rc src/CMakeFiles/libfluidsynth-OBJ.dir/VersionResource.rc.obj
C:\msys64\mingw64\bin\windres.exe: preprocessing failed.

Expected behavior

The build process should succeed.

Steps to reproduce

Additional context

This may be a bug on this particular toolchain, and a workaround is to replace the version of windres.exe with another executable, for instance the one that is distributed by Qt. The root of the problem is that windres.exe does not find the headers included in VersionResource.rc correctly. Another workaround is fixing the "-I" arguments of the command.

Anyway, the current cmake script that generates this build step: "generate_product_version.cmake" in cmake_admin has more shortcomings:

  • It provides versioninfo only to the libfluidsynth.dll, but not to the fluidsynth.exe program.
  • It is unnecessarily complicated. It may be replaced by a single call to the cmake macro configure_file() applied to a VersionResource.rc.in file template
  • It has no copyright and license attached, and the origin of this script is unclear.

In short: I want to replace it.

@pedrolcl
Copy link
Contributor Author

pedrolcl commented Dec 8, 2024

Looks like this is a fairly common problem:
msys2/MINGW-packages#534

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

Successfully merging a pull request may close this issue.

1 participant