models icon indicating copy to clipboard operation
models copied to clipboard

bazel test ... exec failed

Open haoran8899 opened this issue 9 years ago • 12 comments

Please let us know which model this issue is about (specify the top-level directory)

hi,when i bazel test ... to build syntaxnet ,error has happend,err information as blow: In file included from /usr/include/c++/5/algorithm:62:0, from ./dragnn/core/beam.h:4, from dragnn/core/beam_test.cc:1: /usr/include/c++/5/bits/stl_algo.h: At global scope: /usr/include/c++/5/bits/stl_algo.h:4718:5: error: 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<syntaxnet::dragnn::Beamsyntaxnet::dragnn::{anonymous}::TestTransitionState::Transition*, std::vector<syntaxnet::dragnn::Beamsyntaxnet::dragnn::{anonymous}::TestTransitionState::Transition, std::allocator<syntaxnet::dragnn::Beamsyntaxnet::dragnn::{anonymous}::TestTransitionState::Transition> > >; _Compare = syntaxnet::dragnn::Beam::AdvanceFromPrediction(const float*, int, int) [with T = syntaxnet::dragnn::{anonymous}::TestTransitionState]::<lambda(const syntaxnet::dragnn::Beamsyntaxnet::dragnn::{anonymous}::TestTransitionState::Transition&, const syntaxnet::dragnn::Beamsyntaxnet::dragnn::{anonymous}::TestTransitionState::Transition&)>]', declared using local type 'syntaxnet::dragnn::Beam::AdvanceFromPrediction(const float*, int, int) [with T = syntaxnet::dragnn::{anonymous}::TestTransitionState]::<lambda(const syntaxnet::dragnn::Beamsyntaxnet::dragnn::{anonymous}::TestTransitionState::Transition&, const syntaxnet::dragnn::Beamsyntaxnet::dragnn::{anonymous}::TestTransitionState::Transition&)>', is used but never defined [-fpermissive] sort(_RandomAccessIterator __first, _RandomAccessIterator __last, ^

haoran8899 avatar Mar 17 '17 11:03 haoran8899

What compiler are you using? Does it support C++11?

markomernick avatar Mar 17 '17 18:03 markomernick

gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) . when i update,system tell me gcc is latest version.

haoran8899 avatar Mar 18 '17 03:03 haoran8899

Yes, that should support C++11. Can you provide the exact sequence of commands you used to compile, that resulted in this error?

markomernick avatar Mar 20 '17 14:03 markomernick

sorry to late. i'am reinstalling following Installation guide in a new env. i think this error maybe my env's problem. i will response when problem happened, thanks

haoran8899 avatar Mar 21 '17 06:03 haoran8899

I had the same compiler error with the same gcc version. The problem is actually caused by an earlier macro expansion. I will send a pull request.

danieldk avatar Mar 21 '17 08:03 danieldk

OK. thanks.i will try following #1229

haoran8899 avatar Mar 21 '17 08:03 haoran8899

@danieldk thank you for the fix! It's now merged, so I'm gonna close this issue. @haoran8899 please reopen if you continue to experience problems.

skye avatar Mar 21 '17 15:03 skye

when i modify the beam.h as #1229 , configure as below,bazel test compile success,but test has error items. thanks a lot alloc as the malloc implementation? [Y/n] n jemalloc disabled Do you wish to build TensorFlow with Google Cloud Platform support? [y/N] n No Google Cloud Platform support will be enabled for TensorFlow Do you wish to build TensorFlow with Hadoop File System support? [y/N] n No Hadoop File System support will be enabled for TensorFlow Do you wish to build TensorFlow with the XLA just-in-time compiler (experimental)? [y/N] n No XLA JIT support will be enabled for TensorFlow Using python library path: /usr/local/lib/python2.7/dist-packages Do you wish to build TensorFlow with OpenCL support? [y/N] n No OpenCL support will be enabled for TensorFlow Do you wish to build TensorFlow with CUDA support? [y/N] n No CUDA support will be enabled for TensorFlow

haoran8899 avatar Mar 22 '17 01:03 haoran8899

@haoran8899 did you mean to post more output? I don't see the error.

skye avatar Mar 23 '17 00:03 skye

when i 'exec bazel test ...',i get the simulate error in #1201 .so i add the error conent in #1201 .

haoran8899 avatar Mar 23 '17 00:03 haoran8899

Oh I see. I'll leave this closed then. Thanks for adding your info to #1201.

skye avatar Mar 23 '17 14:03 skye

@skye I exec " pip install --upgrade distribute " in my python virtualenv,then use the python virtualenv exec succefull.thanks a lot

haoran8899 avatar Mar 24 '17 03:03 haoran8899