rocm-arch / tensorflow-rocm

tensorflow-rocm AUR package
17 stars 12 forks source link

'numeric_limits' is not a member of 'std' #31

Closed riaqn closed 3 years ago

riaqn commented 3 years ago

When building, errors occurs:

ERROR: /home/yay/.cache/bazel/_bazel_yay/3ca7aa11f50350633482c4cd98dc9e21/external/ruy/ruy/BUILD:295:11: C++ compilation of rule '@ruy//ruy:block_map' failed (Exit 1): crosstool_wrapper_driver_is_not_gcc failed: error executing command 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 39 argument(s) skipped)
external/ruy/ruy/block_map.cc: In function 'void ruy::MakeBlockMap(int, int, int, int, int, int, int, int, const ruy::CpuCacheParams&, ruy::BlockMap*)':
external/ruy/ruy/block_map.cc:395:25: error: 'numeric_limits' is not a member of 'std'
  395 |   int best_score = std::numeric_limits<int>::min();
      |                         ^~~~~~~~~~~~~~
external/ruy/ruy/block_map.cc:395:40: error: expected primary-expression before 'int'
  395 |   int best_score = std::numeric_limits<int>::min();
      |                                        ^~~
ERROR: /home/yay/.cache/yay/tensorflow-rocm/src/tensorflow-2.5.0-rocm/tensorflow/lite/python/BUILD:59:10 C++ compilation of rule '@ruy//ruy:block_map' failed (Exit 1): crosstool_wrapper_driver_is_not_gcc failed: error executing command 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 39 argument(s) skipped)

Maybe related: https://github.com/onnx/onnx-tensorrt/issues/474

riaqn commented 3 years ago

I found this relavant issue here: https://github.com/tensorflow/tensorflow/issues/50303 Seems like easy fix - can we fix it please?

riaqn commented 3 years ago

I think tensorflow-2.6.0 has fixed the issue - can we update to 2.6.0 please?

riaqn commented 3 years ago

@acxz Thank you for upgrading to tensorflow-2.6.0. I'm now trying to build the latest commit, but encountered another error:

ERROR: An error occurred during the fetch of repository 'local_config_syslibs':
   Traceback (most recent call last):
        File "/home/yay/tensorflow-rocm/src/tensorflow-2.6.0-rocm/third_party/systemlibs/syslibs_configure.bzl", line 152, column 33, in _syslibs_autoconf_impl
                _create_local_repository(repository_ctx)
        File "/home/yay/tensorflow-rocm/src/tensorflow-2.6.0-rocm/third_party/systemlibs/syslibs_configure.bzl", line 143, column 55, in _create_local_repository
                "%{syslibs_list}": _format_system_lib_list(repository_ctx),
        File "/home/yay/tensorflow-rocm/src/tensorflow-2.6.0-rocm/third_party/systemlibs/syslibs_configure.bzl", line 104, column 32, in _format_system_lib_list
                libs = _get_system_lib_list(repository_ctx)
        File "/home/yay/tensorflow-rocm/src/tensorflow-2.6.0-rocm/third_party/systemlibs/syslibs_configure.bzl", line 89, column 32, in _get_system_lib_list
                auto_configure_fail("Invalid system lib set: %s" % lib)
        File "/home/yay/tensorflow-rocm/src/tensorflow-2.6.0-rocm/third_party/systemlibs/syslibs_configure.bzl", line 54, column 9, in auto_configure_fail
                fail("\n%sSystem Library Configuration Error:%s %s\n" % (red, no_color, msg))
Error in fail:
System Library Configuration Error: Invalid system lib set: pcre
ERROR: Skipping '//tensorflow/tools/pip_package:build_pip_package': no such package '@local_config_syslibs//':
System Library Configuration Error: Invalid system lib set: pcre
ERROR: no such package '@local_config_syslibs//':
System Library Configuration Error: Invalid system lib set: pcre

I can confirm that both pcre and pcre2 package are installed from arch repo.

riaqn commented 3 years ago

@acxz according to this:https://github.com/tensorflow/tensorflow/blob/master/third_party/systemlibs/syslibs_configure.bzl pcre is removed because it's not needed anymore. removing pcre make the build continue.

afzalarsalan commented 3 years ago

Where did you end up removing pcre from, I seem tp be running into the same issue

acxz commented 3 years ago

@riaqn sorry about that I forgot to remove pcre in the lastest update. Feel free to close this issue if you can continue building past this point.

@afzalarsalan thx for the ping haha

riaqn commented 3 years ago

@acxz thank you for fixing the issue. Just out of curiosity, do you use this package yourself? Or is it pure altruistic contribution? Because there are several issues that's obvious if one tries to build.

acxz commented 3 years ago

Last summer/fall, I would consistently be building this package and resolving issues, along with the rocm stack and pytorch-rocm. At that point, the package had built and even run. I've since dropped actively working on this and just update the package or merge others PRs.