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

compilation issue on OSX #2

Closed
samoht opened this issue Sep 25, 2017 · 5 comments
Closed

compilation issue on OSX #2

samoht opened this issue Sep 25, 2017 · 5 comments
Labels

Comments

@samoht
Copy link

samoht commented Sep 25, 2017

Any idea what went wrong?

$ make
ocaml setup.ml -build
g++ -O3 -I. -I./unsupported/ -c -fPIC -ansi -Wno-extern-c-compat -Wno-c++11-long-long eigen_tensor.cpp -o eigen_tensor.o
In file included from eigen_tensor.cpp:8:
In file included from ./unsupported/Eigen/CXX11/Tensor:142:
./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_>
      ^
./unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h:34:63: note: template is declared here
template<typename T, typename Dimensions, int Options_> class TensorStorage;
                                                              ^
1 error generated.
make[1]: *** [all] Error 1
@ryanrhymes
Copy link
Member

Hi Thomas, thanks for pointing it out. I think the exact bug has been reported here: http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1459

I think it also depends on the compiler used, mine (Apple LLVM version 8.1.0 (clang-802.0.42)) seems working fine. Can you try another compiler maybe?

and the way of fixing this can be found here (similar issue I think): stan-dev/math#476

Since this issue originates from the Eigen library and has been reported on their website, it is probably better to let them fix it. I will have a look at their newest version to see if this has been fixed or not.

@ryanrhymes
Copy link
Member

The same error occurred on my OSX with Apple LLVM version 9.0.0 (clang-900.0.37), so I used
-Wno-invalid-partial-specialization to disable this error. Now it should be fine, so closing this. But do let me know if there is still any issues.

Thanks again for reporting this, really appreciate it.

@moorage
Copy link

moorage commented Dec 24, 2017

@ryanrhymes Do you know where to specify the -Wno-invalid-partial-specialization flag in XCode?

On a side note, I was able to download the devel branch of Eigen, and this issue is fixed, at least (eigen-034b6c3e1017).

@ryanrhymes
Copy link
Member

@moorage unfortunately I don't now how to set that in XCode, but I will publish a new release of Eigen (with this issue fixed) on OPAM soon, so you can just use opam to install.

@hweekuan
Copy link

i am using Bazel
i tried to add -Wno-invalid-partial-specialization flag by this line in the BUILD file,

copts = ["-Wno-invalid-partial-specialization"],

but still getting the same error, seems copts line has no effect. errors output here:

ERROR: /Users/hweekuan/research/projects/model/termite_mound/20170430_tensorflow/tensorflow/tensorflow/core/kernels/BUILD:3141:1: C++ compilation of rule '//tensorflow/core/kernels:scatter_nd_op' failed (Exit 1).
In file included from tensorflow/core/kernels/scatter_nd_op.cc:19:
In file included from ./tensorflow/core/kernels/scatter_nd_op.h:19:
In file included from ./third_party/eigen3/unsupported/Eigen/CXX11/Tensor:4:
In file included from external/eigen_archive/unsupported/Eigen/CXX11/Tensor:149:
external/eigen_archive/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_>

facebook-github-bot pushed a commit to facebookarchive/caffe2 that referenced this issue Jan 16, 2018
Summary:
* I saw this fail on my Mac, but it's a general problem. More details at owlbarn/eigen#2
Closes #1756

Reviewed By: pietern

Differential Revision: D6729609

Pulled By: orionr

fbshipit-source-id: e03cce1d6a6b68b131bae9b84d28636c06f85615
zou3519 pushed a commit to zou3519/pytorch that referenced this issue Mar 30, 2018
Summary:
* I saw this fail on my Mac, but it's a general problem. More details at owlbarn/eigen#2
Closes facebookarchive/caffe2#1756

Reviewed By: pietern

Differential Revision: D6729609

Pulled By: orionr

fbshipit-source-id: e03cce1d6a6b68b131bae9b84d28636c06f85615
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants