EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: [Bug 1845174] [NEW] EPICS Base build fails with -DDEBUG
From: Ralph Lange via Core-talk <[email protected]>
To: [email protected]
Date: Tue, 24 Sep 2019 09:39:45 -0000
Public bug reported:

Setting -DDEBUG on the compile line fails the build of EPICS Base in
libCom:

/usr/bin/g++ -D_GNU_SOURCE -D_DEFAULT_SOURCE -D_X86_64_ -DUNIX -Dlinux -DDEBUG -O0 --coverage -g -Wall -mtune=generic -m64 -std=c++11 -fPIC -I. -I../O.Common -I. -I../../src/osi/compiler/gcc -I../../src/osi/compiler/default -I. -I../../src/osi/os/Linux -I../../src/osi/os/posix -I../../src/osi/os/default -I.. -I../../src/as -I../../src/bucketLib -I../../src/calc -I../../src/cvtFast -I../../src/cppStd -I../../src/cxxTemplates -I../../src/dbmf -I../../src/ellLib -I../../src/env -I../../src/error -I../../src/fdmgr -I../../src/flex -I../../src/freeList -I../../src/gpHash -I../../src/iocsh -I../../src/log -I../../src/macLib -I../../src/misc -I../../src/osi -I../../src/pool -I../../src/ring -I../../src/taskwd -I../../src/timer -I../../src/yacc -I../../src/yacc -I../../src/yajl -I/tmp/units/m-epics/branches/codac-core-6.1/target/base-7.0.2.0/include/compiler/gcc -I/tmp/units/m-epics/branches/codac-core-6.1/target/base-7.0.2.0/include/os/Linux -I/tmp/units/m-epics/branches/codac-core-6.1/target/base-7.0.2.0/include -I/tmp/units/m-epics/branches/codac-core-6.1/target/base-7.0.2.0/include/compiler/gcc -I/tmp/units/m-epics/branches/codac-core-6.1/target/base-7.0.2.0/include/os/Linux -I/tmp/units/m-epics/branches/codac-core-6.1/target/base-7.0.2.0/include -I/opt/codac-6.1/include -c ../../src/timer/timerQueue.cpp
[WARN] In file included from ../../src/timer/timerQueue.cpp:20:0:
[WARN] ../../src/timer/timerQueue.cpp: In member function ‘double timerQueue::process(const epicsTime&)’:
[ERROR] ../../src/timer/timerQueue.cpp:136:49: error: ‘class timer’ has no member named ‘notify’
[WARN] N++, typeid ( this->pExpireTmr->notify ).name (),
[WARN] ^
[WARN] ../../src/timer/timerPrivate.h:27:44: note: in definition of macro ‘debugPrintf’
[WARN] # define debugPrintf(ARGSINPAREN) printf ARGSINPAREN
[WARN] ^
[WARN] make[4]: *** [timerQueue.o] Error 1
[WARN] make[4]: *** Waiting for unfinished jobs....
[WARN] In file included from ../../src/timer/timer.cpp:24:0:
[WARN] ../../src/timer/timer.cpp: In member function ‘void timer::privateStart(epicsTimerNotify&, const epicsTime&)’:
[ERROR] ../../src/timer/timer.cpp:131:24: error: ‘class timer’ has no member named ‘notify’
[WARN] typeid ( this->notify ).name (),
[WARN] ^
[WARN] ../../src/timer/timerPrivate.h:27:44: note: in definition of macro ‘debugPrintf’
[WARN] # define debugPrintf(ARGSINPAREN) printf ARGSINPAREN
[WARN] ^
[WARN] make[4]: *** [timer.o] Error 1


Personally, I find DEBUG conditional compilation a bad idea:
- Needs recompilation to switch from debugging to regular mode or back
- That recompilation often changes behaviour (so that bugs are hidden or act differently)
- DEBUG code is rarely compiled and easily becomes dysfunctional without being noticed (like in this case)

However, code should compile with -DDEBUG set.

Two options: fix or remove. Should that be discussed at the upcoming
Core meeting?

** Affects: epics-base
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of EPICS
Core Developers, which is subscribed to EPICS Base.
Matching subscriptions: epics-core-list-subscription
https://bugs.launchpad.net/bugs/1845174

Title:
  EPICS Base build fails with -DDEBUG

Status in EPICS Base:
  New

Bug description:
  Setting -DDEBUG on the compile line fails the build of EPICS Base in
  libCom:

  /usr/bin/g++ -D_GNU_SOURCE -D_DEFAULT_SOURCE -D_X86_64_ -DUNIX -Dlinux -DDEBUG -O0 --coverage -g -Wall -mtune=generic -m64 -std=c++11 -fPIC -I. -I../O.Common -I. -I../../src/osi/compiler/gcc -I../../src/osi/compiler/default -I. -I../../src/osi/os/Linux -I../../src/osi/os/posix -I../../src/osi/os/default -I.. -I../../src/as -I../../src/bucketLib -I../../src/calc -I../../src/cvtFast -I../../src/cppStd -I../../src/cxxTemplates -I../../src/dbmf -I../../src/ellLib -I../../src/env -I../../src/error -I../../src/fdmgr -I../../src/flex -I../../src/freeList -I../../src/gpHash -I../../src/iocsh -I../../src/log -I../../src/macLib -I../../src/misc -I../../src/osi -I../../src/pool -I../../src/ring -I../../src/taskwd -I../../src/timer -I../../src/yacc -I../../src/yacc -I../../src/yajl -I/tmp/units/m-epics/branches/codac-core-6.1/target/base-7.0.2.0/include/compiler/gcc -I/tmp/units/m-epics/branches/codac-core-6.1/target/base-7.0.2.0/include/os/Linux -I/tmp/units/m-epics/branches/codac-core-6.1/target/base-7.0.2.0/include -I/tmp/units/m-epics/branches/codac-core-6.1/target/base-7.0.2.0/include/compiler/gcc -I/tmp/units/m-epics/branches/codac-core-6.1/target/base-7.0.2.0/include/os/Linux -I/tmp/units/m-epics/branches/codac-core-6.1/target/base-7.0.2.0/include -I/opt/codac-6.1/include -c ../../src/timer/timerQueue.cpp
  [WARN] In file included from ../../src/timer/timerQueue.cpp:20:0:
  [WARN] ../../src/timer/timerQueue.cpp: In member function ‘double timerQueue::process(const epicsTime&)’:
  [ERROR] ../../src/timer/timerQueue.cpp:136:49: error: ‘class timer’ has no member named ‘notify’
  [WARN] N++, typeid ( this->pExpireTmr->notify ).name (),
  [WARN] ^
  [WARN] ../../src/timer/timerPrivate.h:27:44: note: in definition of macro ‘debugPrintf’
  [WARN] # define debugPrintf(ARGSINPAREN) printf ARGSINPAREN
  [WARN] ^
  [WARN] make[4]: *** [timerQueue.o] Error 1
  [WARN] make[4]: *** Waiting for unfinished jobs....
  [WARN] In file included from ../../src/timer/timer.cpp:24:0:
  [WARN] ../../src/timer/timer.cpp: In member function ‘void timer::privateStart(epicsTimerNotify&, const epicsTime&)’:
  [ERROR] ../../src/timer/timer.cpp:131:24: error: ‘class timer’ has no member named ‘notify’
  [WARN] typeid ( this->notify ).name (),
  [WARN] ^
  [WARN] ../../src/timer/timerPrivate.h:27:44: note: in definition of macro ‘debugPrintf’
  [WARN] # define debugPrintf(ARGSINPAREN) printf ARGSINPAREN
  [WARN] ^
  [WARN] make[4]: *** [timer.o] Error 1

  
  Personally, I find DEBUG conditional compilation a bad idea:
  - Needs recompilation to switch from debugging to regular mode or back
  - That recompilation often changes behaviour (so that bugs are hidden or act differently)
  - DEBUG code is rarely compiled and easily becomes dysfunctional without being noticed (like in this case)

  However, code should compile with -DDEBUG set.

  Two options: fix or remove. Should that be discussed at the upcoming
  Core meeting?

To manage notifications about this bug go to:
https://bugs.launchpad.net/epics-base/+bug/1845174/+subscriptions

Navigate by Date:
Prev: Jenkins build is still unstable: epics-7.0 » mac #151 APS Jenkins via Core-talk
Next: Build failed: epics-base base-travis-311 AppVeyor via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: [Merge] ~epics-core/epics-base/+git/Com:errlog2syslog into epics-base:7.0 Shankar, Murali via Core-talk
Next: Build failed: epics-base base-travis-311 AppVeyor via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
ANJ, 26 Nov 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·