Package Details: python-jaxlib 0.4.26-1

Git Clone URL: https://aur.archlinux.org/python-jaxlib.git (read-only, click to copy)
Package Base: python-jaxlib
Description: XLA library for JAX
Upstream URL: https://github.com/google/jax/
Keywords: deep-learning google jax machine-learning xla
Licenses: Apache
Groups: jax
Submitter: daskol
Maintainer: daskol
Last Packager: daskol
Votes: 5
Popularity: 0.022412
First Submitted: 2021-01-12 12:50 (UTC)
Last Updated: 2024-04-03 23:32 (UTC)

Latest Comments

« First ‹ Previous 1 2 3 4 5 Next › Last »

gatsby commented on 2023-12-11 09:17 (UTC)

Hello, I have an error in the compilation for which I cannot find information. The computer is old and has few resources, it may have something to do with it but there are no clues in the traces.


Bazel binary path: ./bazel-6.1.2-linux-x86_64
Bazel version: 6.1.2
Python binary path: /usr/bin/python
Python version: 3.11
NumPy version: 1.26.2
MKL-DNN enabled: yes
Target CPU: x86_64
Target CPU features: release
CUDA enabled: no
ROCm enabled: no

Building XLA and installing it in the jaxlib source tree...
./bazel-6.1.2-linux-x86_64 --output_user_root=/home/imhere/auracle/python-jaxlib/src/bazel run --verbose_failures=true //jaxlib/tools:build_wheel -- --output_path=/home/imhere/auracle/python-jaxlib/src/jax-jaxli
b-v0.4.21/dist --cpu=x86_64
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=0 --terminal_columns=80
INFO: Reading rc options for 'run' from /home/imhere/auracle/python-jaxlib/src/jax-jaxlib-v0.4.21/.bazelrc:
  Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'run' from /home/imhere/auracle/python-jaxlib/src/jax-jaxlib-v0.4.21/.bazelrc:
  Inherited 'build' options: --nocheck_visibility --apple_platform_type=macos --macos_minimum_os=10.14 --announce_rc --define open_source_build=true --spawn_strategy=standalone --enable_platform_specific_config
--experimental_cc_shared_library --define=no_aws_support=true --define=no_gcp_support=true --define=no_hdfs_support=true --define=no_kafka_support=true --define=no_ignite_support=true --define=grpc_no_ares=true
--define=tsl_link_protobuf=true -c opt --config=short_logs --copt=-DMLIR_PYTHON_PACKAGE_PREFIX=jaxlib.mlir. --@xla//xla/python:enable_gpu=false
INFO: Reading rc options for 'run' from /home/imhere/auracle/python-jaxlib/src/jax-jaxlib-v0.4.21/.jax_configure.bazelrc:
  Inherited 'build' options: --strategy=Genrule=standalone --repo_env PYTHON_BIN_PATH=/usr/bin/python --action_env=PYENV_ROOT --python_path=/usr/bin/python --action_env=JAXLIB_RELEASE --config=avx_posix --config
=mkl_open_source_only
INFO: Found applicable config definition build:short_logs in file /home/imhere/auracle/python-jaxlib/src/jax-jaxlib-v0.4.21/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:avx_posix in file /home/imhere/auracle/python-jaxlib/src/jax-jaxlib-v0.4.21/.bazelrc: --copt=-mavx --host_copt=-mavx
INFO: Found applicable config definition build:mkl_open_source_only in file /home/imhere/auracle/python-jaxlib/src/jax-jaxlib-v0.4.21/.bazelrc: --define=tensorflow_mkldnn_contraction_kernel=1
INFO: Found applicable config definition build:linux in file /home/imhere/auracle/python-jaxlib/src/jax-jaxlib-v0.4.21/.bazelrc: --config=posix --copt=-Wno-unknown-warning-option --copt=-Wno-stringop-truncation
--copt=-Wno-array-parameter
INFO: Found applicable config definition build:posix in file /home/imhere/auracle/python-jaxlib/src/jax-jaxlib-v0.4.21/.bazelrc: --copt=-fvisibility=hidden --copt=-Wno-sign-compare --cxxopt=-std=c++17 --host_cxx
opt=-std=c++17
Loading:
Loading:
DEBUG: /home/imhere/auracle/python-jaxlib/src/bazel/04d5f30ac65beb0dc0d4f941d1fb7db7/external/xla/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'llvm-raw' because it already exists.
Loading:
Loading:
Loading: 0 packages loaded
Analyzing: target //jaxlib/tools:build_wheel (38 packages loaded, 1571 targets configured)
INFO: Analyzed target //jaxlib/tools:build_wheel (39 packages loaded, 7665 targets configured).
 checking cached actions
INFO: Found 1 target...
[0 / 3] [Prepa] BazelWorkspaceStatusAction stable-status.txt
[249 / 4,802] ProtoCompile external/xla/xla/xla_data.pb.h; 0s local ... (2 actions, 1 running)
[249 / 4,802] ProtoCompile external/xla/xla/xla_data.pb.h; 1s local ... (2 actions running)
ERROR: /home/imhere/auracle/python-jaxlib/src/bazel/04d5f30ac65beb0dc0d4f941d1fb7db7/external/xla/xla/BUILD:80:17: ProtoCompile external/xla/xla/xla_data.pb.h failed: (Illegal instruction): protoc failed: error
executing command (from target @xla//xla:xla_data_proto_genproto)
  (cd /home/imhere/auracle/python-jaxlib/src/bazel/04d5f30ac65beb0dc0d4f941d1fb7db7/execroot/__main__ && \
  exec env - \
    JAXLIB_RELEASE=0.4.21 \
    PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl \
  bazel-out/k8-opt-exec-50AE0418/bin/external/com_google_protobuf/protoc '--cpp_out=bazel-out/k8-opt/bin/external/xla' -Iexternal/xla -Ibazel-out/k8-opt/bin/external/com_google_protobuf/_virtual_imports/any_prot
o -Ibazel-out/k8-opt/bin/external/com_google_protobuf/_virtual_imports/source_context_proto -Ibazel-out/k8-opt/bin/external/com_google_protobuf/_virtual_imports/type_proto -Ibazel-out/k8-opt/bin/external/com_goo
gle_protobuf/_virtual_imports/api_proto -Ibazel-out/k8-opt/bin/external/com_google_protobuf/_virtual_imports/descriptor_proto -Ibazel-out/k8-opt/bin/external/com_google_protobuf/_virtual_imports/compiler_plugin_
proto -Ibazel-out/k8-opt/bin/external/com_google_protobuf/_virtual_imports/duration_proto -Ibazel-out/k8-opt/bin/external/com_google_protobuf/_virtual_imports/empty_proto -Ibazel-out/k8-opt/bin/external/com_goog
le_protobuf/_virtual_imports/field_mask_proto -Ibazel-out/k8-opt/bin/external/com_google_protobuf/_virtual_imports/struct_proto -Ibazel-out/k8-opt/bin/external/com_google_protobuf/_virtual_imports/timestamp_prot
o -Ibazel-out/k8-opt/bin/external/com_google_protobuf/_virtual_imports/wrappers_proto external/xla/xla/xla_data.proto)
# Configuration: 5ea8fb2d7866cbe573747865075f311e36cf01e7ad969e452133030105df9938
# Execution platform: @local_execution_config_platform//:platform
Target //jaxlib/tools:build_wheel failed to build
[251 / 4,802] checking cached actions
INFO: Elapsed time: 58.224s, Critical Path: 7.38s
INFO: 3 processes: 3 internal.
FAILED: Build did NOT complete successfully
ERROR: Build failed. Not running target
Traceback (most recent call last):
  File "/home/imhere/auracle/python-jaxlib/src/jax-jaxlib-v0.4.21/build/build.py", line 602, in <module>
    main()
  File "/home/imhere/auracle/python-jaxlib/src/jax-jaxlib-v0.4.21/build/build.py", line 573, in main
    shell(command)
  File "/home/imhere/auracle/python-jaxlib/src/jax-jaxlib-v0.4.21/build/build.py", line 44, in shell
    output = subprocess.check_output(cmd)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['./bazel-6.1.2-linux-x86_64', '--output_user_root=/home/imhere/auracle/python-jaxlib/src/bazel', 'run', '--verbose_failures=true', '//jaxlib/tools:build_wheel', '--', '--
output_path=/home/imhere/auracle/python-jaxlib/src/jax-jaxlib-v0.4.21/dist', '--cpu=x86_64']' returned non-zero exit status 1.

daskol commented on 2023-10-27 16:42 (UTC) (edited on 2023-10-27 16:50 (UTC) by daskol)

@mane.andrea I'm not sure that prepare/build is a bug. According to Arch Wiki

one rule of thumb is to put in prepare() the steps that should run exactly once after extracting the sources.

Envvars, indeed, should not be placed in prepare(). Anyway reporting an issue to yay could be a good idea to highlight sharp bits once again.

UPD I guess I know why yay runs prepare() and build() in different shell sessions: yay prompts a user to edit or view PKGBUILD.

You accidentally pushed

Sorry for that. I don't know how it could happen.

mane.andrea commented on 2023-10-27 00:15 (UTC)

You accidentally pushed

    pkgrel = 0

in .SRCINFO. I found out when I saw my PKGBUILD was not up-to-date even after I had synced yay.

mane.andrea commented on 2023-10-26 19:36 (UTC)

@daskol I think it's a good idea to submit a bug report to yay. Do you have any additional information that could be useful for the bug report? I.e. which is the specific part of the PKGBUILD that requires prepare and build be invoked sequentially? (Sorry if my understanding of the issue is superficial)

rekman commented on 2023-10-24 19:36 (UTC)

@daskol uggghhh....

daskol commented on 2023-10-24 19:32 (UTC)

@rekman Yes, it is. LLVM is transitive dependency via XLA and both XLA and LLVM are pinned by commit hashes. I tried to build with system's LLVM (bad idea).

daskol commented on 2023-10-24 19:30 (UTC)

@h3ss Indeed. @Henry-ZHR mentioned the issues regarding to yay. I consulted with some core packages and PKGBUILD docs and it turns out that prepare and build can be invoked separately in general. But some core packages ignore this rule since makepkg in contrast to yay runs all stages sequentially.

rekman commented on 2023-10-24 19:20 (UTC)

Is it really necessary to build llvm from source to build this package?

h3ss commented on 2023-10-21 13:47 (UTC)

@daskol I believe I have found the root cause of the lingering errors that myself and others have reported.

From what I can tell, the prepare function in the PKGBUILD is either not consistently being run with AUR helpers, or it is being run separately from the build, such that the environment variables don't carry over. This function doesn't necessarily get run anyway, for example if somebody were to pass the --noextract argument to makepkg it will not be run (and I see this being passed in the yay source code).

Would you please try moving the export JAXLIB_RELEASE=$pkgvar into the build function?

To test this, I used paru -U in the package directory. Initially, before I moved the export from the prepare to the build function, this failed with the same error that was seen when updating from the AUR. After I moved the export, it built successfully with the same command.

h3ss commented on 2023-10-21 04:05 (UTC) (edited on 2023-10-21 12:27 (UTC) by h3ss)

@daskol Every single time there's an update I have to manually do the install because of the error that @65a pointed out. It's pretty frustrating when these updates hit, and I watch it build for 15 minutes, only to have the perfectly fine .whl file get discarded, and have to start the build over again manually.

What's strange is I don't even have to modify the PKGBUILD, I just have to git clone and makepkg -si and it builds and installs fine. BUT, any attempt to install it using an AUR helper (I tried both Paru & Yay) fails with the error that people have been pointing out to you. Based on your previous comment, I also tried deleting the bazel cache (rm -rf ~/.cache/bazel/) before trying an install and that didn't help.

Can we please get a persistent reliable fix for this that works with AUR helpers like yay and paru?!