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 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
<== Date ==> <== Thread ==>

Subject: Re: Compile error with areaDetector
From: Mark Rivers <rivers@cars.uchicago.edu>
To: Jörn Dreyer <j.dreyer@hzdr.de>
Cc: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Wed, 15 Nov 2017 13:05:19 +0000
Which version of ADCore?


________________________________
From: Jörn Dreyer <j.dreyer@hzdr.de>
Sent: Wednesday, November 15, 2017 6:58 AM
To: Mark Rivers
Cc: tech-talk@aps.anl.gov
Subject: Re: Compile error with areaDetector

Hi Mark,

I'm using:

 $gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.5 LTS
Release:        14.04
Codename:       trusty

Regards,

Jörn

> Hi Jörn,
>
>
> I don't have experience with gcc 5.4.0.  But you say you are also getting an
> error with gcc 4.8.  I am running gcc 4.8.5
>
>
> gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)
>
>
> and ntndArrayConverter.cpp compiles fine for me with that compiler.  Exactly
> which version of gcc 4.8 is failing for you?
>
>
> Mark
>
>
>
> ________________________________
> From: tech-talk-bounces@aps.anl.gov <tech-talk-bounces@aps.anl.gov> on
> behalf of Dreyer, Dr. Joern <j.dreyer@hzdr.de> Sent: Wednesday, November
> 15, 2017 1:26 AM
> To: tech-talk@aps.anl.gov
> Subject: Compile error with areaDetector
>
> Hi,
>
> I have run into a problem with areaDetector compilation when enabling EPICS4
> using version 4.6.0 on Ubuntu16.04.3 LTS.
>
> ../ntndArrayConverter.cpp: In member function ‘void
> NTNDArrayConverter::fromUndefinedAttribute(epics::pvData::PVStructurePtr)’:
> ../ntndArrayConverter.cpp:497:54: error: no matching function for call to
> ‘std::tr1::shared_ptr<epics::pvData::PVField>::reset() const’
>    dest->getSubField<PVUnion>("value")->get().reset();
>    ^
> In file included from /usr/include/c++/5/tr1/memory:50:0,
>    from
> /home/wuestenf/EPICS/EPICS-3.15.5/EPICS-CPP-4.6.0/pvDataCPP/include/pv/share
> dPtr.h:124, from
> /home/wuestenf/EPICS/EPICS-3.15.5/EPICS-CPP-4.6.0/pvDataCPP/include/pv/pvTyp
> e.h:41, from
> /home/wuestenf/EPICS/EPICS-3.15.5/EPICS-CPP-4.6.0/pvDataCPP/include/pv/pvDis
> play.h:14, from
> /home/wuestenf/EPICS/EPICS-3.15.5/EPICS-CPP-4.6.0/normativeTypesCPP/include/
> pv/ntndarray.h:17, from ../ntndArrayConverter.h:2,
>    from ../ntndArrayConverter.cpp:4:
> /usr/include/c++/5/tr1/shared_ptr.h:644:7: note: candidate: void
> std::tr1::__shared_ptr<_Tp, _Lp>::reset() [with _Tp =
> epics::pvData::PVField; __gnu_cxx::_Lock_policy _Lp =
> (__gnu_cxx::_Lock_policy)2u] <near match>
>    reset() // never throws
>    ^
> /usr/include/c++/5/tr1/shared_ptr.h:644:7: note:  passing ‘const PVFieldPtr*
> {aka const std::tr1::shared_ptr<epics::pvData::PVField>*}’ as ‘this’
> argument discards qualifiers
> /usr/include/c++/5/tr1/shared_ptr.h:649:9: note: candidate: template<class
> _Tp1> void std::tr1::__shared_ptr<_Tp, _Lp>::reset(_Tp1*) [with _Tp1 = _Tp1;
> _Tp = epics::pvData::PVField; __gnu_cxx::_Lock_policy _Lp =
> (__gnu_cxx::_Lock_policy)2u]
>    reset(_Tp1* __p) // _Tp1 must be complete.
>    ^
> /usr/include/c++/5/tr1/shared_ptr.h:649:9: note:  template argument
> deduction/substitution failed:
> ../ntndArrayConverter.cpp:497:54: note:  candidate expects 1 argument, 0
> provided
>    dest->getSubField<PVUnion>("value")->get().reset();
>    ^
> In file included from /usr/include/c++/5/tr1/memory:50:0,
>    from
> /home/wuestenf/EPICS/EPICS-3.15.5/EPICS-CPP-4.6.0/pvDataCPP/include/pv/share
> dPtr.h:124, from
> /home/wuestenf/EPICS/EPICS-3.15.5/EPICS-CPP-4.6.0/pvDataCPP/include/pv/pvTyp
> e.h:41, from
> /home/wuestenf/EPICS/EPICS-3.15.5/EPICS-CPP-4.6.0/pvDataCPP/include/pv/pvDis
> play.h:14, from
> /home/wuestenf/EPICS/EPICS-3.15.5/EPICS-CPP-4.6.0/normativeTypesCPP/include/
> pv/ntndarray.h:17, from ../ntndArrayConverter.h:2,
>    from ../ntndArrayConverter.cpp:4:
> /usr/include/c++/5/tr1/shared_ptr.h:658:9: note: candidate: template<class
> _Tp1, class _Deleter> void std::tr1::__shared_ptr<_Tp, _Lp>::reset(_Tp1*,
> _Deleter) [with _Tp1 = _Tp1; _Deleter = _Deleter; _Tp =
> epics::pvData::PVField; __gnu_cxx::_Lock_policy _Lp =
> (__gnu_cxx::_Lock_policy)2u]
>    reset(_Tp1* __p, _Deleter __d)
>    ^
> /usr/include/c++/5/tr1/shared_ptr.h:658:9: note:  template argument
> deduction/substitution failed:
> ../ntndArrayConverter.cpp:497:54: note:  candidate expects 2 arguments, 0
> provided
>    dest->getSubField<PVUnion>("value")->get().reset();
>
> The used gcc version is 5.4.0. On Ubuntu 14.04.5 LTS The error comes at the
> same line, but different problem:
>
> ../ntndArrayConverter.cpp: In member function ‘void
> NTNDArrayConverter::fromUndefinedAttribute(epics::pvData::PVStructurePtr)’:
> ../ntndArrayConverter.cpp:497:54: error: passing ‘const PVFieldPtr {aka
> const std::tr1::shared_ptr<epics::pvData::PVField>}’ as ‘this’ argument of
> ‘void std::tr1::__shared_ptr<_Tp, _Lp>::reset() [with _Tp =
> epics::pvData::PVField; __gnu_cxx::_Lock_policy _Lp =
> (__gnu_cxx::_Lock_policy)2u]’ discards qualifiers [-fpermissive]
>    dest->getSubField<PVUnion>("value")->get().reset();
>
> here the used gcc version is 4.8. It look like an explicit typecast is
> necessary here. But what would be the correct type?
>
> Regards,
>
> Jörn

Replies:
Re: Compile error with areaDetector Jörn Dreyer
References:
Compile error with areaDetector Dreyer, Dr. Joern
Re: Compile error with areaDetector Mark Rivers
Re: Compile error with areaDetector Jörn Dreyer

Navigate by Date:
Prev: Re: Problem when formating a field as HEX32 Pilar Gil Jaldo
Next: Re: aD Driver for Opgal EyeR Core NV? Mark Rivers
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
Navigate by Thread:
Prev: Re: Compile error with areaDetector Jörn Dreyer
Next: Re: Compile error with areaDetector Jörn Dreyer
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
ANJ, 15 Nov 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·