Package Details: python-tensorstore 0.1.60-1

Git Clone URL: https://aur.archlinux.org/python-tensorstore.git (read-only, click to copy)
Package Base: python-tensorstore
Description: Library for reading and writing large multi-dimensional arrays.
Upstream URL: https://github.com/google/tensorstore
Keywords: hdf5 mat n5 zarr
Licenses: Apache
Submitter: daskol
Maintainer: daskol
Last Packager: daskol
Votes: 3
Popularity: 0.58
First Submitted: 2023-02-16 11:12 (UTC)
Last Updated: 2024-06-10 09:53 (UTC)

Latest Comments

1 2 Next › Last »

intelfx commented on 2024-06-14 22:44 (UTC)

I have cooked up a better patch to unbreak build with GCC >= 14, please apply: https://0x0.st/Xct3.diff

h3ss commented on 2024-06-10 15:35 (UTC) (edited on 2024-06-10 15:36 (UTC) by h3ss)

If you're getting this error on building:

./tensorstore/internal/multi_vector_view.h:169:39: error: use of built-in trait '__type_pack_element<I, const long int, const long int>' in function signature; use library traits instead

You can fix it by changing the compiler that will be used to clang. Specifically, you just need to add this line to the PKGBUILD at the top of the build() function:

    export CC=clang

For this to work, you'll have to have clang installed of course.

Alternatively, we could wait till the next release when this fix should be included.

Tomsod commented on 2024-05-25 20:47 (UTC)

The build error is caused by GCC 14 incompatibility, see here for a workaround: https://github.com/google/tensorstore/issues/161

xdewsz commented on 2024-05-23 05:57 (UTC) (edited on 2024-05-23 06:01 (UTC) by xdewsz)

Seconding the issue with building that 4rozenwolves discovered.

Edit: for those of you willing to go off the AUR, check the maintainer's github page for an informal repository of Arch AI-related packages.

4rozenwolves commented on 2024-05-10 07:20 (UTC) (edited on 2024-05-10 07:21 (UTC) by 4rozenwolves)

There is error building.

ERROR: /var/tmp/pamac-build-frostbite/python-tensorstore/src/tensorstore-0.1.51/python/tensorstore/BUILD:258:20: Compiling python/tensorstore/index.cc failed: (Exit 1): gcc failed: error executing command (from target //python/tensorstore:index) 
  (cd /home/frostbite/.cache/bazel/_bazel_frostbite/473f1caf72b4070c5ebb2c47e243b77f/sandbox/linux-sandbox/6/execroot/tensorstore && \
  exec env - \
    PATH=/home/frostbite/.cache/bazelisk/downloads/bazelbuild/bazel-6.1.0-linux-x86_64/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/opt/cuda/bin:/opt/cuda/nsight_compute:/opt/cuda/nsight_systems/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl \
    PWD=/proc/self/cwd \
  /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections -fdata-sections '-std=c++0x' -MD -MF bazel-out/k8-opt/bin/python/tensorstore/_objs/index/index.pic.d '-frandom-seed=bazel-out/k8-opt/bin/python/tensorstore/_objs/index/index.pic.o' -fPIC '-DPYBIND11_NAMESPACE=pybind11' '-DBAZEL_CURRENT_REPOSITORY=""' -iquote . -iquote bazel-out/k8-opt/bin -iquote external/com_github_pybind_pybind11 -iquote bazel-out/k8-opt/bin/external/com_github_pybind_pybind11 -iquote external/local_config_python -iquote bazel-out/k8-opt/bin/external/local_config_python -iquote external/com_google_absl -iquote bazel-out/k8-opt/bin/external/com_google_absl -iquote external/com_google_riegeli -iquote bazel-out/k8-opt/bin/external/com_google_riegeli -iquote external/com_github_nlohmann_json -iquote bazel-out/k8-opt/bin/external/com_github_nlohmann_json -iquote external/net_sourceforge_half -iquote bazel-out/k8-opt/bin/external/net_sourceforge_half -Ibazel-out/k8-opt/bin/external/local_config_python/_virtual_includes/python_headers -Ibazel-out/k8-opt/bin/external/com_github_nlohmann_json/_virtual_includes/nlohmann_json -Ibazel-out/k8-opt/bin/external/net_sourceforge_half/_virtual_includes/half '-fdiagnostics-color=always' -Wno-deprecated-declarations -Wno-sign-compare -Wno-unused-but-set-parameter -Wno-maybe-uninitialized -Wno-sequence-point -Wno-unknown-warning-option '-fvisibility=hidden' '-std=c++17' -fsized-deallocation -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c python/tensorstore/index.cc -o bazel-out/k8-opt/bin/python/tensorstore/_objs/index/index.pic.o)
# Configuration: f5138babd12d457d42947482e3ba8ba0fd4aef9b665759e4c4302475db183ebf
# Execution platform: @local_config_platform//:host

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
In file included from ./tensorstore/box.h:33,
             from ./tensorstore/array.h:38,
             from ./tensorstore/index_space/dim_expression.h:28,
             from ./python/tensorstore/index.h:32,
             from python/tensorstore/index.cc:19:
./tensorstore/internal/multi_vector.h: In instantiation of 'static tensorstore::span<tensorstore::internal::MultiVectorAccess<tensorstore::internal::MultiVectorStorageImpl<Extent, InlineSize, Ts> >::ElementType<I>, Extent> tensorstore::internal::MultiVectorAccess<tensorstore::internal::MultiVectorStorageImpl<Extent, InlineSize, Ts> >::get(StorageType*) [with long unsigned int I = 1; long int Extent = -1; long int InlineSize = 0; Ts = {long int, long int}]':
./tensorstore/internal/multi_vector.h:276:39: error: use of built-in trait '__type_pack_element<I, long int, long int>' in function signature; use library traits instead
  276 |   static span<ElementType<I>, Extent> get(StorageType* array) {
      |                                       ^~~
./tensorstore/internal/multi_vector.h: In instantiation of 'static tensorstore::span<tensorstore::internal::MultiVectorAccess<tensorstore::internal::MultiVectorStorageImpl<Extent, InlineSize, Ts> >::ElementType<I>, Extent> tensorstore::internal::MultiVectorAccess<tensorstore::internal::MultiVectorStorageImpl<Extent, InlineSize, Ts> >::get(StorageType*) [with long unsigned int I = 0; long int Extent = -1; long int InlineSize = 0; Ts = {long int, long int}]':
./tensorstore/internal/multi_vector.h:276:39: error: use of built-in trait '__type_pack_element<I, long int, long int>' in function signature; use library traits instead
In file included from ./tensorstore/box.h:34:
./tensorstore/internal/multi_vector_view.h: In instantiation of 'static tensorstore::span<tensorstore::internal::MultiVectorAccess<tensorstore::internal::MultiVectorViewStorage<Extent, Ts> >::ElementType<I>, Extent> tensorstore::internal::MultiVectorAccess<tensorstore::internal::MultiVectorViewStorage<Extent, Ts> >::get(const StorageType*) [with long unsigned int I = 1; long int Extent = -1; Ts = {long int, long int}]':
./tensorstore/internal/multi_vector_view.h:172:39: error: use of built-in trait '__type_pack_element<I, long int, long int>' in function signature; use library traits instead
  172 |   static span<ElementType<I>, Extent> get(const StorageType* array) noexcept {
      |                                       ^~~
./tensorstore/internal/multi_vector_view.h: In instantiation of 'static tensorstore::span<tensorstore::internal::MultiVectorAccess<tensorstore::internal::MultiVectorViewStorage<Extent, Ts> >::ElementType<I>, Extent> tensorstore::internal::MultiVectorAccess<tensorstore::internal::MultiVectorViewStorage<Extent, Ts> >::get(const StorageType*) [with long unsigned int I = 0; long int Extent = -1; Ts = {long int, long int}]':
./tensorstore/internal/multi_vector_view.h:172:39: error: use of built-in trait '__type_pack_element<I, long int, long int>' in function signature; use library traits instead
./tensorstore/internal/multi_vector_view.h: In instantiation of 'static tensorstore::span<tensorstore::internal::MultiVectorAccess<tensorstore::internal::MultiVectorViewStorage<Extent, Ts> >::ElementType<I>, Extent> tensorstore::internal::MultiVectorAccess<tensorstore::internal::MultiVectorViewStorage<Extent, Ts> >::get(const StorageType*) [with long unsigned int I = 1; long int Extent = -1; Ts = {const long int, const long int}]':
./tensorstore/internal/multi_vector_view.h:172:39: error: use of built-in trait '__type_pack_element<I, const long int, const long int>' in function signature; use library traits instead
./tensorstore/internal/multi_vector_view.h: In instantiation of 'static tensorstore::span<tensorstore::internal::MultiVectorAccess<tensorstore::internal::MultiVectorViewStorage<Extent, Ts> >::ElementType<I>, Extent> tensorstore::internal::MultiVectorAccess<tensorstore::internal::MultiVectorViewStorage<Extent, Ts> >::get(const StorageType*) [with long unsigned int I = 0; long int Extent = -1; Ts = {const long int, const long int}]':
./tensorstore/internal/multi_vector_view.h:172:39: error: use of built-in trait '__type_pack_element<I, const long int, const long int>' in function signature; use library traits instead
cc1plus: note: unrecognized command-line option '-Wno-unknown-warning-option' may have been intended to silence earlier diagnostics
[2,642 / 3,248] Compiling python/tensorstore/stack.cc; 3s linux-sandbox ... (19 actions running)
Target //python/tensorstore:_tensorstore failed to build
INFO: Elapsed time: 7.453s, Critical Path: 3.75s
INFO: 21 processes: 21 internal.
FAILED: Build did NOT complete successfully

carsme commented on 2024-02-07 08:34 (UTC)

Here's a patch:

diff --git a/PKGBUILD b/PKGBUILD
index e9e27c4..a784501 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -48,7 +48,8 @@ build() {

     export TENSORSTORE_SYSTEM_LIBS=com_google_brotli,org_sourceware_bzip2,c-ares,org_blosc_cblosc,net_zlib,se_curl,org_aomedia_avif,jpeg,png,libwebp,org_lz4,nasm,org_nghttp2,com_github_pybind_pybind11,com_google_snappy,libtiff,org_tukaani_xz,net_zstd
     export TENSORSTORE_SYSTEM_PYTHON_LIBS=numpy
-    python bazelisk.py build -c opt //python/tensorstore:_tensorstore \
+    local ccache_dir=$(ccache --get-config cache_dir)
+    python bazelisk.py build --sandbox_writable_path="$ccache_dir" -c opt //python/tensorstore:_tensorstore \
         --copt=-fvisibility=hidden \
         --verbose_failures

This takes into account that the ccache directory not necessarily is located at $HOME/.ccache.

carsme commented on 2024-02-07 07:22 (UTC)

Can you please apply one of the suggested fixes the ccache issues? Feel free to add me as co-maintainer if you'd like me to do it. Much appreciated, thanks!

wheelsofindustry commented on 2024-02-04 09:33 (UTC) (edited on 2024-02-04 09:46 (UTC) by wheelsofindustry)

error was "Failed to create temporary file for /$HOME/.ccache/tmp/*: Read-only file system" in PKGBUILD I replaced

python bazelisk.py build -c opt //python/tensorstore:_tensorstore /
--copt=-fvisibility=hidden /
--verbose_failures

with

python bazelisk.py build --sandbox_writable_path=$HOME/.ccache -c opt //python/tensorstore:_tensorstore /
--copt=-fvisibility=hidden /
--verbose_failures

OR whatever ccache dir

appears to compile normally.

carsme commented on 2024-01-10 15:55 (UTC)

I'm unsure why the build fails with ccache enabled, might be related to bazel, but I don't know.

If the issue is unrelated to my environment, and the package is truly incompatible with ccache, it would be appropriate to disable ccache for this package specifically, by putting options=(!ccache) in the PKGBUILD.

You can try building with ccache enabled by removing the ! in front of ccache in your /etc/makepkg.conf:

BUILDENV=(!distcc color ccache check !sign)

daskol commented on 2024-01-10 15:24 (UTC) (edited on 2024-01-10 15:25 (UTC) by daskol)

@carsme I didn't quite get it, what is the issue with ccache?