EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Building Epics base 3.15.2 in Windows 7
From: Bob Soliday <[email protected]>
To: Mark Rivers <[email protected]>, "[email protected]" <[email protected]>
Date: Mon, 9 Nov 2015 16:01:43 -0600
Okay, I forgot I patched my local copy.

Change epicsExceptionTest.cpp from:

# if _MSC_VER > 1310 /* this gets fixed some release after visual studio 7 we hope */ static const size_t unsuccessfulNewSize = numeric_limits < size_t > :: max ();
#   else
static const size_t unsuccessfulNewSize = numeric_limits < size_t > :: max () - 100;
#   endif

to

#   if _MSC_VER >= 1900
static size_t unsuccessfulNewSize = numeric_limits < size_t > :: max (); # elif _MSC_VER > 1310 /* this gets fixed some release after visual studio 7 we hope */ static const size_t unsuccessfulNewSize = numeric_limits < size_t > :: max ();
#   else
static const size_t unsuccessfulNewSize = numeric_limits < size_t > :: max () - 100;
#   endif

This should probably be a patch on the known problems page.

On 11/09/2015 03:41 PM, Mark Rivers wrote:
Hi Bob,

Thanks for the hint.  You have solved half of my problem.  I am building both 32-bit and 64-bit on a 64-bit system.  Following your suggestion it now works on 64-bit but not on 32-bit.

On both Visual Studio 2010 and 2015 I have been invoking vxvarsall.bat for 64-bit builds as follows:

"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64

So I have been using the cross-compiler.  On Visual Studio 2010 this works fine.  However, on Visual Studio 2015 it leads to the error I reported in my previous message.

This is the output of "where cl":
C:\EPICS\base-3.15.2>where cl
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\cl.exe
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe

I then changed my batch file to call pass "amd64" rather than "x86_amd64" to vcvarsall.bat:
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64

After doing that I can build for windows-x64 on my 64-bit Windows 7 system fine.

However, when building for 32-bits I have the following from "where cl".
C:\EPICS>where cl
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe

So according to your message I am not using a cross-compiler, which should work. However, that leads to the error that Alexander and I reported previously:
cl -EHsc -GR                -nologo -D__STDC__=0 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE   -Ox -GL -Oy- -W3 -w44355        -MD -DEPICS_BUILD_DLL -DEPICS_CALL_DLL -TP  -I. -I../O.Common -I. -I. -I.. -I../../../../include/compiler/msvc -I../../../../include/os/WIN32 -I../../../../include         -c ../epicsExceptionTest.cpp
epicsExceptionTest.cpp
../epicsExceptionTest.cpp(59): error C2148: total size of array must not exceed 0x7fffffff bytes
../epicsExceptionTest.cpp(72): error C2148: total size of array must not exceed 0x7fffffff bytes
../../../../configure/RULES_BUILD:228: recipe for target 'epicsExceptionTest.obj' failed
make[3]: *** [epicsExceptionTest.obj] Error 2
make[3]: Leaving directory 'C:/EPICS/base-3.15.2/src/libCom/test/O.win32-x86'
../../../configure/RULES_ARCHS:61: recipe for target 'install.win32-x86' failed

I then tried using the amd64 to x86 cross compiler by invoking vcvarsall.bat with "amd64_x86".

After doing that this is the output of "where cl".
C:\EPICS\base-3.15.2>where cl
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64_x86\cl.exe
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\cl.exe

However,  building with that configuration also builds with the same error as above.

The code in question is this:

#   if _MSC_VER > 1310  /* this gets fixed some release after visual studio 7 we hope */
         static const size_t unsuccessfulNewSize = numeric_limits < size_t > :: max ();
#   else
         static const size_t unsuccessfulNewSize = numeric_limits < size_t > :: max () - 100;
#   endif
...
     try {
         char * p = new char [unsuccessfulNewSize];
         testFail("new char[%lu] returned %p",
             (unsigned long) unsuccessfulNewSize, p);
     }

So it is trying to allocate an array of invalid size, and hoping to get a run-time exception.  Instead it is getting a compiler error with the 32-bit compiler.

Note that this works fine with Visual Studio 2010 using the same configuration that fails in VS 2015.

It looks to me like the code that is testing the _MSC_VER above may need to be changed for VS 2015.

Mark



-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Bob Soliday
Sent: Monday, November 09, 2015 2:02 PM
To: [email protected]
Subject: Re: Building Epics base 3.15.2 in Windows 7

I think this error comes from using a cross compiler. Can you run "where
cl" and see which one you are using? For win32-x86 I have VC\bin\cl.ele,
for windows64-x64 I have VC\bin\amd64\cl.exe. If you see
VC\bin\x86_amd64\cl.exe or VC\bin\amd64_x86\cl.ele then you are using a
cross compiler. I saw this error when I was on a 64bit system running
32bit compiler that was producing a 64bit executable.

On 11/09/2015 01:10 PM, Mark Rivers wrote:
I get the same error building base 3.15.2 with the Visual Studio 2015 Community Edition on both win32-x86 and windows-x64.

cl -EHsc -GR                -nologo -D__STDC__=0 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE   -Ox -GL -Oy-   -W3 -w44355        -MD -DEPICS_BUILD_DLL -DEPICS_CALL_DLL -TP  -I. -I../O.Common -I. -I. -I.. -I../../../../include/compiler/msvc -I../../../../include/os/WIN32 -I../../../../include         -c ../epicsExceptionTest.cpp
epicsExceptionTest.cpp
../epicsExceptionTest.cpp(59): error C2148: total size of array must not exceed 0x7fffffff bytes
../epicsExceptionTest.cpp(72): error C2148: total size of array must not exceed 0x7fffffff bytes
../../../../configure/RULES_BUILD:228: recipe for target 'epicsExceptionTest.obj' failed
make[3]: *** [epicsExceptionTest.obj] Error 2
make[3]: Leaving directory 'C:/EPICS/base-3.15.2/src/libCom/test/O.windows-x64'
../../../configure/RULES_ARCHS:61: recipe for target 'install.windows-x64' failed
make[2]: *** [install.windows-x64] Error 2
make[2]: Leaving directory 'C:/EPICS/base-3.15.2/src/libCom/test'
../configure/RULES_DIRS:88: recipe for target 'libCom/test.install' failed
make[1]: *** [libCom/test.install] Error 2
make[1]: Leaving directory 'C:/EPICS/base-3.15.2/src'
configure/RULES_DIRS:88: recipe for target 'src.install' failed
make: *** [src.install] Error 2


cl -EHsc -GR                -nologo -D__STDC__=0 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE   -Ox -GL -Oy- -W3 -w44355        -MD -DEPICS_BUILD_DLL -DEPICS_CALL_DLL -TP  -I. -I../O.Common -I. -I. -I.. -I../../../../include/compiler/msvc -I../../../../include/os/WIN32 -I../../../../include         -c ../epicsExceptionTest.cpp
epicsExceptionTest.cpp
../epicsExceptionTest.cpp(59): error C2148: total size of array must not exceed 0x7fffffff bytes
../epicsExceptionTest.cpp(72): error C2148: total size of array must not exceed 0x7fffffff bytes
../../../../configure/RULES_BUILD:228: recipe for target 'epicsExceptionTest.obj' failed
make[3]: *** [epicsExceptionTest.obj] Error 2
make[3]: Leaving directory 'C:/EPICS/base-3.15.2/src/libCom/test/O.win32-x86'
../../../configure/RULES_ARCHS:61: recipe for target 'install.win32-x86' failed
make[2]: *** [install.win32-x86] Error 2
make[2]: Leaving directory 'C:/EPICS/base-3.15.2/src/libCom/test'
../configure/RULES_DIRS:88: recipe for target 'libCom/test.install' failed
make[1]: *** [libCom/test.install] Error 2
make[1]: Leaving directory 'C:/EPICS/base-3.15.2/src'
configure/RULES_DIRS:88: recipe for target 'src.install' failed
make: *** [src.install] Error 2


Mark

-----Original Message-----
From: Klyachko, Alexander Vitalievich [mailto:[email protected]]
Sent: Monday, November 09, 2015 12:28 PM
To: Mark Rivers; 'Pete Jemian'; [email protected]
Subject: Re: Building Epics base 3.15.2 in Windows 7

That worked very well - well, almost.
I installed VC++ support, now have vcvarsall.bat. Using it, make now get much farther, but I still get an error message:
Generating code
Finished generating code
cl -EHsc -GR                -nologo -D__STDC__=0 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE   -Ox -GL -Oy-   -W3 -w443
55        -MD -DEPICS_BUILD_DLL -DEPICS_CALL_DLL -TP  -I. -I../O.Common -I. -I. -I.. -I../../../../include/compiler/msvc -I../../.
./../include/os/WIN32 -I../../../../include         -c ../epicsExceptionTest.cpp
epicsExceptionTest.cpp
../epicsExceptionTest.cpp(59): error C2148: total size of array must not exceed 0x7fffffff bytes
../epicsExceptionTest.cpp(72): error C2148: total size of array must not exceed 0x7fffffff bytes
make[3]: *** [epicsExceptionTest.obj] Error 2
make[3]: Leaving directory `c:/base-3.15.2/src/libCom/test/O.win32-x86'
make[2]: *** [install.win32-x86] Error 2
make[2]: Leaving directory `c:/base-3.15.2/src/libCom/test'
make[1]: *** [libCom/test.install] Error 2
make[1]: Leaving directory `c:/base-3.15.2/src'
make: *** [src.install] Error 2

Thanks,
Alex.
________________________________________
From: Mark Rivers <[email protected]>
Sent: Saturday, November 7, 2015 11:57 AM
To: 'Pete Jemian'; [email protected]; Klyachko, Alexander Vitalievich
Subject: RE: Building Epics base 3.15.2 in Windows 7

I figured out my problem. I had not configured Visual Studio 2015 to have the VC++ language support.

I fixed this using Control Panel/Programs and Features/Microsoft Visual Studio 2015/Change and selected Modify.  I then checked the box for Programming Languages/VC++.  Once I did that then many more .bat files appeared, including Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat.

Alexander also reported that he did not have a vcvarsall.bat file on his system, so I suspect he has the same problem I did, and also needs to install the VC++ support in Visual Studio.  I think that once vcvarsall.bat is run from the cmd window startup that the EPICS build errors will be fixed.

Mark

________________________________________
From: Mark Rivers
Sent: Friday, November 06, 2015 5:05 PM
To: 'Pete Jemian'; [email protected]
Subject: RE: Building Epics base 3.15.2 in Windows 7

My installation is missing the vcvars64.bat and vcvarsall.bat files.  Perhaps some incorrect choice I made during installation?  Mine is also a new installation of 2015 Community, and I have not tried to use it either.

Mark


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Pete Jemian
Sent: Friday, November 06, 2015 5:01 PM
To: [email protected]
Subject: Re: Building Epics base 3.15.2 in Windows 7

perhaps this?
D:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\bin\amd64\vcvars64.bat

and what about this?
D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat

On 11/6/2015 4:38 PM, Mark Rivers wrote:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\vxvars32.bat

But that file is only for 32-bit builds.  I can't find a batch file for defining things for 64-bit builds.

Alexander, do you have a file for doing 64-bit builds on your system?

Mark
--
----------------------------------------------------------
Pete R. Jemian, Ph.D.                <[email protected]>
Beam line Controls and Data Acquisition, Group Leader
Advanced Photon Source,   Argonne National Laboratory
Argonne, IL  60439                   630 - 252 - 3189
-----------------------------------------------------------
      Education is the one thing for which people
         are willing to pay yet not receive.
-----------------------------------------------------------





Replies:
Re: Building Epics base 3.15.2 in Windows 7 Andrew Johnson
RE: Building Epics base 3.15.2 in Windows 7 Mark Rivers
References:
Building Epics base 3.15.2 in Windows 7 Klyachko, Alexander Vitalievich
RE: Building Epics base 3.15.2 in Windows 7 Mark S. Engbretson
RE: Building Epics base 3.15.2 in Windows 7 Mark S. Engbretson
RE: Building Epics base 3.15.2 in Windows 7 Mark Rivers
Re: Building Epics base 3.15.2 in Windows 7 Klyachko, Alexander Vitalievich
RE: Building Epics base 3.15.2 in Windows 7 Mark Rivers
Re: Building Epics base 3.15.2 in Windows 7 Klyachko, Alexander Vitalievich
RE: Building Epics base 3.15.2 in Windows 7 Mark S. Engbretson
Re: Building Epics base 3.15.2 in Windows 7 Klyachko, Alexander Vitalievich
RE: Building Epics base 3.15.2 in Windows 7 Mark Rivers
RE: Building Epics base 3.15.2 in Windows 7 Mark Rivers
Re: Building Epics base 3.15.2 in Windows 7 Pete Jemian
RE: Building Epics base 3.15.2 in Windows 7 Mark Rivers
RE: Building Epics base 3.15.2 in Windows 7 Mark Rivers
Re: Building Epics base 3.15.2 in Windows 7 Klyachko, Alexander Vitalievich
RE: Building Epics base 3.15.2 in Windows 7 Mark Rivers
Re: Building Epics base 3.15.2 in Windows 7 Bob Soliday
RE: Building Epics base 3.15.2 in Windows 7 Mark Rivers

Navigate by Date:
Prev: RE: Building Epics base 3.15.2 in Windows 7 Mark Rivers
Next: Re: Building Epics base 3.15.2 in Windows 7 Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Building Epics base 3.15.2 in Windows 7 Mark Rivers
Next: Re: Building Epics base 3.15.2 in Windows 7 Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·