Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

building from source fails due to mlir BUILD referring to MlirHloModule.cc instead of MlirHloModule.cpp #11068

Closed
randyau opened this issue Jun 11, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@randyau
Copy link

randyau commented Jun 11, 2022

building jax from source with --enable_cuda flag,
freshly cloned from the repo
on an WSL2 ubuntu install

gets this error in building:
ERROR: /mnt/e/linux/ubuntu/jax/jaxlib/mlir/_mlir_libs/BUILD.bazel:90:13: no such target '@org_tensorflow//tensorflow/compiler/mlir/hlo:python/MlirHloModule.cc': target 'python/MlirHloModule.cc' not declared in package 'tensorflow/compiler/mlir/hlo' (did you mean 'python/MlirHloModule.cpp'?) defined by /home/agi/.cache/bazel/_bazel_agi/e71f5b8290a4fc88939262d32d7b9edb/external/org_tensorflow/tensorflow/compiler/mlir/hlo/BUILD and referenced by '//jaxlib/mlir/_mlir_libs:_mlirHlo.so'

Issue can be fixed by going to
/mnt/e/linux/ubuntu/jax/jaxlib/mlir/_mlir_libs/BUILD.bazel:90
and changing the file extension from .cc to .cpp

Looks like the line was recently patched from .cpp to .cc to "Fix broken builds"
not sure why there's conflicting build experiences

@ludgerpaehler
Copy link
Contributor

See the linked pull-request I just opened - the real change happened inside of the Tensorflow repository, where the MlirHLO compiler lies, and where cpp files were renamed to cc files. When bumping the version of the Tensorflow repo in the WORKSPACE file to a more current one, this issue is fixed.

@ludgerpaehler
Copy link
Contributor

Try again now from main - it should work now :)

@hawkinsp
Copy link
Collaborator

This is now fixed at head due to #11073 (Thanks for the PR @ludgerpaehler !)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants