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  2020  2021  2022  <20232024  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  2020  2021  2022  <20232024 
<== Date ==> <== Thread ==>

Subject: RE: Resolved narrowing conversion error while compiling quadEM module
From: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: Mrinal Bera <mrinalkb at uchicago.edu>, Tech-talk <tech-talk at aps.anl.gov>
Date: Tue, 7 Nov 2023 16:28:28 +0000

Hi Mrinal,

 

That warning was already fixed in this commit from September 2022.

 

https://github.com/epics-modules/quadEM/commit/9cbed8b69cce89b598bf32de2437c37c5cc2906a

 

R9-4 is from November 2020, so this commit is only present on the master branch.  I recommend you use the master branch for now, until I have a chance to make a new release.

 

When you run into a problem like this it is always a good idea to check the master branch to see if it has already been fixed.

 

Mark

 

 

 

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Mrinal Bera via Tech-talk
Sent: Tuesday, November 7, 2023 9:37 AM
To: Tech-talk <tech-talk at aps.anl.gov>
Subject: Resolved narrowing conversion error while compiling quadEM module

 

Dear friends,

 

While compiling either of quadEM-R9-2-1 or quadEM-R9-4 with EPICS bas-7.0.7 in Centos 9 Stream, I was getting the following narrowing conversion error:

../drvTetrAMM.cpp: In member function ‘void drvTetrAMM::readThread()’:

../drvTetrAMM.cpp:268:22: error: narrowing conversion of ‘18443366386873925631’ from ‘long long unsigned int’ to ‘long long int’ [-Wnarrowing]

  268 |                 case 0xfff40002ffffffffll:

      |                      ^~~~~~~~~~~~~~~~~~~~

../drvTetrAMM.cpp:273:22: error: narrowing conversion of ‘18443366378283991039’ from ‘long long unsigned int’ to ‘long long int’ [-Wnarrowing]

  273 |                 case 0xfff40000ffffffffll:

      |                      ^~~~~~~~~~~~~~~~~~~~

../drvTetrAMM.cpp:283:22: error: narrowing conversion of ‘18443366382578958335’ from ‘long long unsigned int’ to ‘long long int’ [-Wnarrowing]

  283 |                 case 0xfff40001ffffffffll:

      |                      ^~~~~~~~~~~~~~~~~~~~

../drvTetrAMM.cpp:296:22: error: narrowing conversion of ‘18443366391168892927’ from ‘long long unsigned int’ to ‘long long int’ [-Wnarrowing]

  296 |                 case 0xfff40003ffffffffll:

      |                      ^~~~~~~~~~~~~~~~~~~~

make[3]: *** [/usr/local/epics/base/configure/RULES_BUILD:267: drvTetrAMM.o] Error 1

make[3]: Leaving directory '/home/epics/chemmatCARS/synApps/support/quadEM-R9-4/quadEMApp/src/O.linux-x86_64'

make[2]: *** [/usr/local/epics/base/configure/RULES_ARCHS:58: install.linux-x86_64] Error 2

make[2]: Leaving directory '/home/epics/chemmatCARS/synApps/support/quadEM-R9-4/quadEMApp/src'

make[1]: *** [/usr/local/epics/base/configure/RULES_DIRS:85: src.install] Error 2

make[1]: Leaving directory '/home/epics/chemmatCARS/synApps/support/quadEM-R9-4/quadEMApp'

make: *** [/usr/local/epics/base/configure/RULES_DIRS:85: quadEMApp.install] Error 2

 

I resolved the errors by changing line #193 of quadEM-R9-2-1 or line #191 of quadEM-R9-4 from

long long lastValue;

to

unsigned long long lastValue;

 

I hope this will be helpful to someone getting similar errors.

 

Thanks,

Mrinal

 

 


Replies:
Re: Resolved narrowing conversion error while compiling quadEM module Mrinal Bera via Tech-talk
References:
Resolved narrowing conversion error while compiling quadEM module Mrinal Bera via Tech-talk

Navigate by Date:
Prev: labjack support, command not found Wolfman, Mark via Tech-talk
Next: Re: Resolved narrowing conversion error while compiling quadEM module Mrinal Bera 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  2020  2021  2022  <20232024 
Navigate by Thread:
Prev: Resolved narrowing conversion error while compiling quadEM module Mrinal Bera via Tech-talk
Next: Re: Resolved narrowing conversion error while compiling quadEM module Mrinal Bera 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  2020  2021  2022  <20232024 
ANJ, 07 Nov 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·