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  2023  2024  2025  <2026 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  2023  2024  2025  <2026
<== Date ==> <== Thread ==>

Subject: Problems with clang under MacOS
From: Torsten Bögershausen via Tech-talk <tech-talk at aps.anl.gov>
To: tech-talk at aps.anl.gov
Date: Sat, 10 Jan 2026 16:02:53 +0100
Hej Experts,
after problems with C++ code I needed to re-install the
xcode command line tools here.

However, trying to compile a motor driver didn't work very well:


c++ -DUNIX -Ddarwin -O3 -g -Wall -arch x86_64 -fno-common -fPIC -I. -I../O.Common -I. -I. -I.. -I.../epics/MCAG_setupMotionDemo.smaract/epics/modules/motor/include/compiler/clang -I.../epics/MCAG_setupMotionDemo.smaract/epics/modules/motor/include/os/Darwin -I.../epics/MCAG_setupMotionDemo.smaract/epics/modules/motor/include -I.../epics/MCAG_setupMotionDemo.smaract/epics/modules/motor/include -I.../epics/MCAG_setupMotionDemo.smaract/epics/base/../modules/asyn/include -I.../epics/MCAG_setupMotionDemo.smaract/epics/base/include/compiler/clang -I.../epics/MCAG_setupMotionDemo.smaract/epics/base/include/os/Darwin -I.../epics/MCAG_setupMotionDemo.smaract/epics/base/include -c ../smarActMCS2MotorDriver.cpp ../smarActMCS2MotorDriver.cpp:147:10: error: integer value 8 is outside the valid range of values [0, 7] for the enumeration type 'asynStatus' [-Wenum-constexpr-conversion]
  147 |     case asynParamWrongType:
      |          ^
.../epics/MCAG_setupMotionDemo.smaract/epics/base/../modules/asyn/include/paramErrors.h:16:32: note:
      expanded from macro 'asynParamWrongType'
   16 | #define asynParamWrongType     (asynStatus)(asynDisabled + 3)
      |                                ^
../smarActMCS2MotorDriver.cpp:149:10: error: integer value 9 is outside the valid range of values [0, 7] for the enumeration type 'asynStatus' [-Wenum-constexpr-conversion]
  149 |     case asynParamBadIndex:
      |          ^
.../epics/MCAG_setupMotionDemo.smaract/epics/base/../modules/asyn/include/paramErrors.h:17:32: note:
      expanded from macro 'asynParamBadIndex'
   17 | #define asynParamBadIndex      (asynStatus)(asynDisabled + 4)
      |                                ^
../smarActMCS2MotorDriver.cpp:151:10: error: integer value 10 is outside the valid range of values [0, 7] for the enumeration type 'asynStatus' [-Wenum-constexpr-conversion]
  151 |     case asynParamUndefined:
      |          ^
.../epics/MCAG_setupMotionDemo.smaract/epics/base/../modules/asyn/include/paramErrors.h:18:32: note:
      expanded from macro 'asynParamUndefined'
   18 | #define asynParamUndefined     (asynStatus)(asynDisabled + 5)
      |                                ^
3 errors generated.

with
=========================
 c++ --version
Apple clang version 17.0.0 (clang-1700.6.3.2)
Target: x86_64-apple-darwin24.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

A hot-fix for this was to add this line
OP_SYS_CPPFLAGS += -Wno-error=enum-constexpr-conversion
into
epics/base/configure/os/CONFIG.darwinCommon.darwinCommon

... which turns the error into a warning.

Are there any better suggestions ?


Replies:
Re: Problems with clang under MacOS Michael Davidsaver via Tech-talk

Navigate by Date:
Prev: Re: Archiver Appliance stuck on initial sampling Ralph Lange via Tech-talk
Next: Configuration of the RGA200 communication baud rate LONG FENG 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  2023  2024  2025  <2026
Navigate by Thread:
Prev: Re: Re: Archiver Appliance stuck on initial sampling Sky Brewer via Tech-talk
Next: Re: Problems with clang under MacOS Michael Davidsaver 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  2023  2024  2025  <2026
ANJ, 19 Mar 2026 · Home · News · About · Talk · Base · Modules · Extensions ·
· Distributions · Download · Documents · Links · Licensing ·