bug-gnu-libiconv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gnu-libiconv] windres/RC compilation of libiconv.rc fails


From: Philippe Payant
Subject: [bug-gnu-libiconv] windres/RC compilation of libiconv.rc fails
Date: Tue, 11 Apr 2023 16:51:10 -0400

I have this issue where my toolchain configuration makes it so that libiconv's configure script wants to use the rc.exe from the Windows Kit installation.  This is fine except for the fact that the full path to rc.exe is "C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64\rc.exe" and this contains spaces.  When the compilation of the resource file is launched, the path is not quoted and fails:

/bin/sh ../libtool --mode=compile --tag=RC C:/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x86/rc.exe `/bin/sh /c/users/philippe.payant/.conan/data/libiconv/1.16/_/_/build/164640aad040835ac89882393a96d89200694f04/src/lib/../windows/windres-options --escape 1.16` -i /c/users/philippe.payant/.conan/data/libiconv/1.16/_/_/build/164640aad040835ac89882393a96d89200694f04/src/lib/../windows/libiconv.rc -o libiconv.res.lo --output-format=coff

/bin/sh: -c: line 1: syntax error near unexpected token `('
/bin/sh: -c: line 1: `/bin/sh ../libtool --mode=compile --tag=RC C:/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x86/rc.exe `/bin/sh /c/users/philippe.payant/.conan/data/libiconv/1.16/_/_/build/164640aad040835ac89882393a96d89200694f04/src/lib/../windows/windres-options --escape 1.16` -i /c/users/philippe.payant/.conan/data/libiconv/1.16/_/_/build/164640aad040835ac89882393a96d89200694f04/src/lib/../windows/libiconv.rc -o libiconv.res.lo --output-format=coff'

Granted that here, the actual context for the build is within a Conan recipe and causes additional complications, but the issue is nonetheless relevant: if the configure script decides to (correctly) use rc.exe with spaces in the path, it should be able to invoke it.

At lib/Makefile.in, line 99, we have this:

 $(LIBTOOL_COMPILE) --tag=RC $(RC) `$(SHELL) $(srcdir)/../windows/windres-options --escape $(PACKAGE_VERSION)` -i $(srcdir)/../windows/libiconv.rc -o libiconv.res.lo --output-format=coff

I propose to quote $(RC).  Does this make sense?

--
Philippe

reply via email to

[Prev in Thread] Current Thread [Next in Thread]