google-deepmind / code_contests

Apache License 2.0
2.04k stars 200 forks source link

[macOS] Error Running Bazel: from riegeli.records import record_reader ImportError : symbol not found in flat namespace #5

Open JGoDC opened 2 years ago

JGoDC commented 2 years ago

Please help with Bazel run gets ImportError on macOS 12.2 Monterey (Intel chip):

% bazel run -c opt \ :print_names_and_sources /tmp/dm-code_contests/code_contests_valid.riegeli Starting local Bazel server and connecting to it... INFO: Analyzed target //:print_names_and_sources (82 packages loaded, 2025 targets configured). INFO: Found 1 target... Target //:print_names_and_sources up-to-date: bazel-bin/print_names_and_sources INFO: Elapsed time: 4.780s, Critical Path: 0.10s INFO: 1 process: 1 internal. INFO: Build completed successfully, 1 total action INFO: Build completed successfully, 1 total action Traceback (most recent call last): File "/private/var/tmp/_bazel_j/651bc297ae9686f74aa6889e91cbfc4c/execroot/__main__/bazel-out/darwin-opt/bin/print_names_and_sources.runfiles/__main__/print_names_and_sources.py", line 24, in <module> import riegeli File "/private/var/tmp/_bazel_j/651bc297ae9686f74aa6889e91cbfc4c/execroot/__main__/bazel-out/darwin-opt/bin/print_names_and_sources.runfiles/com_google_riegeli/python/riegeli/__init__.py", line 18, in <module> from riegeli.records import record_reader ImportError: dlopen(/private/var/tmp/_bazel_j/651bc297ae9686f74aa6889e91cbfc4c/execroot/__main__/bazel-out/darwin-opt/bin/print_names_and_sources.runfiles/com_google_riegeli/python/riegeli/records/record_reader.so, 0x0002): symbol not found in flat namespace '__ZNK11highwayhash11HighwayHashILj2EEclERA4_KyPKcmPy'

% bazel --version bazel 5.0.0-homebrew % python -V Python 3.7.9 % uname -m x86_64

Thanks!

KareemAlaa2001 commented 2 years ago

Getting the same exact error here as well, same machine, python version (3.7.11 in my case) and homebrew bazel version

davidhchoi commented 2 years ago

Can you check the Python 2 and compiler versions as well? And update them if necessary.

https://github.com/tensorflow/tensorflow/issues/39521 may also be related.

Luowaterbi commented 1 year ago

I have the same problem on M1pro.

felixgimeno commented 1 year ago

Can you try on Linux or bazel version 6.0.0 ?

isaacgor216 commented 8 months ago

Has anyone found a solution or workaround to this?