jingpu / Halide-HLS

HLS branch of Halide
Other
77 stars 22 forks source link

C++11 feature is not included in makefile #16

Closed chingyi071 closed 7 years ago

chingyi071 commented 7 years ago

I have tried to compile my own Halide code However there is a compilation error. The error code is as below. This is C++11 feature, and I thought there is something wrong in makefile

/users/student/mr105/cylin/Halide-HLS/apps/hls_examples/conv_hls/../../../include/HalideBuffer.h:101:27: error: a brace-enclosed initializer is not allowed here before ‘{’ token
/users/student/mr105/cylin/Halide-HLS/apps/hls_examples/conv_hls/../../../include/HalideBuffer.h:101:29: sorry, unimplemented: non-static data member initializers
/users/student/mr105/cylin/Halide-HLS/apps/hls_examples/conv_hls/../../../include/HalideBuffer.h:101:29: error: in-class initialization of static data member ‘buf’ of non-literal type
/users/student/mr105/cylin/Halide-HLS/apps/hls_examples/conv_hls/../../../include/HalideBuffer.h:108:31: sorry, unimplemented: non-static data member initializers
/users/student/mr105/cylin/Halide-HLS/apps/hls_examples/conv_hls/../../../include/HalideBuffer.h:108:31: error: ‘constexpr’ needed for in-class initialization of static data member ‘alloc’ of non-integral type
/users/student/mr105/cylin/Halide-HLS/apps/hls_examples/conv_hls/../../../include/HalideBuffer.h:111:47: sorry, unimplemented: non-static data member initializers
/users/student/mr105/cylin/Halide-HLS/apps/hls_examples/conv_hls/../../../include/HalideBuffer.h:111:47: error: ‘constexpr’ needed for in-class initialization of static data member ‘dev_ref_count’ of non-integral type
/users/student/mr105/cylin/Halide-HLS/apps/hls_examples/conv_hls/../../../include/HalideBuffer.h:118:5: error: expected unqualified-id before ‘using’
/users/student/mr105/cylin/Halide-HLS/apps/hls_examples/conv_hls/../../../include/HalideBuffer.h:122:11: error: expected nested-name-specifier before ‘not_void_T’
/users/student/mr105/cylin/Halide-HLS/apps/hls_examples/conv_hls/../../../include/HalideBuffer.h:122:11: error: using-declaration for non-member at class scope
xuanyoya commented 7 years ago

Please provide more information about what you have done that produced this error message, otherwise we can not figure out the cause. Besides, If you can compile the original applications in the repo successfully, I don't think it is the Makefile problem. Please note this is the place to report Halide-HLS issues. If you have modified Halide compiler and saw this error, then it is not the issue of this repo, and it is not guaranteed that we can help to fix it.

jingpu commented 7 years ago

It looks like a similar issue reported in #12. The new c++11 dependency might be added in the last update to Halide release_2017_05_03. @xuanyoya do you have any build issues in vivado_hls with the latest repo?

xuanyoya commented 7 years ago

@jingpu I was using the older version of this repo, but I will take a try with the latest version today or tomorrow.

xuanyoya commented 7 years ago

@jingpu I tried with the latest repo, and it indeed has the same error as above. We need to fix this issue.

xuanyoya commented 7 years ago

@chingyi071 Please pull the latest code, and let us know if there is still any issues left.