Hello. I am reporting what I have found, while trying to build certain
distributives with GNU Make 3.82.90 (for i686-pc-mingw32).

Although it seems to have nothing to do with SHELL itself -- I have heard
of MAKESHELL, -- no matter, what I set the SHELL variable to -- even if it
is in UNIX-style, Make tries to run the (expected, mind you, so it's not
the variable's fault!) shell using Windows path instead, which happens to
contain a whitespace.

Namely: the SHELL var. in the Make file was originally set to "/bin/sh",
which resulted in creating a Widows process from exe file "C:\Program
Files\Git\usr\bin\sh.exe". Apparently, this is where the "sh" shell resides
in underlying Windows, so naturally, "/bin/sh" must lead to the
aforementioned Windows exe file (because many "built-in" utilities are
there too). So that's not the problem.

The problem is the "Program Files" folder: because of the whitespace Make
fails to cook the recipe. I dare not to re-install Git and Git Bash as well
to another, whitespaceless location, because I'm afraid of what I might
lose then. Even if I could find a way to re-install it safely without any
data loss, the whitespace is still a problem: no user must be forced to
avoid whitespaces in file names. Thus I consider it a bug: a command line
must be wrapped in quot. marks, if it contains a whitespace. I don't know,
how to make Make do it.

This is what happens, when I try to build liblzma:

----
Making all in api
make[1]: Entering directory 'C:/Users/UserName/bin/xz-5.2.4/src/liblzma/api'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory 'C:/Users/UserName/bin/xz-5.2.4/src/liblzma/api'
make[1]: Entering directory 'C:/Users/UserName/bin/xz-5.2.4/src/liblzma'
  CC       liblzma_la-block_util.lo
/usr/bin/sh: C:/Program: No such file or directory
Makefile:1014: recipe for target 'liblzma_la-block_util.lo' failed
make[1]: *** [liblzma_la-block_util.lo] Error 127
make[1]: Leaving directory 'C:/Users/UserName/bin/xz-5.2.4/src/liblzma'
Makefile:1568: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
----

Makefile's 1014-th line contains the following (leading tab omitted here,
expansion follows):

----
"$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS)
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES)
$(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o
liblzma_la-block_util.lo `test -f 'common/block_util.c' || echo
'$(srcdir)/'`common/block_util.c"
----

which, I have checked, is expanded (note "Program Files" on the first line.
Clearly the path must be surrounded with quot. marks) to:

----
@echo "  CC      " echo;C:/Program Files/Git/usr/bin/sh.exe ../../libtool
--silent --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../..
 -I../../src/liblzma/api -I../../src/liblzma/common
-I../../src/liblzma/check -I../../src/liblzma/lz
-I../../src/liblzma/rangecoder -I../../src/liblzma/lzma
-I../../src/liblzma/delta -I../../src/liblzma/simple -I../../src/common
-DTUKLIB_SYMBOL_PREFIX=lzma_  -Wall -Wextra -Wvla -Wformat=2 -Winit-self
-Wmissing-include-dirs -Wstrict-aliasing -Wfloat-equal -Wundef -Wshadow
-Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wlogical-op
-Waggregate-return -Wstrict-prototypes -Wold-style-definition
-Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn
-Wredundant-decls -march=i686 -mtune=generic -Os -c -o
liblzma_la-block_util.lo `test -f 'common/block_util.c' || echo
'./'`common/block_util.c
----

When I run the output -- like the one above -- manually, taking care of the
whitespace myself, it seems to compile.

I would be ever so grateful, if someone would kindly fix this buggy
behaviour.

Signed,
Andrew.
_______________________________________________
Bug-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to