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  2018  2019  <20202021  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  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: ezca for 3.15
From: "Siddons, David via Tech-talk" <tech-talk at aps.anl.gov>
To: Mark Rivers <rivers at cars.uchicago.edu>
Cc: tech-talk <tech-talk at aps.anl.gov>
Date: Mon, 3 Feb 2020 17:50:42 +0000
Hi Mark,
   Added cadef.h and get:

gcc -c -fPIC -I/home/peter/epics/extensions/include -I/home/peter/epics/base/include -I/home/peter/epics/base/include/os/Linux testenable.c
In file included from /home/peter/epics/base/include/epicsTypes.h:19:0,
                 from /home/peter/epics/base/include/caerr.h:31,
                 from /home/peter/epics/base/include/cadef.h:48,
                 from testenable.c:1:
/home/peter/epics/base/include/compilerDependencies.h:19:10: fatal error: compilerSpecific.h: No such file or directory
 #include "compilerSpecific.h"
          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.

I hacked a Makefile, and the above was generated when I used it. I got the same error when I used the single compile line I had before. I've attached the c file and the makefile. Any suggestions?
Pete.


From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: Saturday, February 1, 2020 5:13 PM
To: Siddons, David <siddons at bnl.gov>
Cc: tech-talk <tech-talk at aps.anl.gov>
Subject: Re: ezca for 3.15
 
Hi Peter,


You need this to add this line in your program:


#include <cadef.h>


before


#include <ezca.h>


Because ezca.h uses chid, it should really be including cadef itself.  But it doesn't.


Mark



________________________________
From: Siddons, David <siddons at bnl.gov>
Sent: Saturday, February 1, 2020 3:53 PM
To: Mark Rivers
Cc: tech-talk
Subject: Re: ezca for 3.15

Hi Mark,
   OK, I rebuilt my extensions directory, and built ezca. All went well. When I try to use ezca I hit problems. Here is my simple program; it reads a vector, changes one element and then writes it back:

#include <ezca.h>
main()
{
int d;
int s[384];
   ezcaGet("det1.TSEN", ezcaLong, 384, &s);
   ezcaGet("det1.CHAN",ezcaLong,1,&d);
   s[d]=1;
  ezcaPut("det1.TSEN", ezcaLong, 1, s);
}

and my compile line:
gcc -o testenable -L/home/peter/epics/extensions-master/lib -I/home/peter/epics/extensions-master/include -I//home/peter/epics/base-3.15.6/include/ -lezca testenable.c

which gets me:

In file included from testenable.c:1:0:
/home/peter/epics/extensions-master/include/ezca.h:77:61: error: unknown type name ‘chid’; did you mean ‘void’?
 epicsShareFunc int epicsShareAPI ezcaPvToChid(char *pvname, chid **cid);
                                                             ^~~~
                                                             void
/home/peter/epics/extensions-master/include/ezca.h:103:2: error: unknown type name ‘TS_STAMP’
  TS_STAMP *timestamp, short *status, short *severity);
  ^~~~~~~~
/home/peter/epics/extensions-master/include/ezca.h:107:45: error: unknown type name ‘TS_STAMP’
  char ezcatype, int nelem, void *data_buff, TS_STAMP *timestamp,
                                             ^~~~~~~~
testenable.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 main()
 ^~~~


So what am I doing wrong?
Pete.

________________________________
From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: Saturday, February 1, 2020 3:56 PM
To: Siddons, David <siddons at bnl.gov>
Cc: tech-talk <tech-talk at aps.anl.gov>
Subject: Re: ezca for 3.15

Hi Pete,


I suspect you may be using an old version of ezca?  The latest version is here:

https://github.com/epics-extensions/extensions

<https://github.com:epics-extensions/extensions>

I just built successfully with that version on base 7.0.3.1, so I am pretty sure 3.15 will build fine as well.


Here is the output when building:

corvette:extensions_new/src/ezca>make
perl -CSD /corvette/usr/local/epics/base-7.0.3.1/bin/linux-x86_64/makeMakefile.pl O.linux-x86_64 ../../..
mkdir -p O.Common
make -C O.linux-x86_64 -f ../Makefile TOP=../../.. \
    T_A=linux-x86_64 install
make[1]: Entering directory `/usr/local/epics/extensions_new/src/ezca/O.linux-x86_64'
perl -CSD /corvette/usr/local/epics/base-7.0.3.1/bin/linux-x86_64/mkmf.pl  -m ezca.d -I. -I../O.Common -I. -I. -I.. -I../../../include/compiler/gcc -I../../../include/os/Linux -I../../../include -I/corvette/usr/local/epics/base-7.0.3.1/include/compiler/gcc -I/corvette/usr/local/epics/base-7.0.3.1/include/os/Linux -I/corvette/usr/local/epics/base-7.0.3.1/include   -I../../../include           ezca.o ../ezca.c
make[1]: Leaving directory `/usr/local/epics/extensions_new/src/ezca/O.linux-x86_64'
make[1]: Entering directory `/usr/local/epics/extensions_new/src/ezca/O.linux-x86_64'
/usr/bin/gcc  -D_GNU_SOURCE -D_DEFAULT_SOURCE           -D_X86_64_  -DUNIX  -Dlinux     -O3   -Wall      -mtune=generic      -m64 -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../include/compiler/gcc -I../../../include/os/Linux -I../../../include -I/corvette/usr/local/epics/base-7.0.3.1/include/compiler/gcc -I/corvette/usr/local/epics/base-7.0.3.1/include/os/Linux -I/corvette/usr/local/epics/base-7.0.3.1/include   -I../../../include           -c ../ezca.c
../ezca.c: In function 'pop_channel':
../ezca.c:7731:18: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long unsigned int' [-Wformat=]
    sizeof(struct channel)*NODESPERMAL, Channel_avail_hdr);
                  ^
../ezca.c:7731:18: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Wformat=]
../ezca.c: In function 'pop_monitor':
../ezca.c:7812:21: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long unsigned int' [-Wformat=]
       sizeof(struct monitor)*NODESPERMAL, Monitor_avail_hdr);
                     ^
../ezca.c:7812:21: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Wformat=]
../ezca.c: In function 'pop_work':
../ezca.c:7893:21: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long unsigned int' [-Wformat=]
       sizeof(struct work)*NODESPERMAL, Work_avail_hdr);
                     ^
../ezca.c:7893:21: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Wformat=]
/usr/bin/ar -rc    libezca.a    ezca.o
/usr/bin/ranlib libezca.a
/usr/bin/g++ -o libezca.so -shared -fPIC -Wl,-hlibezca.so -L/usr/local/epics/extensions_new/lib/linux-x86_64 -L/usr/local/epics/base-7.0.3.1/lib/linux-x86_64 -Wl,-rpath,/usr/local/epics/extensions_new/lib/linux-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.3.1/lib/linux-x86_64           -rdynamic -m64         ezca.o    -lca -lCom   -lpthread   -lreadline -lm -lrt -ldl -lgcc
Installing shared library ../../../lib/linux-x86_64/libezca.so
Installing library ../../../lib/linux-x86_64/libezca.a



Cheers,

Mark


________________________________
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Siddons, David via Tech-talk <tech-talk at aps.anl.gov>
Sent: Saturday, February 1, 2020 2:33 PM
To: EPICS Tech Talk
Subject: ezca for 3.15

I want to use ezca with 3.15, but it seems to be a mess of missing header files, presumably things dropped with 3.15 (e.g. tsDefs.h, cadef.h). Has anyone made it work?
Pete.

Attachment: Makefile
Description: Makefile

#include <cadef.h>
#include <ezca.h>
main() 
{
int d; 
int s[384];
   ezcaGet("det1.TSEN", ezcaLong, 384, &s);
   ezcaGet("det1.CHAN",ezcaLong,1,&d);
   s[d]=1;
  ezcaPut("det1.TSEN", ezcaLong, 1, s);
} /* end main() */

Replies:
RE: ezca for 3.15 Mark Rivers via Tech-talk
References:
ezca for 3.15 Siddons, David via Tech-talk
Re: ezca for 3.15 Mark Rivers via Tech-talk
Re: ezca for 3.15 Siddons, David via Tech-talk
Re: ezca for 3.15 Mark Rivers via Tech-talk

Navigate by Date:
Prev: Re: ezca for 3.15 Mark Rivers via Tech-talk
Next: RE: ezca for 3.15 Mark Rivers 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  2018  2019  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Re: ezca for 3.15 Mark Rivers via Tech-talk
Next: RE: ezca for 3.15 Mark Rivers 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  2018  2019  <20202021  2022  2023  2024 
ANJ, 03 Feb 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·