Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during compiling #1

Open
pancodia opened this issue Jan 24, 2017 · 2 comments
Open

Error during compiling #1

pancodia opened this issue Jan 24, 2017 · 2 comments

Comments

@pancodia
Copy link

First of all, I found I had to change ./configure by removing the leading ../ and trailing / in the path:

(cd build >/dev/null 2>&1 && cmake -DEIGEN3_INCLUDE_DIR=eigen .. "$@")

so that ./configure will work.

Then I follow the instruction to compile the code. but had the following error:

$ make
Scanning dependencies of target cnn_shared
[  1%] Building CXX object cnn/cnn/CMakeFiles/cnn_shared.dir/cfsm-builder.cc.o
[  2%] Building CXX object cnn/cnn/CMakeFiles/cnn_shared.dir/cnn.cc.o
[  3%] Building CXX object cnn/cnn/CMakeFiles/cnn_shared.dir/conv.cc.o
[  4%] Building CXX object cnn/cnn/CMakeFiles/cnn_shared.dir/deep-lstm.cc.o
[  5%] Building CXX object cnn/cnn/CMakeFiles/cnn_shared.dir/devices.cc.o
[  6%] Building CXX object cnn/cnn/CMakeFiles/cnn_shared.dir/dict.cc.o
[  7%] Building CXX object cnn/cnn/CMakeFiles/cnn_shared.dir/dim.cc.o
[  8%] Building CXX object cnn/cnn/CMakeFiles/cnn_shared.dir/exec.cc.o
[  9%] Building CXX object cnn/cnn/CMakeFiles/cnn_shared.dir/expr.cc.o
[ 10%] Building CXX object cnn/cnn/CMakeFiles/cnn_shared.dir/fast-lstm.cc.o
[ 11%] Building CXX object cnn/cnn/CMakeFiles/cnn_shared.dir/grad-check.cc.o
[ 12%] Building CXX object cnn/cnn/CMakeFiles/cnn_shared.dir/graph.cc.o
[ 13%] Building CXX object cnn/cnn/CMakeFiles/cnn_shared.dir/gru.cc.o
[ 14%] Building CXX object cnn/cnn/CMakeFiles/cnn_shared.dir/hsm-builder.cc.o
In file included from /Users/panc/sandbox/segrep-for-nn-semicrf/cnn/cnn/hsm-builder.cc:1:
/Users/panc/sandbox/segrep-for-nn-semicrf/cnn/cnn/hsm-builder.h:26:8: warning: private field 'initialized' is not used
      [-Wunused-private-field]
  bool initialized;
       ^
1 warning generated.
[ 15%] Building CXX object cnn/cnn/CMakeFiles/cnn_shared.dir/init.cc.o
[ 17%] Building CXX object cnn/cnn/CMakeFiles/cnn_shared.dir/lstm.cc.o
[ 18%] Building CXX object cnn/cnn/CMakeFiles/cnn_shared.dir/mem.cc.o
[ 19%] Building CXX object cnn/cnn/CMakeFiles/cnn_shared.dir/model.cc.o
[ 20%] Building CXX object cnn/cnn/CMakeFiles/cnn_shared.dir/mp.cc.o
[ 21%] Building CXX object cnn/cnn/CMakeFiles/cnn_shared.dir/nodes.cc.o
[ 22%] Building CXX object cnn/cnn/CMakeFiles/cnn_shared.dir/nodes-common.cc.o
[ 23%] Building CXX object cnn/cnn/CMakeFiles/cnn_shared.dir/param-nodes.cc.o
[ 24%] Building CXX object cnn/cnn/CMakeFiles/cnn_shared.dir/rnn.cc.o
[ 25%] Building CXX object cnn/cnn/CMakeFiles/cnn_shared.dir/rnn-state-machine.cc.o
[ 26%] Building CXX object cnn/cnn/CMakeFiles/cnn_shared.dir/saxe-init.cc.o
[ 27%] Building CXX object cnn/cnn/CMakeFiles/cnn_shared.dir/shadow-params.cc.o
[ 28%] Building CXX object cnn/cnn/CMakeFiles/cnn_shared.dir/tensor.cc.o
[ 29%] Building CXX object cnn/cnn/CMakeFiles/cnn_shared.dir/training.cc.o
[ 30%] Linking CXX shared library libcnn_shared.dylib
[ 30%] Built target cnn_shared
Scanning dependencies of target cnn
[ 31%] Building CXX object cnn/cnn/CMakeFiles/cnn.dir/cfsm-builder.cc.o
[ 32%] Building CXX object cnn/cnn/CMakeFiles/cnn.dir/cnn.cc.o
[ 34%] Building CXX object cnn/cnn/CMakeFiles/cnn.dir/conv.cc.o
[ 35%] Building CXX object cnn/cnn/CMakeFiles/cnn.dir/deep-lstm.cc.o
[ 36%] Building CXX object cnn/cnn/CMakeFiles/cnn.dir/devices.cc.o
[ 37%] Building CXX object cnn/cnn/CMakeFiles/cnn.dir/dict.cc.o
[ 38%] Building CXX object cnn/cnn/CMakeFiles/cnn.dir/dim.cc.o
[ 39%] Building CXX object cnn/cnn/CMakeFiles/cnn.dir/exec.cc.o
[ 40%] Building CXX object cnn/cnn/CMakeFiles/cnn.dir/expr.cc.o
[ 41%] Building CXX object cnn/cnn/CMakeFiles/cnn.dir/fast-lstm.cc.o
[ 42%] Building CXX object cnn/cnn/CMakeFiles/cnn.dir/grad-check.cc.o
[ 43%] Building CXX object cnn/cnn/CMakeFiles/cnn.dir/graph.cc.o
[ 44%] Building CXX object cnn/cnn/CMakeFiles/cnn.dir/gru.cc.o
[ 45%] Building CXX object cnn/cnn/CMakeFiles/cnn.dir/hsm-builder.cc.o
In file included from /Users/panc/sandbox/segrep-for-nn-semicrf/cnn/cnn/hsm-builder.cc:1:
/Users/panc/sandbox/segrep-for-nn-semicrf/cnn/cnn/hsm-builder.h:26:8: warning: private field 'initialized' is not used
      [-Wunused-private-field]
  bool initialized;
       ^
1 warning generated.
[ 46%] Building CXX object cnn/cnn/CMakeFiles/cnn.dir/init.cc.o
[ 47%] Building CXX object cnn/cnn/CMakeFiles/cnn.dir/lstm.cc.o
[ 48%] Building CXX object cnn/cnn/CMakeFiles/cnn.dir/mem.cc.o
[ 50%] Building CXX object cnn/cnn/CMakeFiles/cnn.dir/model.cc.o
[ 51%] Building CXX object cnn/cnn/CMakeFiles/cnn.dir/mp.cc.o
[ 52%] Building CXX object cnn/cnn/CMakeFiles/cnn.dir/nodes.cc.o
[ 53%] Building CXX object cnn/cnn/CMakeFiles/cnn.dir/nodes-common.cc.o
[ 54%] Building CXX object cnn/cnn/CMakeFiles/cnn.dir/param-nodes.cc.o
[ 55%] Building CXX object cnn/cnn/CMakeFiles/cnn.dir/rnn.cc.o
[ 56%] Building CXX object cnn/cnn/CMakeFiles/cnn.dir/rnn-state-machine.cc.o
[ 57%] Building CXX object cnn/cnn/CMakeFiles/cnn.dir/saxe-init.cc.o
[ 58%] Building CXX object cnn/cnn/CMakeFiles/cnn.dir/shadow-params.cc.o
[ 59%] Building CXX object cnn/cnn/CMakeFiles/cnn.dir/tensor.cc.o
[ 60%] Building CXX object cnn/cnn/CMakeFiles/cnn.dir/training.cc.o
[ 61%] Linking CXX static library libcnn.a
[ 61%] Built target cnn
Scanning dependencies of target labeler
[ 62%] Building CXX object src/labeler/CMakeFiles/labeler.dir/main.cc.o
[ 63%] Building CXX object src/labeler/CMakeFiles/labeler.dir/model.cc.o
[ 64%] Building CXX object src/labeler/CMakeFiles/labeler.dir/corpus.cc.o
[ 65%] Building CXX object src/labeler/CMakeFiles/labeler.dir/__/logging.cc.o
[ 67%] Building CXX object src/labeler/CMakeFiles/labeler.dir/__/layer.cc.o
[ 68%] Building CXX object src/labeler/CMakeFiles/labeler.dir/__/utils.cc.o
[ 69%] Building CXX object src/labeler/CMakeFiles/labeler.dir/__/training_utils.cc.o
[ 70%] Linking CXX executable ../../../bin/labeler
[ 70%] Built target labeler
Scanning dependencies of target crf
[ 71%] Building CXX object src/crf/CMakeFiles/crf.dir/main.cc.o
[ 72%] Building CXX object src/crf/CMakeFiles/crf.dir/crf.cc.o
[ 73%] Building CXX object src/crf/CMakeFiles/crf.dir/__/layer.cc.o
[ 74%] Building CXX object src/crf/CMakeFiles/crf.dir/__/logging.cc.o
[ 75%] Building CXX object src/crf/CMakeFiles/crf.dir/__/training_utils.cc.o
[ 76%] Building CXX object src/crf/CMakeFiles/crf.dir/__/utils.cc.o
[ 77%] Building CXX object src/crf/CMakeFiles/crf.dir/__/labeler/corpus.cc.o
[ 78%] Linking CXX executable ../../../bin/crf
[ 78%] Built target crf
Scanning dependencies of target semi_crf
[ 79%] Building CXX object src/semi_crf/CMakeFiles/semi_crf.dir/main.cc.o
[ 80%] Building CXX object src/semi_crf/CMakeFiles/semi_crf.dir/semi_crf.cc.o
[ 81%] Building CXX object src/semi_crf/CMakeFiles/semi_crf.dir/corpus.cc.o
/Users/panc/sandbox/segrep-for-nn-semicrf/src/semi_crf/corpus.cc:102:11: warning: comparison of constant 18446744073709551615 with
      expression of type 'unsigned int' is always false [-Wtautological-constant-out-of-range-compare]
    if (p == std::string::npos || p == 0 || p == (token.size() - 1)) {
        ~ ^  ~~~~~~~~~~~~~~~~~
1 warning generated.
[ 82%] Building CXX object src/semi_crf/CMakeFiles/semi_crf.dir/__/logging.cc.o
[ 84%] Building CXX object src/semi_crf/CMakeFiles/semi_crf.dir/__/training_utils.cc.o
[ 85%] Building CXX object src/semi_crf/CMakeFiles/semi_crf.dir/__/utils.cc.o
[ 86%] Building CXX object src/semi_crf/CMakeFiles/semi_crf.dir/__/layer.cc.o
[ 87%] Building CXX object src/semi_crf/CMakeFiles/semi_crf.dir/__/semi_crf_layer.cc.o
/Users/panc/sandbox/segrep-for-nn-semicrf/src/semi_crf_layer.cc:204:42: error: non-constant-expression cannot be narrowed from type
      'size_type' (aka 'unsigned long') to 'unsigned int' in initializer list [-Wc++11-narrowing]
  auto padding = cnn::expr::zeroes(cg, { zeros.size() });
                                         ^~~~~~~~~~~~
/Users/panc/sandbox/segrep-for-nn-semicrf/src/semi_crf_layer.cc:204:42: note: insert an explicit cast to silence this issue
  auto padding = cnn::expr::zeroes(cg, { zeros.size() });
                                         ^~~~~~~~~~~~
                                         static_cast<unsigned int>( )
1 error generated.
make[3]: *** [src/semi_crf/CMakeFiles/semi_crf.dir/__/semi_crf_layer.cc.o] Error 1
make[2]: *** [src/semi_crf/CMakeFiles/semi_crf.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2

I am using homebrew gcc 6.2

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/6.2.0/libexec/gcc/x86_64-apple-darwin15.6.0/6.2.0/lto-wrapper
Target: x86_64-apple-darwin15.6.0
Configured with: ../configure --build=x86_64-apple-darwin15.6.0 --prefix=/usr/local/Cellar/gcc/6.2.0 --libdir=/usr/local/Cellar/gcc/6.2.0/lib/gcc/6 --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-6 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl --with-system-zlib --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --with-build-config=bootstrap-debug --disable-werror --with-pkgversion='Homebrew gcc 6.2.0' --with-bugurl=https://github.com/Homebrew/homebrew/issues --enable-plugin --disable-nls --enable-multilib
Thread model: posix
gcc version 6.2.0 (Homebrew gcc 6.2.0)

My system is Mac OSX 10.11.6.

Anyone can help?

Oneplus added a commit that referenced this issue Feb 2, 2017
@pancodia
Copy link
Author

pancodia commented Feb 2, 2017

thanks for taking the time to fix it. I cloned the repo again. But this time I got an even earlier error:

$ git submodule init
Submodule 'cnn' (https://github.com/clab/cnn) registered for path 'cnn'
Submodule 'eigen' (https://github.com/RLovelett/eigen.git) registered for path 'eigen'
panc-at-ibm:segrep-for-nn-semicrf panc$ git submodule update
Cloning into '/Users/panc/sandbox/segrep-for-nn-semicrf/cnn'...
Cloning into '/Users/panc/sandbox/segrep-for-nn-semicrf/eigen'...
Submodule path 'cnn': checked out '89204a71f8804713c309eb256bf404486b1239be'
error: no such remote ref 0dd400093c013847efecf79095af91c24dcdbc72
Fetched in submodule path 'eigen', but it did not contain 0dd400093c013847efecf79095af91c24dcdbc72. Direct fetching of that commit failed.

It seems to have something to do with the git commit.

@Oneplus
Copy link
Owner

Oneplus commented Feb 2, 2017

try git submodule update --init?

The error happens in fetching dependent libraries. I am not sure what's wrong with it.

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

No branches or pull requests

2 participants