windows-x64-static fails to build on VS2015
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
EPICS Base |
Invalid
|
Undecided
|
rivers |
Bug Description
Building EPICS base 7.0.1.1 with VS 2015, windows-x64-static failed as follows:
forceBadAllocEx
process_begin: CreateProcess(NULL, rc -l 0x409 -I. -I../O.Common -I. -I../..
default -I.. -I../../src/as -I../..
nv -I../../src/error -I../../src/fdmgr -I../../src/flex -I../..
i -I../../src/pool -I../../src/ring -I../../src/taskwd -I../../src/timer -I../../src/yacc -I../../src/yacc -I../../src/yajl -IH:/epics-
pics-devel/
-devel/
make (e=2): The system cannot find the file specified.
H:/epics-
make[4]: *** [Com.res] Error 2
make[4]: *** Waiting for unfinished jobs....
iocLogServer.c
../../src/
H:/epics-
make[3]: *** [install.
H:/epics-
make[2]: *** [src.install] Error 2
../configure/
make[1]: *** [libcom.install] Error 2
configure/
make: *** [modules.install] Error 2
This problem was because the "rc.exe" (resource compiler) program could not be found.
I believe this was a side-effect of installing VS2017 on the same computer where VS2015 was already installed. I believe rc.exe was previously located in
C:\Program Files (x86)\Windows Kits\10\bin\x64
because that is what the VS2015 vcvarsall.bat puts in the PATH. However, after installing VS2017 that file is now in
C:\Program Files (x86)\Windows Kits\10\ bin\10. 0.16299. 0\x64
and there are 3 versions of the kit (10.0.16229.0 and 2 others).
It does not seem that the VS2015 vcvarsall.bat is smart enough to find the new location and add it to the path. I thus did that manually by adding these lines to the batch file I use to configure VS2015 and launch a cmd window.
rem It seems that the VS2017 installation messed up 2015 so it does not find rc.exe bin\10. 0.16299. 0\x64;% PATH%
rem Work around this by adding this to the path
set PATH=C:\Program Files (x86)\Windows Kits\10\