rocm-arch / tensorflow-rocm

tensorflow-rocm AUR package
17 stars 12 forks source link

Build error, uint32_t was not declared in this scope on python 3.11 #63

Open ashprice opened 11 months ago

ashprice commented 11 months ago

If python 3.10 is required as the tensorflow page in the rocm documentation indicates, do I need to download that and pass it as the library path? If so, I'd say it would be ideal to mark the AUR package python310 as a dependency.

As for 3.11:

I cleared the bazel cache prior to attempting the build, as this frequently causes issues.

ERROR: /tmp/makepkg/tensorflow-rocm/src/tensorflow-2.13.0-rocm/tensorflow/lite/kernels/internal/BUILD:911:11: Compiling tensorflow/lite/kernels/internal/spectrogram.cc failed: (Exit 1): crosstool_wrapper_driver_is_not_gcc failed: error executing command (from target //tensorflow/lite/kernels/internal:audio_utils) external/local_config_rocm/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer ... (remaining 52 arguments skipped)
/home/hearth/.cache/bazel/_bazel_hearth/9f9ba52012db4d4e8fcfa48069d5fcb2/execroot/org_tensorflow/external/local_config_rocm/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc:23: DeprecationWarning: 'pipes' is deprecated and slated for removal in Python 3.13
  import pipes
tensorflow/lite/kernels/internal/spectrogram.cc:46:22: error: ‘uint32_t’ was not declared in this scope
   46 | inline int Log2Floor(uint32_t n) {
      |                      ^~~~~~~~
tensorflow/lite/kernels/internal/spectrogram.cc:20:1: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
   19 | #include <math.h>
  +++ |+#include <cstdint>
   20 |
tensorflow/lite/kernels/internal/spectrogram.cc:61:24: error: ‘uint32_t’ was not declared in this scope
   61 | inline int Log2Ceiling(uint32_t n) {
      |                        ^~~~~~~~
tensorflow/lite/kernels/internal/spectrogram.cc:61:24: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
tensorflow/lite/kernels/internal/spectrogram.cc:69:8: error: ‘uint32_t’ does not name a type
   69 | inline uint32_t NextPowerOfTwo(uint32_t value) {
      |        ^~~~~~~~
tensorflow/lite/kernels/internal/spectrogram.cc:69:8: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
tensorflow/lite/kernels/internal/spectrogram.cc: In member function ‘bool tflite::internal::Spectrogram::Initialize(const std::vector<double>&, int)’:
tensorflow/lite/kernels/internal/spectrogram.cc:92:17: error: ‘NextPowerOfTwo’ was not declared in this scope
   92 |   fft_length_ = NextPowerOfTwo(window_length_);
      |                 ^~~~~~~~~~~~~~
INFO: Elapsed time: 102.151s, Critical Path: 8.63s
INFO: 1297 processes: 1041 internal, 256 local.
FAILED: Build did NOT complete successfully
==> ERROR: A failure occurred in build().
    Aborting...

This is compiling without the option for a new clang download.

If I try to use the clang download:

ERROR: Config value 'download_clang' is not defined in any .rc file

I would rather not download a separate clang, but thought I'd try it for completeness' sake.

Please let me know what other info I can provide, sorry if relevant info is lacking.

I tried playing around with the options passed to bazel as per some other git posts and repository bug issues. No luck, nor any results that I believe to be very relevant.