Hi Ben,
I have made the changes to seq-2-2-2 to get it to build on win32-x86, windows-x64, and cygwin-x86. These are all built dynamically, i.e. creating DLLs. seq-2-2-2 already worked
OK for win32-x86-static and windows-x64-static, i.e. static builds.
I am running EPICS base 3.14.12.5 with the one patch available at this time.
I have attached the patch file.
This is an explanation of each of the changes in the patch, in order in the patch file.
configure/RELEASE
-
Different version of EPICS_BASE. Obviously this is site-specific.
-
Added this line
-include $(TOP)/../configure/EPICS_BASE.$(EPICS_HOST_ARCH)
That line is very helpful when building synApps, since it allows a top-level
configure/EPICS_BASE.$(EPICS_HOST_ARCH) define a different path to EPICS base depending on the architecture.
Useful when building Windows and Linux in the same tree.
configure/RELEASE.win32-x86
-
Deleted this file. Using this mechanism requires 4 separate RELEASE.$(EPICS_HOST_ARCH) files if one is building for Windows 32/64, static/dynamic. The –include is a simpler
way to do this. This is obviously your call on how you would like to do it.
examples/demo/Makefile
-
This needed to be changed to build on cygwin-x86. All symbols that are imported because of a dbd file (i.e, function(), registrar(), etc.) must be in a library, they cannot
be built directly into a main program. Andrew Johnson can explain this further if you have questions.
src/seq/Makefile
src/seq_main.c
src/seq_prim_types.c (new file)
src/seq_prim_types.h
src/snc/var_types.c
-
The way that prim_types was being handled does not work on win32-x86, windows-x64, or cygwin-x86. Following Andrew Johnson’s suggestion I left only the structure definitions
in seq_prim_types.h (with epicsShareExtern) and moved the value assignments into the new seq_prim_types.c file. This works fine, and also cleans up seq_main.c and var_types.c.
src/snc/types.h
-
Include stdlib.h, otherwise calloc was not defined.
test/validate/Makefile
-
Put subThreadSleep.c into a new library. Same explanation as examples/demo/Makefile as above. Would not build on cygwin-x86.
With these changes seq builds on all 5 architectures I was working on. It also appears to function correctly.
However, the runtests do not succeed on any of the 5 architectures.
On win32-x86-static and windows-x64-static many of the tests succeeded, but in both cases it hung up in bittypeIoc.t. I had to kill them with ^C.
bittypesIoc.t .......... Starting iocInit
iocRun: All initialization complete
bittypesIoc.t .......... 1/24 ERROR: The process "softIoc.exe" not found.
Terminating on signal SIGINT(2)
Terminating on signal SIGINT(2)
make[2]: *** [runtests.win32-x86-static] Error 130
make[1]: *** [validate.runtests] Error 130
make: *** [test.runtests] Error 130
bittypesIoc.t .......... Starting iocInit
bittypesIoc.t .......... 1/24 cas warning: Configured TCP port was unavailable.
cas warning: Using dynamically assigned TCP port 65113,
cas warning: but now two or more servers share the same UDP port.
cas warning: Depending on your IP kernel this server may not be
cas warning: reachable with UDP unicast (a host's IP in EPICS_CA_ADDR_LIST)
iocRun: All initialization complete
Terminating on signal SIGINT(2)
The other 3 architectures (all dynamic) failed to run any tests because seq.dll was not found when trying to run the executables. The EPICS build system creates an IOC file called
dllPath.bat, which can be used to define the PATH to find all of the required DLLs. This needs to be somehow incorporated into the test harness.
Mark