How to fix C++ depreciated isDisabled()

I downloaded source code for project "job-scheduler" from (  When I ran the "configure", a message indicated I had to install ZThread-2.3.2 from SourceForge (  

I am attempting to compile ZThread-2.3.2. When I do a "make install" on my ubuntu box, I get an error message that  C++ function isDisabled() is depreciated in header Guard.h.  The "make install"  messages said: "if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated".  I assume I can also fix the problem in Guard.h.  But I do not know how do do either!

Can someone please help with either solution?

Part of the "make install" messages is in the code snippet section.  Also below that are the two references to isDisabled() in Guard.h

g++ -DHAVE_CONFIG_H -I. -I. -I. -I../include -g -O2 -Wall -DNDEBUG -g -O2 -Wall -DNDEBUG -MT AtomicCount.lo -MD -MP -MF .deps/AtomicCount.Tpo -c AtomicCount.cxx  -fPIC -DPIC -o .libs/AtomicCount.o
In file included from vanilla/SimpleAtomicCount.cxx:26,
                 from AtomicCount.cxx:55:
../include/zthread/Guard.h: In destructor 'ZThread::Guard<LockType, LockingPolicy>::~Guard()':
../include/zthread/Guard.h:494: error: there are no arguments to 'isDisabled' that depend on a template parameter, so a declaration of 'isDisabled' must be available
../include/zthread/Guard.h:494: error: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
make[2]: *** [AtomicCount.lo] Error 1
make[2]: Leaving directory `/home/marv/ZThread-2.3.2/src'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/marv/ZThread-2.3.2/src'
make: *** [install-recursive] Error 1
bool isDisabled() {
  return !_enabled;
template <class LockType, class LockingPolicy>
Guard<LockType, LockingPolicy>::~Guard() throw() {
  try {
  } catch (...) { /* ignore */ }  

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

IT79637Author Commented:
IT79637Author Commented:
More info.  Can anything be done with this:

# Contributor: Travis Willard <>

pkgdesc="A platform-independent, multi-threading and synchronization library for C++"
source=($pkgver.tar.gz zthread-gcc4.patch)  <<-- I tried to download this but got an http 404 error.

build() {
    cd $startdir/src/ZThread-$pkgver/

    ./configure --prefix=/usr || return 1

    patch -Np1 < $startdir/src/zthread-gcc4.patch || return 1

    make || return 1
    make prefix=$startdir/pkg/usr install || return 1

    # Libtool slay
    find $startdir/pkg -name "*.la" -exec rm {} \;

    # Install license (required for MIT licenses)
    install -d $startdir/pkg/usr/share/licenses/$pkgname
    install -m0644 LICENSE $startdir/pkg/usr/share/licenses/$pkgname/license.txt


job-scheduler is still in an Alpha release if I am not mistaken so my immediate question is are you sure you want to use job-scheduler?  What are you trying to do?

As for fixing it, I would say make modifications as necessary in the job-scheduler code (as it looks kind of abandoned - last release Dec 2004) rather than Zthread which is in a more stable 2005 release.  If you still want to proceed with code modifications let me know and I'll do my best to point you in the right direction.

Otherwise, for job scheduling, in a unix-like environment, I strongly recommend the use of cron.  There is a good page on cron usage here:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It seems that this line should be

template <class LockType, class LockingPolicy>
Guard<LockType, LockingPolicy>::~Guard() throw() {
  try {
  } catch (...) { /* ignore */ }  

Open in new window

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.