0

Compiling Tensorflow with Bazel, error: wrapped_clang failed: error executing command external/local_config_cc/wrapped_clang

extract of the script in terminal mac os Big Sur 11.5.2 (last update)

INFO: Analyzed target //tensorflow/tools/pip_package:build_pip_package (425 packages loaded, 34109 targets configured).
INFO: Found 1 target...
ERROR: /Users/marcbarbier/tensorflow/tensorflow/python/util/BUILD:198:27: C++ compilation of rule '//tensorflow/python/util:_pywrap_checkpoint_reader.so' failed (Exit 1): wrapped_clang failed: error executing command external/local_config_cc/wrapped_clang '-D_FORTIFY_SOURCE=1' -fstack-protector -fcolor-diagnostics -Wall -Wthread-safety -Wself-assign -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG ... (remaining 125 argument(s) skipped)
In file included from tensorflow/python/util/py_checkpoint_reader_wrapper.cc:19:
In file included from bazel-out/darwin-opt/bin/external/local_config_python/numpy_include/numpy/arrayobject.h:4:
In file included from bazel-out/darwin-opt/bin/external/local_config_python/numpy_include/numpy/ndarrayobject.h:17:
In file included from bazel-out/darwin-opt/bin/external/local_config_python/numpy_include/numpy/ndarraytypes.h:4:
bazel-out/darwin-opt/bin/external/local_config_python/numpy_include/numpy/npy_common.h:79:9: error: unknown type name 'Py_intptr_t'
typedef Py_intptr_t npy_intp;
        ^
bazel-out/darwin-opt/bin/external/local_config_python/numpy_include/numpy/npy_common.h:80:9: error: unknown type name 'Py_uintptr_t'
typedef Py_uintptr_t npy_uintp;
        ^
bazel-out/darwin-opt/bin/external/local_config_python/numpy_include/numpy/npy_common.h:225:2: error: Must use Python with unicode enabled.
#error Must use Python with unicode enabled.
 ^
bazel-out/darwin-opt/bin/external/local_config_python/numpy_include/numpy/npy_common.h:873:9: error: unknown type name 'npy_uint16'
typedef npy_uint16 npy_half;

etc......

JaMiT
  • 14,422
  • 4
  • 15
  • 31
mab66
  • 31
  • 5
  • please format properly your question with ``` code ``` and add the codeline which throws the error – cards Aug 21 '21 at 12:36
  • To me, the `wrapped_clang failed` message appears to be generic (simply saying that at least one error occurred) and the real errors follow it. If so, then your code would be relevant. Still, on the off chance that the problem is build related, does [How to run mediapipe with c++ on M1 mac](https://stackoverflow.com/questions/67660034) help? – JaMiT Aug 21 '21 at 15:44

0 Answers0