Hi Tim,
I use Cygwin a lot too. I just don't use it in the terminal windows I use for building EPICS with Visual Studio.
For the terminal windows for building EPICS with Visual Studio I do the following, which is quite convenient.
- Create a batch file like the following. This is the one for 64-bit builds (setup_epics_vs2010_win64.bat)
******************************
rem This file sets up for an EPICS windows-x64 build
set EPICS_HOST_ARCH=windows-x64
rem These are the locations of "make", "re2c", "Perl", and EPICS base. Prepend them to the PATH.
set PATH=C:\Program Files (x86)\GnuWin32\bin;C:\Program Files (x86)\re2c;C:\Perl64\bin;H:\epics\base\bin\windows-x64;%PATH%
rem Execute the Visual Studio batch file for 64-bit builds
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86_amd64
******************************
This is the one for 32-bit builds (setup_epics_vx2010_win32.bat)
******************************
rem This file sets up for an EPICS win32-x86 build
set EPICS_HOST_ARCH=win32-x86
rem These are the locations of "make", "re2c", "Perl", and EPICS base. Prepend them to the PATH.
set PATH=C:\Program Files (x86)\GnuWin32\bin;C:\Program Files (x86)\re2c;C:\Perl64\bin;H:\epics\base\bin\win32-x86;%PATH%
rem Execute the Visual Studio batch file for 32-bit builds
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86
******************************
- Create a shortcut on the desktop. Make the target of the shortcut be:
C:\Windows\System32\cmd.exe /K C:\EPICS\setup_epics_vs2010_win64.bat
That shortcut will open a new cmd command shell, first executing the appropriate batch file. In the 64-bit window you can use the "set" command to switch EPICS_HOST_ARCH between
windows-x64, windows-x64-static, windows-x64-debug, etc. Same for 32-bit window of course.
As Andrew said it should be OK to have the Cygwin bin directory in your PATH as long the path to the supported versions of make, re2c and perl come first. I have not tested this.
When I run Cygwin I open a different Cygwin bash shell window.
Mark
-----Original Message-----
From: Madden, Timothy J. [mailto:[email protected]]
Sent: Monday, October 05, 2015 9:17 AM
To: [email protected]; Mark Rivers
Cc: [email protected]
Subject: RE: Building SEQ 2.2.3, Windows, EPICS Base 3-15-2
Mark and Freddie
Thanks for all the help. Useful stuff. Too bad about cygwin being out of my path. I can't live without it! :)
Tim
________________________________________
From: [email protected] [[email protected]]
Sent: Sunday, October 04, 2015 9:27 AM
To: Rivers, Mark L.; Madden, Timothy J.
Cc: [email protected]
Subject: RE: Building SEQ 2.2.3, Windows, EPICS Base 3-15-2
Hi,
I have now run a build through on windows 10 (x64) using make 4.1 (from EPICS web site), base 3.15.2, seq 2.2.3, strawberry perl 5.22.0 (x64) and visual studio 2015. The sequencer files all compile OK and "make -s runtests" is successful,
but I did encountered an error during the build process itself when it failed to generate "snl.bnf" - however after typing "make" a second time everything then runs to completion (the generated "snl.bnf" file is then blank though, but I believe this file is
only used to generate documentation)
The build error is:
link -nologo -debug -incremental:no -fixed:no /MACHINE:X64 -out:snc.exe lexer.obj snl.obj main.obj node.obj var_types.obj analysis.obj gen_code.obj gen_ss_code.obj gen_tables.obj sym_table.obj builtin.obj type_check.obj
c:/dev/epics-base/lib/windows-x64-debug/Com.lib
"Installing created executable ../../../bin/windows-x64-debug/snc.exe"
../Makefile:59: PATH_FILTER is deprecated; used for ../../../bin/windows-x64-debug/lemon.exe
../../../bin/windows-x64-debug/lemon.exe o=. -g ../snl.lem > ../O.Common/snl.bnf
'..' is not recognized as an internal or external command,
operable program or batch file.
../Makefile:59: recipe for target '../O.Common/snl.bnf' failed
make[3]: *** [../O.Common/snl.bnf] Error 1
make[3]: Leaving directory 'C:/dev/seq-2.2.3/src/snc/O.windows-x64-debug'
c:/dev/epics-base/configure/RULES_ARCHS:61: recipe for target 'install.windows-x64-debug' failed
make[2]: *** [install.windows-x64-debug] Error 2
make[2]: Leaving directory 'C:/dev/seq-2.2.3/src/snc'
c:/dev/epics-base/configure/RULES_DIRS:88: recipe for target 'snc.install' failed
make[1]: *** [snc.install] Error 2
make[1]: Leaving directory 'C:/dev/seq-2.2.3/src'
c:/dev/epics-base/configure/RULES_DIRS:88: recipe for target 'src.install' failed
make: *** [src.install] Error 2
make: Leaving directory 'C:/dev/seq-2.2.3'
resulting in an empty snl.bnf I can create a correct snl.bnf by manually running
..\..\..\bin\windows-x64-debug\lemon.exe o=. -g ..\snl.lem > ..\O.Common\snl.bnf
from my O.windows-x64-debug directory. If I happen to type instead
../../../bin/windows-x64-debug/lemon.exe
I get a " '..' is not recognized " error similar to above, which is a clue to what is happening. The problem seems to be caused by redirecting the output of the lemon command. The relevant Makefile line is:
$(COMMON_DIR)/snl.bnf: snl.lem
$(LEMON) o=. -g $< > $@
if i remove the "> $@" and just create a blank snl.bnf
$(COMMON_DIR)/snl.bnf: snl.lem
$(LEMON) o=. -g $<
@echo > $(COMMON_DIR)/snl.bnf
then the build runs fine. If I use the windows native path instead of $(LEMON) in the original line with output redirection, it is fine too. So it seems that redirecting the output of the lemon command stops correct pathname translation
on $(LEMON) prior to passing the command to windows, which I guess is a "make" bug?
Regards,
Freddie