-
Notifications
You must be signed in to change notification settings - Fork 16.1k
Description
What version of protobuf and what language are you using?
Version: master/v3.9.1.0, v3.9.1.0 is reported by CMake script.
Language: C++
What operating system (Linux, Windows, ...) and version?
Windows 10
What runtime / compiler are you using (e.g., python version or gcc version)
gcc 8.1.0 in mingw-w64
What did you do?
Steps to reproduce the behavior:
- download tensorflow 1.13.2 source code
- generate codeblocks project with cmake under tensorflow/contrib/cmake/_build_mingw64 directory
- open the tensorflow.cbp project with codeblocks svn 11825
- codeblocks already configured with mingw-w64, so select GNU GCC Compiler (x64) from the build options dialog.
- Click the "Build" button
- Then cmake script start to call git clone to download zlib, protobuf, etc. source code.
- Click the "Build" button again if failed by cmake find sh, the second time seems ignored this error.
- the "expected primary-expression before 'attribute'" error occurred when compiling protobuf.
What did you expect to see
protobuf been compiled.
What did you see instead?
tensorflow-1.13.2/tensorflow/contrib/cmake/_build_mingw64/protobuf/src/protobuf/src/google/protobuf/port_def.inc:516:42: error: expected primary-expression before 'attribute'
PROTOBUF_EXPORT_TEMPLATE_TEST(MSVC_HACK, __declspec(dllexport));
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
Anything else we should know about your project / environment
I'm trying compile tensorflow C++ library with mingw-w64 toolchain, as I need a little cross-compile to set -march= for some special cpu. the make file is generated by cmake. If bazel support setting -march= flags, let me know.