Skip to content

Commit d89a10b

Browse files
committed
Auto merge of #28340 - brson:configure, r=alexcrichton
Redirect stdout on the python bogosity detector. This is printing pwd to the terminal currently. Reformat the bogus python/cmake messages so they format correctly. echo does not always escape newlines (it doesn't here), and multiline strings don't whitespace munch. r? @alexcrichton
2 parents 33f0920 + 2662a72 commit d89a10b

File tree

1 file changed

+27
-9
lines changed

1 file changed

+27
-9
lines changed

configure

+27-9
Original file line numberDiff line numberDiff line change
@@ -1191,12 +1191,21 @@ do
11911191
#
11921192
# Consequently here we try to detect when that happens and print an
11931193
# error if it does.
1194-
if $CFG_PYTHON -c 'import sys; print sys.argv[1]' `pwd` | grep '^/'
1194+
if $CFG_PYTHON -c 'import sys; print sys.argv[1]' `pwd` | grep '^/' > /dev/null
11951195
then
1196-
err "python is silently translating windows paths to MSYS paths \
1197-
and the build will fail if this python is used.\n\n \
1198-
Either an official python install must be used or an \
1199-
alternative python package in MinGW must be used."
1196+
err "
1197+
1198+
python is silently translating windows paths to MSYS paths \
1199+
and the build will fail if this python is used.
1200+
1201+
Either an official python install must be used or an \
1202+
alternative python package in MinGW must be used.
1203+
1204+
If you are building under msys2 try installing the mingw-w64-x86_64-python2 \
1205+
package instead of python2:
1206+
1207+
$ pacman -R python2 && pacman -S mingw-w64-x86_64-python2
1208+
"
12001209
fi
12011210

12021211
# MSVC requires cmake because that's how we're going to build LLVM
@@ -1207,10 +1216,19 @@ do
12071216
# detect that here and error.
12081217
if ! "$CFG_CMAKE" --help | sed -n '/^Generators/,$p' | grep 'Visual Studio' > /dev/null
12091218
then
1210-
err "cmake does not support Visual Studio generators.\n\n \
1211-
This is likely due to it being an msys/cygwin build of cmake, \
1212-
rather than the required windows version, built using MinGW \
1213-
or Visual Studio."
1219+
err "
1220+
1221+
cmake does not support Visual Studio generators.
1222+
1223+
This is likely due to it being an msys/cygwin build of cmake, \
1224+
rather than the required windows version, built using MinGW \
1225+
or Visual Studio.
1226+
1227+
If you are building under msys2 try installing the mingw-w64-x86_64-cmake \
1228+
package instead of cmake:
1229+
1230+
$ pacman -R cmake && pacman -S mingw-w64-x86_64-cmake
1231+
"
12141232
fi
12151233

12161234
# Use the REG program to figure out where VS is installed

0 commit comments

Comments
 (0)