Open torm89 opened 6 years ago
We'll look into this, but it may take us a little while. We are preparing the next Anaconda release, and we can't spend much time on peripheral things right now.
In the meantime, you may want to update conda-build. There have been a few releases since 3.2.2 that may have fixed something related (though I'm not sure, just a shot in the dark).
@mingwandroid, this is looking like it is caused by a strange interaction with MSYS2's backslash conversion operation. This line is actually being run within an MSYS2 bash shell:
"C:/Windows/system32/cmd.exe" /C cscript /nologo /E:jscript ../../build/version_info_windows.js gcc intel64 "C:/Users/*******/conda-bld/r-rcppparallel_1517678566397/_h_env/R/../Library/mingw-w64/bin/g++ -g -O2 -DUSE_WINTHREAD -D_WIN32_WINNT=0x0502 -DMINGW_HAS_SECURE_API=1 -D__MSVCRT_VERSION__=0x0700 -msse -mthreads -m64 -mrtm -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-uninitialized -DTBB_NO_LEGACY=1 -std=c++0x -D_TBB_CPP0X -I../../src -I../../src/rml/include -I../../include -I." > version_string.ver
I'm able to reproduce the strange error message myself here in a different, slightly more isolated way. To do this, I let the build fail, jumped over to the build directory, and ran the contents of bld.bat
so that I could get the build environment activated and all of the environment variables set. Then, from the Windows command prompt, I ran sh
. Here's an example of what I see:
sh-4.3$ cmd.exe
Microsoft Windows [Version 10.0.17134.112]
(c) 2018 Microsoft Corporation. All rights reserved.
(C:\Users\mcg\Miniconda3\conda-bld\r-rcppparallel_1532112145094\_h_env) C:\Users\mcg\Miniconda3\conda-bld\r-rcppparallel_1532112145094\work\src\tbb\build\lib_release>exit
sh-4.3$ cmd.exe /?
'onda-bld' is not recognized as an internal or external command,
operable program or batch file.
Now, when you call cmd.exe
from Windows, cmd.exe /?
is just supposed to display the help text. But I think the path conversion is going a little bonkers here.
On the other hand, I happen to have m2-bash
installed in my root environment. If I run sh
from there, cmd /?
does exactly what I expect.
Ah! Check this out:
sh-4.3$ cmd.exe //C echo "C:/WINDOWS/system32/cmd.exe" /C cscript /nologo /E:jscript ../../build/version_info_windows.j
s gcc intel64 "C:/Users/mcg/Miniconda3/conda-bld/r-rcppparallel_1532112145094/_h_env/lib/R/../../Library/mingw-w64/bin/
g++ -g -O2 -DUSE_WINTHREAD -D_WIN32_WINNT=0x0502 -DMINGW_HAS_SECURE_API=1 -D__MSVCRT_VERSION__=0x0700 -msse -mthreads
-m64 -mrtm -D__TBB_BUILD=1 -Wall -DTBB_NO_LEGACY=1 -std=c++0x -I../../src -I../../src/rml/include -I../../include -
I."
C:/WINDOWS/system32/cmd.exe C:/ cscript C:/Users/mcg/Miniconda3/conda-bld/r-rcppparallel_1532112145094/_h_env/Library/nologo E:jscript ../../build/version_info_windows.js gcc intel64 "C:/Users/mcg/Miniconda3/conda-bld/r-rcppparallel_1532112145094/_h_env/lib/R/../../Library/mingw-w64/bin/g++ -g -O2 -DUSE_WINTHREAD -D_WIN32_WINNT=0x0502 -DMINGW_HAS_SECURE_API=1 -D__MSVCRT_VERSION__=0x0700 -msse -mthreads -m64 -mrtm -D__TBB_BUILD=1 -Wall -DTBB_NO_LEGACY=1 -std=c++0x -I../../src -I../../src/rml/include -I../../include -I."
You need to use MSYS2_ARG_CONV_EXCL
to disable the heuristic based path conversion that happens when Cygwin-y software calls native software, or avoid switches with /
in. In most cases (e.g. for MSVC, MS fixed this many years ago), you can use -
instead.
Looks like judicious use of double forward slashes fixes it. I'll get a patch built
This patch works, but I'm not sure I need all of the escapes:
*** src/tbb/build/windows.inc.orig 2018-07-20 19:40:45.000000000 -0500
--- src/tbb/build/windows.inc 2018-07-20 19:40:24.000000000 -0500
***************
*** 34,43 ****
ifneq ($(COMSPEC), )
# Use comspec env var if present
# Since it represents a full path, quote in case there are some spaces.
! CMD:="$(subst \,/,$(COMSPEC))" /C
else
# otherwise rely on cmd being in the path
! CMD:=cmd /C
endif
export SHELL = sh.exe
SLASH=/
--- 34,43 ----
ifneq ($(COMSPEC), )
# Use comspec env var if present
# Since it represents a full path, quote in case there are some spaces.
! CMD:="$(subst \,/,$(COMSPEC))" //C
else
# otherwise rely on cmd being in the path
! CMD:=cmd //C
endif
export SHELL = sh.exe
SLASH=/
***************
*** 49,63 ****
# A convenience wrapper for calls to detect.js.
# $(1) is the full command line for the script, e.g. /minversion icl 12
! detect_js = $(shell $(CMD) "cscript /nologo /E:jscript $(tbb_root)/build/detect.js $(1)")
# TODO give an error if archs doesn't match
ifndef arch
! export arch:=$(call detect_js, /arch $(compiler))
endif
ifndef runtime
! export runtime:=$(call detect_js, /runtime $(compiler))
endif
native_compiler := cl
--- 49,63 ----
# A convenience wrapper for calls to detect.js.
# $(1) is the full command line for the script, e.g. /minversion icl 12
! detect_js = $(shell $(CMD) "cscript //nologo //E:jscript $(tbb_root)/build/detect.js $(1)")
# TODO give an error if archs doesn't match
ifndef arch
! export arch:=$(call detect_js, //arch $(compiler))
endif
ifndef runtime
! export runtime:=$(call detect_js, //runtime $(compiler))
endif
native_compiler := cl
***************
*** 120,126 ****
RML.MANIFEST = tbbmanifest.exe.manifest
endif
! MAKE_VERSIONS = $(CMD) cscript /nologo /E:jscript $(subst \,/,$(tbb_root))/build/version_info_windows.js $(compiler) $(arch) $(subst \,/,"$(VERSION_FLAGS)") > version_string.ver
MAKE_TBBVARS = $(CMD) "$(subst /,\,$(tbb_root))\build\generate_tbbvars.bat"
TEST_LAUNCHER = $(subst /,\,$(tbb_root))\build\test_launcher.bat $(largs)
--- 120,126 ----
RML.MANIFEST = tbbmanifest.exe.manifest
endif
! MAKE_VERSIONS = $(CMD) cscript //nologo //E:jscript $(subst \,/,$(tbb_root))/build/version_info_windows.js $(compiler) $(arch) $(subst \,/,"$(VERSION_FLAGS)") > version_string.ver
MAKE_TBBVARS = $(CMD) "$(subst /,\,$(tbb_root))\build\generate_tbbvars.bat"
TEST_LAUNCHER = $(subst /,\,$(tbb_root))\build\test_launcher.bat $(largs)
Is it possible the error I'm seeing while updating conda is a similar issue, unescaped slashes causing a missing character in bash script? I'm worried about the error right after downloading and extracting packages. Should I be?
(base) C:\Users\Joshf>conda update -n base -c defaults conda
Collecting package metadata: done
Solving environment: done
## Package Plan ##
environment location: C:\Users\Joshf\AppData\Local\Continuum\anaconda3
added / updated specs:
- conda
The following packages will be downloaded:
package | build
---------------------------|-----------------
conda-4.6.14 | py37_0 2.1 MB
------------------------------------------------------------
Total: 2.1 MB
The following NEW packages will be INSTALLED:
pip pkgs/main/win-64::pip-19.0.3-py37_0
The following packages will be UPDATED:
conda 4.6.8-py37_0 --> 4.6.14-py37_0
Proceed ([y]/n)? y
Downloading and Extracting Packages
conda-4.6.14 | 2.1 MB | ############################################################################ | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
(base) C:\Users\Joshf>ONDA (
'ONDA' is not recognized as an internal or external command,
operable program or batch file.
(base) C:\Users\Joshf>FOR %A IN ("C:\Users\Joshf\AppData\Local\Continuum\anaconda3\Scripts\conda.exe") DO @SET _sysp=%~dpA
(base) C:\Users\Joshf>FOR %A IN ("C:\Users\Joshf\AppData\Local\Continuum\anaconda3\condabin\.") DO @SET _sysp=%~dpA
(base) C:\Users\Joshf>IF NOT EXIST "!_sysp!\Scripts\conda.exe"
Collecting package metadata: done
Solving environment: done
# All requested packages already installed.
Hi,
I'm trying to build RcppParallel package on Windows. I run conda-build. The package starts compiling but compilation breaks with error:
It is strange that
'YCZKO~1'
is part of TMP pathTMP=C:\Users\*YCZKO~1\AppData\Local\Temp\11
Can someone help me?