Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

build error:threadediter.h:326:37: error: no matching function for call to ‘std::condition_variable::notify_all() const’ #530

Closed
unityunreal opened this issue Nov 10, 2015 · 4 comments

Comments

@unityunreal
Copy link

After execute make on terminal, such error happens:

g++ -std=c++0x -c -DMSHADOW_FORCE_STREAM -Wall -O3 -I./mshadow/ -I/usr/local/opt/openblas/include -I./dmlc-core/include -fPIC -Iinclude -msse3 -funroll-loops -Wno-unused-parameter -Wno-unknown-pragmas -DMSHADOW_USE_CUDA=0 -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -DMSHADOW_RABIT_PS=0 -DMSHADOW_DIST_PS=0 -DMXNET_USE_OPENCV=1 `pkg-config --cflags opencv` -fopenmp  -c src/io/io.cc -o build/io/io.o
In file included from src/io/./iter_prefetcher.h:13:0,
                 from src/io/io.cc:8:
./dmlc-core/include/dmlc/threadediter.h: In lambda function:
./dmlc-core/include/dmlc/threadediter.h:326:37: error: no matching function for call to ‘std::condition_variable::notify_all() const’
           consumer_cond_.notify_all();
                                     ^
./dmlc-core/include/dmlc/threadediter.h:326:37: note: candidate is:
In file included from ./dmlc-core/include/dmlc/threadediter.h:15:0,
                 from src/io/./iter_prefetcher.h:13,
                 from src/io/io.cc:8:
/home/rescape/lib/include/c++/4.8.0/condition_variable:83:5: note: void std::condition_variable::notify_all() <near match>
     notify_all() noexcept;
     ^
/home/rescape/lib/include/c++/4.8.0/condition_variable:83:5: note:   no known conversion for implicit ‘this’ parameter from ‘const std::condition_variable*’ to ‘std::condition_variable*’
In file included from src/io/./iter_prefetcher.h:13:0,
                 from src/io/io.cc:8:
./dmlc-core/include/dmlc/threadediter.h:333:37: error: no matching function for call to ‘std::condition_variable::notify_all() const’
           consumer_cond_.notify_all();
                                     ^
./dmlc-core/include/dmlc/threadediter.h:333:37: note: candidate is:
In file included from ./dmlc-core/include/dmlc/threadediter.h:15:0,
                 from src/io/./iter_prefetcher.h:13,
                 from src/io/io.cc:8:
/home/rescape/lib/include/c++/4.8.0/condition_variable:83:5: note: void std::condition_variable::notify_all() <near match>
     notify_all() noexcept;
     ^
/home/rescape/lib/include/c++/4.8.0/condition_variable:83:5: note:   no known conversion for implicit ‘this’ parameter from ‘const std::condition_variable*’ to ‘std::condition_variable*’
In file included from src/io/./iter_prefetcher.h:13:0,
                 from src/io/io.cc:8:
./dmlc-core/include/dmlc/threadediter.h:352:45: error: no matching function for call to ‘std::condition_variable::notify_all() const’
       if (notify) consumer_cond_.notify_all();

Any suggestions of how to solve this? Thanks!

@unityunreal
Copy link
Author

Perhaps my gcc versions causes? my gcc version is gcc version 4.8.0 (GCC)

@winstywang
Copy link
Contributor

A similar issue is reported in previous project with GCC 4.8.0: dmlc/cxxnet#221 Could you please try to upgrade it? At least 4.8.4 is good to go.

@unityunreal
Copy link
Author

Yes, I upgrade gcc version and this message disappear, perhaps the minimum version of gcc of the requirement to build mxnet should be updated on the doc site.

@winstywang
Copy link
Contributor

Happy to hear that. Thanks for the advice.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants