clab / dynet

DyNet: The Dynamic Neural Network Toolkit
Apache License 2.0
3.41k stars 707 forks source link

Build error related to eigen3 #1404

Open wangkuiyi opened 6 years ago

wangkuiyi commented 6 years ago

I tried to build dynet on macOS 10.13.5 using Xcode 9.4.1 and Apple LLVM version 9.1.0 (clang-902.0.39.2). I followed the steps, and did:

  1. homebrew install --HEAD eigen
  2. cmake .. -DEIGEN3_INCLUDE_DIR=/usr/local/eigen3 -DENABLE_CPP_EXAMPLES=ON
  3. make

Then I got many replica of the following error:

/usr/local/Cellar/eigen/3.3.3/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h:39:7: error: class template partial
      specialization is not more specialized than the primary template [-Winvalid-partial-specialization]
class TensorStorage<T, FixedDimensions, Options_>
      ^
/usr/local/Cellar/eigen/3.3.3/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h:34:63: note: template is declared
      here
template<typename T, typename Dimensions, int Options_> class TensorStorage;
neubig commented 6 years ago

It looks like you didn't install the recommended version of Eigen suggested in the installation instructions. Could you try with the recommended version of Eigen?