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  2015  2016  2017  <20182019  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  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Stream fails on windows-x64 against base-7.0.2
From: Mark Rivers via Tech-talk <[email protected]>
To: "'Gofron, Kazimierz'" <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Thu, 20 Dec 2018 23:40:58 +0000

Hi Kaz,

 

I have been using the 2.7.7 release.  I just updated to the current master branch.

 

It built fine for me with base 7.0.2 and Visual Studio 2015 with windows-x64 (dynamic) build.

 

I then tested with Visual Studio 2010, which is what you are using.  It fails for me,  but with a very different error than you are getting:

 

cl -EHsc -GR               -nologo -FC -D__STDC__=0 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DUSE_TYPED_RSET   -Ox -GL -Oy-   -W3 -w44355 -w44344 -w44251     -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING    -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      -IJ:/epics/devel/asyn-4-33/include   -IJ:/epics/devel/calc-3-7/include   -IJ:/epics/devel/sscan-2-11-1/include -IH:/epics-devel/base-7.0.2/include/compiler/msvc -IH:/epics-devel/base-7.0.2/include/os/WIN32 -IH:/epics-devel/base-7.0.2/include        -c ../DebugInterface.cc

DebugInterface.cc

j:\epics\devel\stream\streamdevice\src\streambusinterface.h(29) : error C2051: case _expression_ not constant

j:\epics\devel\stream\streamdevice\src\streambusinterface.h(29) : warning C4065: switch statement contains 'default' but no 'case' labels

make[3]: *** [H:/epics-devel/base-7.0.2/configure/RULES_BUILD:239: DebugInterface.obj] Error 2

make[3]: Leaving directory 'J:/epics/devel/stream/StreamDevice/src/O.windows-x64-vs2010'

make[2]: *** [H:/epics-devel/base-7.0.2/configure/RULES_ARCHS:58: install.windows-x64-vs2010] Error 2

make[2]: Leaving directory 'J:/epics/devel/stream/StreamDevice/src'

make[1]: *** [H:/epics-devel/base-7.0.2/configure/RULES_DIRS:84: src.install] Error 2

make[1]: Leaving directory 'J:/epics/devel/stream/StreamDevice'

make: *** [configure/RULES_DIRS:88: StreamDevice.install] Error 2

 

I believe this is because the ENUM macro defined in MacroMagic.h does not work on VS 2010.

 

Are you sure you are really on the master branch? 

 

I then did the following, so I was on the latest tagged version with a few patches.

 

cd StreamDevice

git checkout stream_2_7_7

 

 

I then applied these patches which I had previously determined were necessary:

 

#########################################################################

corvette:stream/StreamDevice/src>git diff stream_2_7_7

diff --git a/src/StreamBuffer.cc b/src/StreamBuffer.cc

index 3b34de3..6e25f7e 100644

--- a/src/StreamBuffer.cc

+++ b/src/StreamBuffer.cc

@@ -314,7 +314,7 @@ dump() const

     StreamBuffer result(256+cap*5);

     result.append("\033[0m");

     size_t i;

-    result.print("%"P"d,%"P"d,%"P"d:\033[37m", offs, len, cap);

+    result.print("%" P "d,%" P "d,%" P "d:\033[37m", offs, len, cap);

     for (i = 0; i < cap; i++)

     {

         if (i == offs) result.append("\033[34m[\033[0m");

diff --git a/src/StreamBuffer.h b/src/StreamBuffer.h

index a016089..e4cb6a6 100644

--- a/src/StreamBuffer.h

+++ b/src/StreamBuffer.h

@@ -23,6 +23,8 @@

#include <string.h>

#include <stdlib.h>

 

+#include <sys/types.h>

+

#ifndef __GNUC__

#define __attribute__(x)

#endif

diff --git a/src/StreamCore.cc b/src/StreamCore.cc

index 1943bf1..ca59b6a 100644

--- a/src/StreamCore.cc

+++ b/src/StreamCore.cc

@@ -997,7 +997,7 @@ readCallback(StreamIoStatus status,

             finishProtocol(ReplyTimeout);

             return 0;

         case StreamIoFault:

-            error("%s: I/O error after reading %"P"d byte%s: \"%s%s\"\n",

+            error("%s: I/O error after reading %" P "d byte%s: \"%s%s\"\n",

                 name(),

                 inputBuffer.length(), inputBuffer.length()==1 ? "" : "s",

                 inputBuffer.length() > 20 ? "..." : "",

@@ -1006,7 +1006,7 @@ readCallback(StreamIoStatus status,

             return 0;

     }

     inputBuffer.append(input, size);

-    debug("StreamCore::readCallback(%s) inputBuffer=\"%s\", size %"P"d\n",

+    debug("StreamCore::readCallback(%s) inputBuffer=\"%s\", size %" P "d\n",

         name(), inputBuffer.expand()(), inputBuffer.length());

     if (*activeCommand != in_cmd)

     {

diff --git a/src/devaiStream.c b/src/devaiStream.c

index 7fc92cc..5741e05 100644

--- a/src/devaiStream.c

+++ b/src/devaiStream.c

@@ -19,17 +19,12 @@

***************************************************************/

 

#include <math.h>

+#include <epicsMath.h>

#include <menuConvert.h>

#include <aiRecord.h>

#include "devStream.h"

#include <epicsExport.h>

 

-#ifdef vxWorks

-#include <private/mathP.h>

-#define isinf(x) isInf(x)

-#define isnan(x) isNan(x)

-#endif

-

static long readData (dbCommon *record, format_t *format)

{

     aiRecord *ai = (aiRecord *) record;

#########################################################################

 

 

That built fine both on VS 2015 and on VS 2010.

 

Mark

 

 

 

 

From: Gofron, Kazimierz <[email protected]>
Sent: Thursday, December 20, 2018 2:34 PM
To: Mark Rivers <[email protected]>
Cc: [email protected]
Subject: RE: Stream fails on windows-x64 against base-7.0.2

 

Stream master release, cloned today.

 

C:\epics\support\stream>git branch

* master

 

 

From: Mark Rivers <[email protected]>
Sent: Thursday, 20 December 2018 3:18 PM
To: Gofron, Kazimierz <[email protected]>
Cc: [email protected]
Subject: RE: Stream fails on windows-x64 against base-7.0.2

 

You didn’t tell us what version of stream you are using.  It is building OK for me on Windows.

 

Mark

 

 

From: [email protected] <[email protected]> On Behalf Of Gofron, Kazimierz via Tech-talk
Sent: Thursday, December 20, 2018 1:38 PM
To: '[email protected]' <[email protected]>
Subject: Stream fails on windows-x64 against base-7.0.2

 

I am using:

 

Windows 10 Pro

Visual Studio 2010 Professional

Make 4.2.1 (from the EPICS web site)
Strawberry perl (v5.28.1.1)

 

This issue is similar to:

https://github.com/epics-modules/softGlue/issues/1

and

https://github.com/epics-modules/sscan/issues/3

 

link -nologo -subsystem:windows -dll -LTCG -incremental:no -opt:ref -release  -MACHINE:X64      -out:stream.dll -implib:stream.lib     DebugInterface.obj DummyInterface.obj AsynDriverInterface.obj EnumConverter.obj BCDConverter.obj RawConverter.obj RawFloatConverter.obj BinaryConverter.obj ChecksumConverter.obj MantissaExponentConverter.obj TimestampConverter.obj devaoStream.obj devaiStream.obj devboStream.obj devbiStream.obj devmbboStream.obj devmbbiStream.obj devmbboDirectStream.obj devmbbiDirectStream.obj devlongoutStream.obj devlonginStream.obj devstringoutStream.obj devstringinStream.obj devwaveformStream.obj devcalcoutStream.obj devaaiStream.obj devaaoStream.obj devscalcoutStream.obj StreamVersion.obj StreamBuffer.obj StreamError.obj StreamProtocol.obj StreamFormatConverter.obj StreamCore.obj StreamBusInterface.obj StreamEpics.obj      c:/epics/support/asyn/lib/windows-x64/asyn.lib  c:/epics/base-7.0.2/lib/windows-x64/dbRecStd.lib  c:/epics/base-7.0.2/lib/windows-x64/dbCore.lib  c:/epics/base-7.0.2/lib/windows-x64/ca.lib  c:/epics/base-7.0.2/lib/windows-x64/Com.lib

   Creating library stream.lib and object stream.exp

devaoStream.obj : error LNK2001: unresolved external symbol interruptAccept

devwaveformStream.obj : error LNK2001: unresolved external symbol pamapdbfType

StreamEpics.obj : error LNK2001: unresolved external symbol pdbbase

stream.dll : fatal error LNK1120: 3 unresolved externals

make[3]: *** [c:/epics/base-7.0.2/configure/RULES_BUILD:292: stream.dll] Error 1120

make[3]: Leaving directory 'C:/epics/support/stream/StreamDevice/src/O.windows-x64'

make[2]: *** [c:/epics/base-7.0.2/configure/RULES_ARCHS:58: install.windows-x64] Error 2

make[2]: Leaving directory 'C:/epics/support/stream/StreamDevice/src'

make[1]: *** [c:/epics/base-7.0.2/configure/RULES_DIRS:84: src.install] Error 2

make[1]: Leaving directory 'C:/epics/support/stream/StreamDevice'

make: *** [configure/RULES_DIRS:88: StreamDevice.install] Error 2

 

Kaz


References:
Stream fails on windows-x64 against base-7.0.2 Gofron, Kazimierz via Tech-talk
RE: Stream fails on windows-x64 against base-7.0.2 Mark Rivers via Tech-talk
RE: Stream fails on windows-x64 against base-7.0.2 Gofron, Kazimierz via Tech-talk

Navigate by Date:
Prev: FW: Error compiling EPICS base-7.0.x on OpenSUSE 10.3 Mark Rivers via Tech-talk
Next: Cable Management Applications Recommendations Dejan Dežman via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Stream fails on windows-x64 against base-7.0.2 Ralph Lange via Tech-talk
Next: Re: Stream fails on windows-x64 against base-7.0.2 Dirk Zimoch via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
ANJ, 21 Dec 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·