secretflow / spu

SPU (Secure Processing Unit) aims to be a provable, measurable secure computation device, which provides computation ability while keeping your private data protected.
https://www.secretflow.org.cn/docs/spu/en/
Apache License 2.0
239 stars 103 forks source link

[Bug]: 从源码中编译spu的时候出现大量未知错误 #839

Closed grueyg closed 2 months ago

grueyg commented 2 months ago

Issue Type

Build/Install

Modules Involved

Others

Have you reproduced the bug with SPU HEAD?

Yes

Have you searched existing issues?

Yes

SPU Version

6564c08

OS Platform and Distribution

Linux Ubuntu 18.04

Python Version

3.10

Compiler Version

GCC 11.4

Current Behavior?

从源码中编译spu的时候,出现大量错误。

我的gcc和g++的安装方式是

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update && sudo apt install gcc-11 g++-11
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 110
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 110
sudo update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-11 110
sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-11 110
sudo update-alternatives --install /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-11 110
sudo update-alternatives --install /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-11 110

Standalone code to reproduce the issue

python setup.py bdist_wheel

Relevant log output

(sf) userA@ubuntu:~/project/sf/spu$ python setup.py bdist_wheel
INFO: Starting clean (this may take a while). Consider using --async if the clean takes more than several minutes.
/home/userA/miniconda3/envs/sf/lib/python3.10/site-packages/setuptools/__init__.py:85: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  dist.fetch_build_eggs(dist.setup_requires)
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-310
creating build/lib.linux-x86_64-cpython-310/spu
copying spu/spu_pb2.py -> build/lib.linux-x86_64-cpython-310/spu
copying spu/api.py -> build/lib.linux-x86_64-cpython-310/spu
copying spu/version.py -> build/lib.linux-x86_64-cpython-310/spu
copying spu/psi.py -> build/lib.linux-x86_64-cpython-310/spu
copying spu/__init__.py -> build/lib.linux-x86_64-cpython-310/spu
creating build/lib.linux-x86_64-cpython-310/spu/utils
copying spu/utils/distributed_impl.py -> build/lib.linux-x86_64-cpython-310/spu/utils
copying spu/utils/frontend.py -> build/lib.linux-x86_64-cpython-310/spu/utils
copying spu/utils/distributed.py -> build/lib.linux-x86_64-cpython-310/spu/utils
copying spu/utils/__init__.py -> build/lib.linux-x86_64-cpython-310/spu/utils
copying spu/utils/simulation.py -> build/lib.linux-x86_64-cpython-310/spu/utils
copying spu/utils/polyfill.py -> build/lib.linux-x86_64-cpython-310/spu/utils
creating build/lib.linux-x86_64-cpython-310/spu/intrinsic
copying spu/intrinsic/example_binary_impl.py -> build/lib.linux-x86_64-cpython-310/spu/intrinsic
copying spu/intrinsic/example_impl.py -> build/lib.linux-x86_64-cpython-310/spu/intrinsic
copying spu/intrinsic/__init__.py -> build/lib.linux-x86_64-cpython-310/spu/intrinsic
copying spu/intrinsic/add_new_intrinsic.py -> build/lib.linux-x86_64-cpython-310/spu/intrinsic
creating build/lib.linux-x86_64-cpython-310/spu/ops
copying spu/ops/__init__.py -> build/lib.linux-x86_64-cpython-310/spu/ops
creating build/lib.linux-x86_64-cpython-310/spu/experimental
copying spu/experimental/drop_cached_var_impl.py -> build/lib.linux-x86_64-cpython-310/spu/experimental
copying spu/experimental/make_cached_var_impl.py -> build/lib.linux-x86_64-cpython-310/spu/experimental
copying spu/experimental/__init__.py -> build/lib.linux-x86_64-cpython-310/spu/experimental
creating build/lib.linux-x86_64-cpython-310/spu/ops/groupby
copying spu/ops/groupby/groupby_via_shuffle.py -> build/lib.linux-x86_64-cpython-310/spu/ops/groupby
copying spu/ops/groupby/groupby_test.py -> build/lib.linux-x86_64-cpython-310/spu/ops/groupby
copying spu/ops/groupby/utils.py -> build/lib.linux-x86_64-cpython-310/spu/ops/groupby
copying spu/ops/groupby/shuffle.py -> build/lib.linux-x86_64-cpython-310/spu/ops/groupby
copying spu/ops/groupby/__init__.py -> build/lib.linux-x86_64-cpython-310/spu/ops/groupby
copying spu/ops/groupby/postprocess.py -> build/lib.linux-x86_64-cpython-310/spu/ops/groupby
copying spu/ops/groupby/segmentation.py -> build/lib.linux-x86_64-cpython-310/spu/ops/groupby
copying spu/ops/groupby/aggregation.py -> build/lib.linux-x86_64-cpython-310/spu/ops/groupby
running build_ext
Build with extra flags = ['--verbose_failures', '-c', 'opt', '--config=avx']
DEBUG: /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/xla/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'llvm-raw' because it already exists.
DEBUG: /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'com_google_absl' because it already exists.
DEBUG: /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'pybind11_bazel' because it already exists.
DEBUG: /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'com_google_protobuf' because it already exists.
DEBUG: /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'com_google_googletest' because it already exists.
DEBUG: /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'com_github_gflags_gflags' because it already exists.
DEBUG: /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'com_github_grpc_grpc' because it already exists.
DEBUG: /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'zlib' because it already exists.
DEBUG: /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'nvtx_archive' because it already exists.
DEBUG: /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'pybind11' because it already exists.
DEBUG: /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'upb' because it already exists.
DEBUG: /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/xla/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'jsoncpp_git' because it already exists.
WARNING: /home/userA/project/sf/spu/libspu/compiler/front_end/BUILD.bazel:17:15: in cc_library rule //libspu/compiler/front_end:hlo_importer: Target '//libspu/compiler/front_end:hlo_importer' violates visibility of target '@xla//xla/service/gpu/transforms:dot_dimension_sorter'. Continuing because --nocheck_visibility is active
INFO: Analyzed 3 targets (340 packages loaded, 35509 targets configured).
INFO: Found 3 targets...
INFO: From Compiling simplest_ot_x86_asm/gfe4x.c:
external/simplest_ot/simplest_ot_x86_asm/gfe4x.c:167:49: warning: argument 2 of type 'const unsigned char[128]' with mismatched bound [-Warray-parameter=]
  167 | void gfe4x_unpack(gfe4x *r, const unsigned char x[128]) {
      |                             ~~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from external/simplest_ot/simplest_ot_x86_asm/gfe4x.c:1:
external/simplest_ot/simplest_ot_x86_asm/gfe4x.h:14:28: note: previously declared as 'const unsigned char *'
   14 | void gfe4x_unpack(gfe4x *, const unsigned char *);
      |                            ^~~~~~~~~~~~~~~~~~~~~
INFO: From Compiling src/google/protobuf/message_lite.cc:
In file included from /usr/include/string.h:494,
                 from external/com_google_protobuf/src/google/protobuf/stubs/port.h:39,
                 from external/com_google_protobuf/src/google/protobuf/stubs/common.h:48,
                 from external/com_google_protobuf/src/google/protobuf/message_lite.h:46,
                 from external/com_google_protobuf/src/google/protobuf/message_lite.cc:36:
In function 'void* memcpy(void*, const void*, size_t)',
    inlined from 'uint8_t* google::protobuf::io::EpsCopyOutputStream::WriteRaw(const void*, int, uint8_t*)' at external/com_google_protobuf/src/google/protobuf/io/coded_stream.h:684:16,
    inlined from 'virtual uint8_t* google::protobuf::internal::ImplicitWeakMessage::_InternalSerialize(uint8_t*, google::protobuf::io::EpsCopyOutputStream*) const' at external/com_google_protobuf/src/google/protobuf/implicit_weak_message.h:103:28,
    inlined from 'bool google::protobuf::MessageLite::SerializePartialToZeroCopyStream(google::protobuf::io::ZeroCopyOutputStream*) const' at external/com_google_protobuf/src/google/protobuf/message_lite.cc:411:30:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
   34 |   return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
INFO: From Compiling tsl/profiler/backends/cpu/annotation_stack.cc:
external/tsl/tsl/profiler/backends/cpu/annotation_stack.cc: In static member function 'static void tsl::profiler::AnnotationStack::Enable(bool)':
external/tsl/tsl/profiler/backends/cpu/annotation_stack.cc:73:56: warning: suggest parentheses around '+' in operand of '&' [-Wparentheses]
   73 |       generation, enable ? generation | 1 : generation + 1 & ~1,
      |                                             ~~~~~~~~~~~^~~
INFO: From Compiling src/google/protobuf/message_lite.cc [for tool]:
In file included from /usr/include/string.h:494,
                 from external/com_google_protobuf/src/google/protobuf/stubs/port.h:39,
                 from external/com_google_protobuf/src/google/protobuf/stubs/common.h:48,
                 from external/com_google_protobuf/src/google/protobuf/message_lite.h:46,
                 from external/com_google_protobuf/src/google/protobuf/message_lite.cc:36:
In function 'void* memcpy(void*, const void*, size_t)',
    inlined from 'uint8_t* google::protobuf::io::EpsCopyOutputStream::WriteRaw(const void*, int, uint8_t*)' at external/com_google_protobuf/src/google/protobuf/io/coded_stream.h:684:16,
    inlined from 'virtual uint8_t* google::protobuf::internal::ImplicitWeakMessage::_InternalSerialize(uint8_t*, google::protobuf::io::EpsCopyOutputStream*) const' at external/com_google_protobuf/src/google/protobuf/implicit_weak_message.h:103:28,
    inlined from 'bool google::protobuf::MessageLite::SerializePartialToZeroCopyStream(google::protobuf::io::ZeroCopyOutputStream*) const' at external/com_google_protobuf/src/google/protobuf/message_lite.cc:411:30:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
   34 |   return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
INFO: From Compiling xla/tsl/framework/contraction/eigen_contraction_kernel.cc:
external/xla/xla/tsl/framework/contraction/eigen_contraction_kernel.cc:31:1: warning: multi-line comment [-Wcomment]
   31 | //   bazel test \
      | ^
external/xla/xla/tsl/framework/contraction/eigen_contraction_kernel.cc:44:1: warning: multi-line comment [-Wcomment]
   44 | //   bazel test \
      | ^
In file included from external/xla/xla/tsl/framework/fixedpoint/FixedPoint.h:39,
                 from external/xla/xla/tsl/framework/contraction/eigen_contraction_kernel.h:37,
                 from external/xla/xla/tsl/framework/contraction/eigen_contraction_kernel.cc:16:
external/xla/xla/tsl/framework/fixedpoint/PacketMathAVX.h:29:41: warning: ignoring attributes on template argument '__m256i' [-Wignored-attributes]
   29 | typedef eigen_packet_wrapper<__m256i, 10> Packet32q8i;
      |                                         ^
external/xla/xla/tsl/framework/fixedpoint/PacketMathAVX.h:30:41: warning: ignoring attributes on template argument '__m128i' [-Wignored-attributes]
   30 | typedef eigen_packet_wrapper<__m128i, 11> Packet16q8i;
      |                                         ^
ERROR: /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/com_github_zeromq_libzmq/BUILD.bazel:24:19: Foreign Cc - CMake: Building ZeroMQ failed: (Exit 1): bash failed: error executing command (from target @com_github_zeromq_libzmq//:ZeroMQ)
  (cd /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/sandbox/linux-sandbox/87/execroot/spulib && \
  exec env - \
    BAZEL_LINKLIBS=-l%:libstdc++.a:-l%:libgcc.a \
    BAZEL_LINKOPTS=-static-libstdc++:-static-libgcc \
    PATH=/home/userA/.cache/bazelisk/downloads/bazelbuild/bazel-6.5.0-linux-x86_64/bin:/opt/cmake/bin:/home/userA/miniconda3/envs/sf/bin:/home/userA/miniconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin \
  /bin/bash -c bazel-out/k8-opt/bin/external/com_github_zeromq_libzmq/ZeroMQ_foreign_cc/wrapper_build_script.sh)
# Configuration: b31970f7587b61226d79424fd913eb94a75d0bc8399da15b61f8ffd8970f060f
# Execution platform: @local_execution_config_platform//:platform

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
rules_foreign_cc: Build failed!
rules_foreign_cc: Keeping temp build directory and dependencies directory for debug.
rules_foreign_cc: Please note that the directories inside a sandbox are still cleaned unless you specify --sandbox_debug Bazel command line flag.
rules_foreign_cc: Printing build logs:
_____ BEGIN BUILD LOGS _____

Bazel external C/C++ Rules. Building library ZeroMQ

Environment:______________
BAZEL_LINKLIBS=-l%:libstdc++.a:-l%:libgcc.a
EXT_BUILD_ROOT=/home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/sandbox/linux-sandbox/87/execroot/spulib
INSTALLDIR=/home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/sandbox/linux-sandbox/87/execroot/spulib/bazel-out/k8-opt/bin/external/com_github_zeromq_libzmq/ZeroMQ
BAZEL_LINKOPTS=-static-libstdc++:-static-libgcc
PWD=/home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/sandbox/linux-sandbox/87/execroot/spulib
BUILD_TMPDIR=/home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/sandbox/linux-sandbox/87/execroot/spulib/bazel-out/k8-opt/bin/external/com_github_zeromq_libzmq/ZeroMQ.build_tmpdir
TMPDIR=/tmp
EXT_BUILD_DEPS=/home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/sandbox/linux-sandbox/87/execroot/spulib/bazel-out/k8-opt/bin/external/com_github_zeromq_libzmq/ZeroMQ.ext_build_deps
SHLVL=3
BUILD_LOG=bazel-out/k8-opt/bin/external/com_github_zeromq_libzmq/ZeroMQ_foreign_cc/CMake.log
BUILD_SCRIPT=bazel-out/k8-opt/bin/external/com_github_zeromq_libzmq/ZeroMQ_foreign_cc/build_script.sh
BUILD_WRAPPER_SCRIPT=bazel-out/k8-opt/bin/external/com_github_zeromq_libzmq/ZeroMQ_foreign_cc/wrapper_build_script.sh
PATH=/home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/sandbox/linux-sandbox/87/execroot/spulib:/home/userA/.cache/bazelisk/downloads/bazelbuild/bazel-6.5.0-linux-x86_64/bin:/opt/cmake/bin:/home/userA/miniconda3/envs/sf/bin:/home/userA/miniconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
_=/usr/bin/env
__________________________
Can not copy /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/sandbox/linux-sandbox/87/execroot/spulib/cmake
Can not copy /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/sandbox/linux-sandbox/87/execroot/spulib/ninja
+ cmake -DZMQ_BUILD_TESTS=OFF -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_TOOLCHAIN_FILE=/home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/sandbox/linux-sandbox/87/execroot/spulib/bazel-out/k8-opt/bin/external/com_github_zeromq_libzmq/ZeroMQ.build_tmpdir/crosstool_bazel.cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/sandbox/linux-sandbox/87/execroot/spulib/bazel-out/k8-opt/bin/external/com_github_zeromq_libzmq/ZeroMQ -DCMAKE_PREFIX_PATH=/home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/sandbox/linux-sandbox/87/execroot/spulib/bazel-out/k8-opt/bin/external/com_github_zeromq_libzmq/ZeroMQ.ext_build_deps -DCMAKE_RANLIB= -GNinja -G Ninja /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/sandbox/linux-sandbox/87/execroot/spulib/external/com_github_zeromq_libzmq
CMake Warning (dev) at CMakeLists.txt:2 (project):
  cmake_minimum_required() should be called prior to this top-level project()
  call.  Please see the cmake-commands(7) manual for usage documentation of
  both commands.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/gcc - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Detected ZMQ Version - 4.3.5
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Performing Test COMPILER_SUPPORTS_C11
-- Performing Test COMPILER_SUPPORTS_C11 - Success
-- Performing Test CXX_HAS_TAUT_WARNING
-- Performing Test CXX_HAS_TAUT_WARNING - Success
-- Performing Test CC_HAS_TAUT_WARNING
-- Performing Test CC_HAS_TAUT_WARNING - Success
-- Not building draft classes and methods
-- Using builtin sha1
-- Checking for module 'libbsd'
--   No package 'libbsd' found
-- Looking for strlcpy
-- Looking for strlcpy - not found
-- CURVE security is disabled
-- Looking for kqueue
-- Looking for kqueue - not found
-- Looking for epoll_create
-- Looking for epoll_create - found
-- Looking for epoll_create1
-- Looking for epoll_create1 - found
-- Using polling method in I/O threads: epoll
-- Using polling method in zmq_poll(er)_* API: poll
-- Looking for pselect
-- Looking for pselect - found
-- Using 64 bytes alignment for lock-free data structures
-- Looking for posix_memalign
-- Looking for posix_memalign - found
-- Looking for include file windows.h
-- Looking for include file windows.h - not found
-- Looking for include file condition_variable
-- Looking for include file condition_variable - found
-- Using condition_variable_t implementation: stl11
-- Looking for include file ifaddrs.h
-- Looking for include file ifaddrs.h - found
-- Looking for include file sys/uio.h
-- Looking for include file sys/uio.h - found
-- Looking for include file sys/eventfd.h
-- Looking for include file sys/eventfd.h - found
-- Checking whether EFD_CLOEXEC is supported
-- Performing Test ZMQ_HAVE_EVENTFD_CLOEXEC
-- Performing Test ZMQ_HAVE_EVENTFD_CLOEXEC - Success
-- Looking for if_nametoindex
-- Looking for if_nametoindex - found
-- Looking for SO_PEERCRED
-- Looking for SO_PEERCRED - found
-- Looking for LOCAL_PEERCRED
-- Looking for LOCAL_PEERCRED - not found
-- Looking for SO_BUSY_POLL
-- Looking for SO_BUSY_POLL - found
-- Looking for clock_gettime
-- Looking for clock_gettime - found
-- Looking for fork
-- Looking for fork - found
-- Looking for gethrtime
-- Looking for gethrtime - not found
-- Looking for mkdtemp
-- Looking for mkdtemp - found
-- Looking for accept4
-- Looking for accept4 - found
-- Looking for strnlen
-- Looking for strnlen - found
-- Performing Test HAVE_FLAG_-Wall
-- Performing Test HAVE_FLAG_-Wall - Failed
-- Performing Test HAVE_FLAG_-Wextra
-- Performing Test HAVE_FLAG_-Wextra - Failed
-- Performing Test HAVE_FLAG_-Wno-long-long
-- Performing Test HAVE_FLAG_-Wno-long-long - Failed
-- Performing Test HAVE_FLAG_-Wno-uninitialized
-- Performing Test HAVE_FLAG_-Wno-uninitialized - Failed
-- Performing Test HAVE_FLAG_-pedantic
-- Performing Test HAVE_FLAG_-pedantic - Failed
-- Checking whether noexcept is supported
-- Performing Test ZMQ_HAVE_NOEXCEPT
-- Performing Test ZMQ_HAVE_NOEXCEPT - Success
-- Checking pthread_setname signature
-- Performing Test ZMQ_HAVE_PTHREAD_SETNAME_1
-- Performing Test ZMQ_HAVE_PTHREAD_SETNAME_1 - Failed
-- Performing Test ZMQ_HAVE_PTHREAD_SETNAME_2
-- Performing Test ZMQ_HAVE_PTHREAD_SETNAME_2 - Success
-- Performing Test ZMQ_HAVE_PTHREAD_SETNAME_3
-- Performing Test ZMQ_HAVE_PTHREAD_SETNAME_3 - Failed
-- Performing Test ZMQ_HAVE_PTHREAD_SET_NAME
-- Performing Test ZMQ_HAVE_PTHREAD_SET_NAME - Failed
-- Checking pthread_setaffinity signature
-- Performing Test ZMQ_HAVE_PTHREAD_SET_AFFINITY
-- Performing Test ZMQ_HAVE_PTHREAD_SET_AFFINITY - Failed
-- Checking whether SOCK_CLOEXEC is supported
-- Performing Test ZMQ_HAVE_SOCK_CLOEXEC
-- Performing Test ZMQ_HAVE_SOCK_CLOEXEC - Success
-- Checking whether O_CLOEXEC is supported
-- Performing Test ZMQ_HAVE_O_CLOEXEC
-- Performing Test ZMQ_HAVE_O_CLOEXEC - Failed
-- Checking whether SO_BINDTODEVICE is supported
-- Performing Test ZMQ_HAVE_SO_BINDTODEVICE
-- Performing Test ZMQ_HAVE_SO_BINDTODEVICE - Success
-- Checking whether SO_KEEPALIVE is supported
-- Performing Test ZMQ_HAVE_SO_KEEPALIVE
-- Performing Test ZMQ_HAVE_SO_KEEPALIVE - Success
-- Checking whether SO_PRIORITY is supported
-- Performing Test ZMQ_HAVE_SO_PRIORITY
-- Performing Test ZMQ_HAVE_SO_PRIORITY - Success
-- Checking whether TCP_KEEPCNT is supported
-- Performing Test ZMQ_HAVE_TCP_KEEPCNT
-- Performing Test ZMQ_HAVE_TCP_KEEPCNT - Success
-- Checking whether TCP_KEEPIDLE is supported
-- Performing Test ZMQ_HAVE_TCP_KEEPIDLE
-- Performing Test ZMQ_HAVE_TCP_KEEPIDLE - Success
-- Checking whether TCP_KEEPINTVL is supported
-- Performing Test ZMQ_HAVE_TCP_KEEPINTVL
-- Performing Test ZMQ_HAVE_TCP_KEEPINTVL - Success
-- Checking whether TCP_KEEPALIVE is supported
-- Performing Test ZMQ_HAVE_TCP_KEEPALIVE
-- Performing Test ZMQ_HAVE_TCP_KEEPALIVE - Failed
-- Checking whether TIPC is supported
-- Performing Test ZMQ_HAVE_TIPC
-- Performing Test ZMQ_HAVE_TIPC - Success
-- Checking whether getrandom is supported
-- Performing Test ZMQ_HAVE_GETRANDOM
-- Performing Test ZMQ_HAVE_GETRANDOM - Success
-- Could NOT find AsciiDoc (missing: ASCIIDOC_EXECUTABLE)
-- Configuring done (18.0s)
-- Generating done (0.1s)
-- Build files have been written to: /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/sandbox/linux-sandbox/87/execroot/spulib/bazel-out/k8-opt/bin/external/com_github_zeromq_libzmq/ZeroMQ.build_tmpdir
+ cmake --build . --config Release
[1/124] Building C object CMakeFiles/objects.dir/external/sha1/sha1.c.o
[2/124] Building CXX object CMakeFiles/objects.dir/src/precompiled.cpp.o
[3/124] Building CXX object CMakeFiles/objects.dir/src/clock.cpp.o
[4/124] Building CXX object CMakeFiles/objects.dir/src/curve_client.cpp.o
[5/124] Building CXX object CMakeFiles/objects.dir/src/curve_server.cpp.o
[6/124] Building CXX object CMakeFiles/objects.dir/src/err.cpp.o
[7/124] Building CXX object CMakeFiles/objects.dir/src/norm_engine.cpp.o
[8/124] Building CXX object CMakeFiles/objects.dir/src/pgm_sender.cpp.o
[9/124] Building CXX object CMakeFiles/objects.dir/src/endpoint.cpp.o
[10/124] Building CXX object CMakeFiles/objects.dir/src/pgm_receiver.cpp.o
[11/124] Building CXX object CMakeFiles/objects.dir/src/pgm_socket.cpp.o
[12/124] Building CXX object CMakeFiles/objects.dir/src/random.cpp.o
[13/124] Building CXX object CMakeFiles/objects.dir/src/ipc_address.cpp.o
[14/124] Building CXX object CMakeFiles/objects.dir/src/ip.cpp.o
[15/124] Building CXX object CMakeFiles/objects.dir/src/mailbox.cpp.o
[16/124] Building CXX object CMakeFiles/objects.dir/src/polling_util.cpp.o
[17/124] Building CXX object CMakeFiles/objects.dir/src/dgram.cpp.o
[18/124] Building CXX object CMakeFiles/objects.dir/src/devpoll.cpp.o
[19/124] Building CXX object CMakeFiles/objects.dir/src/metadata.cpp.o
[20/124] Building CXX object CMakeFiles/objects.dir/src/io_object.cpp.o
[21/124] Building CXX object CMakeFiles/objects.dir/src/kqueue.cpp.o
[22/124] Building CXX object CMakeFiles/objects.dir/src/client.cpp.o
[23/124] Building CXX object CMakeFiles/objects.dir/src/raw_decoder.cpp.o
[24/124] Building CXX object CMakeFiles/objects.dir/src/channel.cpp.o
[25/124] Building CXX object CMakeFiles/objects.dir/src/fq.cpp.o
[26/124] Building CXX object CMakeFiles/objects.dir/src/msg.cpp.o
[27/124] Building CXX object CMakeFiles/objects.dir/src/poll.cpp.o
[28/124] Building CXX object CMakeFiles/objects.dir/src/gather.cpp.o
[29/124] Building CXX object CMakeFiles/objects.dir/src/io_thread.cpp.o
[30/124] Building CXX object CMakeFiles/objects.dir/src/curve_mechanism_base.cpp.o
[31/124] Building CXX object CMakeFiles/objects.dir/src/null_mechanism.cpp.o
[32/124] Building CXX object CMakeFiles/objects.dir/src/dist.cpp.o
[33/124] Building CXX object CMakeFiles/objects.dir/src/address.cpp.o
[34/124] Building CXX object CMakeFiles/objects.dir/src/epoll.cpp.o
[35/124] Building CXX object CMakeFiles/objects.dir/src/ipc_connecter.cpp.o
[36/124] Building CXX object CMakeFiles/objects.dir/src/dealer.cpp.o
[37/124] Building CXX object CMakeFiles/objects.dir/src/raw_encoder.cpp.o
[38/124] Building CXX object CMakeFiles/objects.dir/src/mtrie.cpp.o
[39/124] Building CXX object CMakeFiles/objects.dir/src/lb.cpp.o
[40/124] Building CXX object CMakeFiles/objects.dir/src/poller_base.cpp.o
[41/124] Building CXX object CMakeFiles/objects.dir/src/pair.cpp.o
[42/124] Building CXX object CMakeFiles/objects.dir/src/mechanism_base.cpp.o
[43/124] Building CXX object CMakeFiles/objects.dir/src/plain_client.cpp.o
[44/124] Building CXX object CMakeFiles/objects.dir/src/pollset.cpp.o
[45/124] Building CXX object CMakeFiles/objects.dir/src/peer.cpp.o
[46/124] Building CXX object CMakeFiles/objects.dir/src/reaper.cpp.o
[47/124] Building CXX object CMakeFiles/objects.dir/src/thread.cpp.o
[48/124] Building CXX object CMakeFiles/objects.dir/src/ipc_listener.cpp.o
[49/124] Building CXX object CMakeFiles/objects.dir/src/mailbox_safe.cpp.o
[50/124] Building CXX object CMakeFiles/objects.dir/src/push.cpp.o
[51/124] Building CXX object CMakeFiles/objects.dir/src/pull.cpp.o
[52/124] Building CXX object CMakeFiles/objects.dir/src/proxy.cpp.o
[53/124] Building CXX object CMakeFiles/objects.dir/src/req.cpp.o
[54/124] Building CXX object CMakeFiles/objects.dir/src/pub.cpp.o
[55/124] Building CXX object CMakeFiles/objects.dir/src/rep.cpp.o
[56/124] Building CXX object CMakeFiles/objects.dir/src/raw_engine.cpp.o
[57/124] Building CXX object CMakeFiles/objects.dir/src/object.cpp.o
[58/124] Building CXX object CMakeFiles/objects.dir/src/select.cpp.o
[59/124] Building CXX object CMakeFiles/objects.dir/src/plain_server.cpp.o
[60/124] Building CXX object CMakeFiles/objects.dir/src/options.cpp.o
[61/124] Building CXX object CMakeFiles/local_lat.dir/perf/local_lat.cpp.o
[62/124] Building CXX object CMakeFiles/objects.dir/src/tcp_address.cpp.o
[63/124] Building CXX object CMakeFiles/local_thr.dir/perf/local_thr.cpp.o
[64/124] Building CXX object CMakeFiles/objects.dir/src/trie.cpp.o
[65/124] Building CXX object CMakeFiles/objects.dir/src/radix_tree.cpp.o
[66/124] Building CXX object CMakeFiles/remote_lat.dir/perf/remote_lat.cpp.o
[67/124] Building CXX object CMakeFiles/objects.dir/src/pipe.cpp.o
[68/124] Building CXX object CMakeFiles/objects.dir/src/tcp.cpp.o
[69/124] Building CXX object CMakeFiles/remote_thr.dir/perf/remote_thr.cpp.o
[70/124] Building CXX object CMakeFiles/inproc_thr.dir/perf/inproc_thr.cpp.o
[71/124] Building CXX object CMakeFiles/objects.dir/src/socks.cpp.o
[72/124] Building CXX object CMakeFiles/objects.dir/src/router.cpp.o
[73/124] Building CXX object CMakeFiles/objects.dir/src/zmq_utils.cpp.o
[74/124] Building CXX object CMakeFiles/inproc_lat.dir/perf/inproc_lat.cpp.o
[75/124] Building CXX object CMakeFiles/objects.dir/src/signaler.cpp.o
[76/124] Building CXX object CMakeFiles/objects.dir/src/own.cpp.o
[77/124] Building CXX object CMakeFiles/objects.dir/src/v1_encoder.cpp.o
[78/124] Building CXX object CMakeFiles/objects.dir/src/mechanism.cpp.o
[79/124] Building CXX object CMakeFiles/objects.dir/src/udp_address.cpp.o
[80/124] Building CXX object CMakeFiles/objects.dir/src/v3_1_encoder.cpp.o
[81/124] Building CXX object CMakeFiles/objects.dir/src/decoder_allocators.cpp.o
[82/124] Building CXX object CMakeFiles/objects.dir/src/ip_resolver.cpp.o
[83/124] Building CXX object CMakeFiles/objects.dir/src/timers.cpp.o
[84/124] Building CXX object CMakeFiles/objects.dir/src/v2_encoder.cpp.o
[85/124] Building CXX object CMakeFiles/objects.dir/src/tcp_connecter.cpp.o
[86/124] Building CXX object CMakeFiles/objects.dir/src/v2_decoder.cpp.o
[87/124] Building CXX object CMakeFiles/objects.dir/src/sub.cpp.o
[88/124] Building CXX object CMakeFiles/proxy_thr.dir/perf/proxy_thr.cpp.o
[89/124] Building CXX object CMakeFiles/objects.dir/src/tcp_listener.cpp.o
[90/124] Building CXX object CMakeFiles/objects.dir/src/tipc_address.cpp.o
[91/124] Building CXX object CMakeFiles/objects.dir/src/v1_decoder.cpp.o
[92/124] Building CXX object CMakeFiles/objects.dir/src/stream.cpp.o
[93/124] Building CXX object CMakeFiles/objects.dir/src/socks_connecter.cpp.o
[94/124] Building CXX object CMakeFiles/objects.dir/src/server.cpp.o
[95/124] Building CXX object CMakeFiles/objects.dir/src/scatter.cpp.o
[96/124] Building CXX object CMakeFiles/objects.dir/src/radio.cpp.o
[97/124] Building CXX object CMakeFiles/objects.dir/src/zmq.cpp.o
[98/124] Building CXX object CMakeFiles/objects.dir/src/tipc_connecter.cpp.o
[99/124] Building CXX object CMakeFiles/objects.dir/src/xsub.cpp.o
[100/124] Building CXX object CMakeFiles/objects.dir/src/socket_poller.cpp.o
[101/124] Building CXX object CMakeFiles/objects.dir/src/zap_client.cpp.o
[102/124] Building CXX object CMakeFiles/objects.dir/src/dish.cpp.o
[103/124] Building CXX object CMakeFiles/objects.dir/src/stream_listener_base.cpp.o
[104/124] Building CXX object CMakeFiles/objects.dir/src/session_base.cpp.o
[105/124] Building CXX object CMakeFiles/benchmark_radix_tree.dir/perf/benchmark_radix_tree.cpp.o
[106/124] Building CXX object CMakeFiles/objects.dir/src/stream_connecter_base.cpp.o
[107/124] Building CXX object CMakeFiles/objects.dir/src/tipc_listener.cpp.o
[108/124] Building CXX object CMakeFiles/objects.dir/src/zmtp_engine.cpp.o
[109/124] Building CXX object CMakeFiles/objects.dir/src/udp_engine.cpp.o
[110/124] Building CXX object CMakeFiles/objects.dir/src/stream_engine_base.cpp.o
[111/124] Building CXX object CMakeFiles/objects.dir/src/xpub.cpp.o
[112/124] Building CXX object CMakeFiles/objects.dir/src/ctx.cpp.o
[113/124] Building CXX object CMakeFiles/objects.dir/src/socket_base.cpp.o
[114/124] Linking CXX static library lib/libzmq.a
[115/124] Linking CXX executable bin/benchmark_radix_tree
FAILED: bin/benchmark_radix_tree
: && /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++14 -fno-canonical-system-headers -Wno-builtin-macro-redefined -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -fdiagnostics-color=always -Wl,-z,noexecstack -fopenmp -fPIC -fstack-protector-strong -mavx -DCHECK_AVX -std=c++17 -Wno-tautological-constant-compare -O3 -DNDEBUG -fuse-ld=gold -Wl,-no-as-needed -Wl,-z,relro,-z,now -B/usr/bin -pass-exit-codes -static-libstdc++ -static-libgcc -Wl,--gc-sections -l:libstdc++.a -l:libgcc.a -fopenmp   -rdynamic CMakeFiles/benchmark_radix_tree.dir/perf/benchmark_radix_tree.cpp.o -o bin/benchmark_radix_tree  lib/libzmq.a  -lrt && :
CMakeFiles/benchmark_radix_tree.dir/perf/benchmark_radix_tree.cpp.o:benchmark_radix_tree.cpp:function std::vector<unsigned char*, std::allocator<unsigned char*> >::reserve(unsigned long): error: undefined reference to 'operator new(unsigned long)'
CMakeFiles/benchmark_radix_tree.dir/perf/benchmark_radix_tree.cpp.o:benchmark_radix_tree.cpp:function std::vector<unsigned char*, std::allocator<unsigned char*> >::reserve(unsigned long): error: undefined reference to 'operator delete(void*, unsigned long)'
CMakeFiles/benchmark_radix_tree.dir/perf/benchmark_radix_tree.cpp.o:benchmark_radix_tree.cpp:function std::vector<unsigned char*, std::allocator<unsigned char*> >::reserve(unsigned long): error: undefined reference to 'std::__throw_length_error(char const*)'
CMakeFiles/benchmark_radix_tree.dir/perf/benchmark_radix_tree.cpp.o:benchmark_radix_tree.cpp:function void std::vector<unsigned char*, std::allocator<unsigned char*> >::_M_realloc_insert<unsigned char*&>(__gnu_cxx::__normal_iterator<unsigned char**, std::vector<unsigned char*, std::allocator<unsigned char*> > >, unsigned char*&): error: undefined reference to 'operator delete(void*, unsigned long)'
CMakeFiles/benchmark_radix_tree.dir/perf/benchmark_radix_tree.cpp.o:benchmark_radix_tree.cpp:function void std::vector<unsigned char*, std::allocator<unsigned char*> >::_M_realloc_insert<unsigned char*&>(__gnu_cxx::__normal_iterator<unsigned char**, std::vector<unsigned char*, std::allocator<unsigned char*> > >, unsigned char*&): error: undefined reference to 'operator new(unsigned long)'
CMakeFiles/benchmark_radix_tree.dir/perf/benchmark_radix_tree.cpp.o:benchmark_radix_tree.cpp:function void std::vector<unsigned char*, std::allocator<unsigned char*> >::_M_realloc_insert<unsigned char*&>(__gnu_cxx::__normal_iterator<unsigned char**, std::vector<unsigned char*, std::allocator<unsigned char*> > >, unsigned char*&): error: undefined reference to 'std::__throw_length_error(char const*)'
CMakeFiles/benchmark_radix_tree.dir/perf/benchmark_radix_tree.cpp.o:benchmark_radix_tree.cpp:function void std::vector<unsigned char*, std::allocator<unsigned char*> >::_M_realloc_insert<unsigned char* const&>(__gnu_cxx::__normal_iterator<unsigned char**, std::vector<unsigned char*, std::allocator<unsigned char*> > >, unsigned char* const&): error: undefined reference to 'operator delete(void*, unsigned long)'
CMakeFiles/benchmark_radix_tree.dir/perf/benchmark_radix_tree.cpp.o:benchmark_radix_tree.cpp:function void std::vector<unsigned char*, std::allocator<unsigned char*> >::_M_realloc_insert<unsigned char* const&>(__gnu_cxx::__normal_iterator<unsigned char**, std::vector<unsigned char*, std::allocator<unsigned char*> > >, unsigned char* const&): error: undefined reference to 'operator new(unsigned long)'
CMakeFiles/benchmark_radix_tree.dir/perf/benchmark_radix_tree.cpp.o:benchmark_radix_tree.cpp:function void std::vector<unsigned char*, std::allocator<unsigned char*> >::_M_realloc_insert<unsigned char* const&>(__gnu_cxx::__normal_iterator<unsigned char**, std::vector<unsigned char*, std::allocator<unsigned char*> > >, unsigned char* const&): error: undefined reference to 'std::__throw_length_error(char const*)'
CMakeFiles/benchmark_radix_tree.dir/perf/benchmark_radix_tree.cpp.o:benchmark_radix_tree.cpp:function void std::vector<std::chrono::duration<long, std::ratio<1l, 1000000000l> >, std::allocator<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > >::_M_realloc_insert<std::chrono::duration<long, std::ratio<1l, 1000000000l> > >(__gnu_cxx::__normal_iterator<std::chrono::duration<long, std::ratio<1l, 1000000000l> >*, std::vector<std::chrono::duration<long, std::ratio<1l, 1000000000l> >, std::allocator<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > > >, std::chrono::duration<long, std::ratio<1l, 1000000000l> >&&): error: undefined reference to 'operator delete(void*, unsigned long)'
CMakeFiles/benchmark_radix_tree.dir/perf/benchmark_radix_tree.cpp.o:benchmark_radix_tree.cpp:function void std::vector<std::chrono::duration<long, std::ratio<1l, 1000000000l> >, std::allocator<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > >::_M_realloc_insert<std::chrono::duration<long, std::ratio<1l, 1000000000l> > >(__gnu_cxx::__normal_iterator<std::chrono::duration<long, std::ratio<1l, 1000000000l> >*, std::vector<std::chrono::duration<long, std::ratio<1l, 1000000000l> >, std::allocator<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > > >, std::chrono::duration<long, std::ratio<1l, 1000000000l> >&&): error: undefined reference to 'operator new(unsigned long)'
CMakeFiles/benchmark_radix_tree.dir/perf/benchmark_radix_tree.cpp.o:benchmark_radix_tree.cpp:function void std::vector<std::chrono::duration<long, std::ratio<1l, 1000000000l> >, std::allocator<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > >::_M_realloc_insert<std::chrono::duration<long, std::ratio<1l, 1000000000l> > >(__gnu_cxx::__normal_iterator<std::chrono::duration<long, std::ratio<1l, 1000000000l> >*, std::vector<std::chrono::duration<long, std::ratio<1l, 1000000000l> >, std::allocator<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > > >, std::chrono::duration<long, std::ratio<1l, 1000000000l> >&&): error: undefined reference to 'std::__throw_length_error(char const*)'
CMakeFiles/benchmark_radix_tree.dir/perf/benchmark_radix_tree.cpp.o:benchmark_radix_tree.cpp:function void benchmark_lookup<zmq::trie_t>(zmq::trie_t&, std::vector<unsigned char*, std::allocator<unsigned char*> >&): error: undefined reference to 'std::chrono::_V2::steady_clock::now()'
CMakeFiles/benchmark_radix_tree.dir/perf/benchmark_radix_tree.cpp.o:benchmark_radix_tree.cpp:function void benchmark_lookup<zmq::trie_t>(zmq::trie_t&, std::vector<unsigned char*, std::allocator<unsigned char*> >&): error: undefined reference to 'std::chrono::_V2::steady_clock::now()'
CMakeFiles/benchmark_radix_tree.dir/perf/benchmark_radix_tree.cpp.o:benchmark_radix_tree.cpp:function void benchmark_lookup<zmq::radix_tree_t>(zmq::radix_tree_t&, std::vector<unsigned char*, std::allocator<unsigned char*> >&): error: undefined reference to 'std::chrono::_V2::steady_clock::now()'
CMakeFiles/benchmark_radix_tree.dir/perf/benchmark_radix_tree.cpp.o:benchmark_radix_tree.cpp:function void benchmark_lookup<zmq::radix_tree_t>(zmq::radix_tree_t&, std::vector<unsigned char*, std::allocator<unsigned char*> >&): error: undefined reference to 'std::chrono::_V2::steady_clock::now()'
CMakeFiles/benchmark_radix_tree.dir/perf/benchmark_radix_tree.cpp.o:benchmark_radix_tree.cpp:function main: error: undefined reference to 'operator new[](unsigned long)'
CMakeFiles/benchmark_radix_tree.dir/perf/benchmark_radix_tree.cpp.o:benchmark_radix_tree.cpp:function main: error: undefined reference to 'operator delete[](void*)'
CMakeFiles/benchmark_radix_tree.dir/perf/benchmark_radix_tree.cpp.o:benchmark_radix_tree.cpp:DW.ref.__gxx_personality_v0: error: undefined reference to '__gxx_personality_v0'
lib/libzmq.a(trie.cpp.o):trie.cpp:function zmq::trie_t::add(unsigned char*, unsigned long) [clone .cold]: error: undefined reference to 'operator delete(void*, std::nothrow_t const&)'
lib/libzmq.a(trie.cpp.o):trie.cpp:function zmq::trie_t::add(unsigned char*, unsigned long) [clone .cold]: error: undefined reference to 'operator delete(void*, std::nothrow_t const&)'
lib/libzmq.a(trie.cpp.o):trie.cpp:function zmq::trie_t::add(unsigned char*, unsigned long) [clone .localalias]: error: undefined reference to 'std::nothrow'
lib/libzmq.a(trie.cpp.o):trie.cpp:function zmq::trie_t::add(unsigned char*, unsigned long) [clone .localalias]: error: undefined reference to 'operator new(unsigned long, std::nothrow_t const&)'
lib/libzmq.a(trie.cpp.o):trie.cpp:function zmq::trie_t::add(unsigned char*, unsigned long) [clone .localalias]: error: undefined reference to 'std::nothrow'
lib/libzmq.a(trie.cpp.o):trie.cpp:function zmq::trie_t::add(unsigned char*, unsigned long) [clone .localalias]: error: undefined reference to 'operator new(unsigned long, std::nothrow_t const&)'
collect2: error: ld returned 1 exit status
[116/124] Linking CXX shared library lib/libzmq.so.5.2.5
ninja: build stopped: subcommand failed.
_____ END BUILD LOGS _____
rules_foreign_cc: Build wrapper script location: bazel-out/k8-opt/bin/external/com_github_zeromq_libzmq/ZeroMQ_foreign_cc/wrapper_build_script.sh
rules_foreign_cc: Build script location: bazel-out/k8-opt/bin/external/com_github_zeromq_libzmq/ZeroMQ_foreign_cc/build_script.sh
rules_foreign_cc: Build log location: bazel-out/k8-opt/bin/external/com_github_zeromq_libzmq/ZeroMQ_foreign_cc/CMake.log

INFO: Elapsed time: 727.171s, Critical Path: 32.80s
INFO: 675 processes: 231 internal, 444 linux-sandbox.
FAILED: Build did NOT complete successfully
Traceback (most recent call last):
  File "/home/userA/project/sf/spu/setup.py", line 266, in <module>
    setuptools.setup(
  File "/home/userA/miniconda3/envs/sf/lib/python3.10/site-packages/setuptools/__init__.py", line 108, in setup
    return distutils.core.setup(**attrs)
  File "/home/userA/miniconda3/envs/sf/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 184, in setup
    return run_commands(dist)
  File "/home/userA/miniconda3/envs/sf/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
    dist.run_commands()
  File "/home/userA/miniconda3/envs/sf/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 970, in run_commands
    self.run_command(cmd)
  File "/home/userA/miniconda3/envs/sf/lib/python3.10/site-packages/setuptools/dist.py", line 945, in run_command
    super().run_command(command)
  File "/home/userA/miniconda3/envs/sf/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
    cmd_obj.run()
  File "/home/userA/miniconda3/envs/sf/lib/python3.10/site-packages/setuptools/command/bdist_wheel.py", line 373, in run
    self.run_command("build")
  File "/home/userA/miniconda3/envs/sf/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
    self.distribution.run_command(command)
  File "/home/userA/miniconda3/envs/sf/lib/python3.10/site-packages/setuptools/dist.py", line 945, in run_command
    super().run_command(command)
  File "/home/userA/miniconda3/envs/sf/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
    cmd_obj.run()
  File "/home/userA/miniconda3/envs/sf/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/home/userA/miniconda3/envs/sf/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
    self.distribution.run_command(command)
  File "/home/userA/miniconda3/envs/sf/lib/python3.10/site-packages/setuptools/dist.py", line 945, in run_command
    super().run_command(command)
  File "/home/userA/miniconda3/envs/sf/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
    cmd_obj.run()
  File "/home/userA/project/sf/spu/setup.py", line 237, in run
    return pip_run(self)
  File "/home/userA/project/sf/spu/setup.py", line 208, in pip_run
    build(True, True)
  File "/home/userA/project/sf/spu/setup.py", line 164, in build
    return bazel_invoke(
  File "/home/userA/project/sf/spu/setup.py", line 123, in bazel_invoke
    result = invoker(['bazel'] + cmdline, *args, **kwargs)
  File "/home/userA/miniconda3/envs/sf/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['bazel', 'build', '--verbose_failures', '-c', 'opt', '--config=avx', '--', '//spu:init', '//spu/utils:distributed', '//spu:api']' returned non-zero exit status 1.
anakinxc commented 2 months ago

hi @grueyg

please make sure you are using lld as linker.

grueyg commented 2 months ago

谢谢 @anakinxc

在安装了lld,以及在.bazerlrc文件中添加

build:linux --linkopt=-fuse-ld=lld

可以正确编译了

grueyg commented 2 months ago

@anakinxc,很抱歉,我的安装仍然存在问题。

我在一个新环境里以可编辑模式安装,执行pip install -e .后出现报错,主要原因似乎是ModuleNotFoundError: No module named 'numpy'

但是,我明明已经安装了numpy,并且在该环境下的其他代码里也可以正确import numpy,这是哪里出了问题?

我的安装方法如下

cd spu
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -e .

报错如下

(sf) userA@ubuntu:~/project/sf/spu$ pip install -e .
Obtaining file:///home/userA/project/sf/spu
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Installing backend dependencies ... done
  Preparing editable metadata (pyproject.toml) ... done
Building wheels for collected packages: spu
  Building editable for spu (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building editable for spu (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [196 lines of output]
      INFO: Starting clean (this may take a while). Consider using --async if the clean takes more than several minutes.
      running editable_wheel
      creating /tmp/pip-wheel-24l08imq/.tmp-5u5hkj06/spu.egg-info
      writing /tmp/pip-wheel-24l08imq/.tmp-5u5hkj06/spu.egg-info/PKG-INFO
      writing dependency_links to /tmp/pip-wheel-24l08imq/.tmp-5u5hkj06/spu.egg-info/dependency_links.txt
      writing requirements to /tmp/pip-wheel-24l08imq/.tmp-5u5hkj06/spu.egg-info/requires.txt
      writing top-level names to /tmp/pip-wheel-24l08imq/.tmp-5u5hkj06/spu.egg-info/top_level.txt
      writing manifest file '/tmp/pip-wheel-24l08imq/.tmp-5u5hkj06/spu.egg-info/SOURCES.txt'
      reading manifest file '/tmp/pip-wheel-24l08imq/.tmp-5u5hkj06/spu.egg-info/SOURCES.txt'
      adding license file 'LICENSE'
      writing manifest file '/tmp/pip-wheel-24l08imq/.tmp-5u5hkj06/spu.egg-info/SOURCES.txt'
      creating '/tmp/pip-wheel-24l08imq/.tmp-5u5hkj06/spu-0.9.3.dev20240829.dist-info'
      creating /tmp/pip-wheel-24l08imq/.tmp-5u5hkj06/spu-0.9.3.dev20240829.dist-info/WHEEL
      running build_py
      running build_ext
      Loading:
      DEBUG: /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/xla/third_party/repo.bzl:132:14:
      Warning: skipping import of repository 'llvm-raw' because it already exists.
      DEBUG: /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/third_party/repo.bzl:132:14:
      Warning: skipping import of repository 'com_google_absl' because it already exists.
      DEBUG: /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/third_party/repo.bzl:132:14:
      Warning: skipping import of repository 'pybind11_bazel' because it already exists.
      DEBUG: /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/third_party/repo.bzl:132:14:
      Warning: skipping import of repository 'com_google_protobuf' because it already exists.
      DEBUG: /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/third_party/repo.bzl:132:14:
      Warning: skipping import of repository 'com_google_googletest' because it already exists.
      DEBUG: /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/third_party/repo.bzl:132:14:
      Warning: skipping import of repository 'com_github_gflags_gflags' because it already exists.
      DEBUG: /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/third_party/repo.bzl:132:14:
      Warning: skipping import of repository 'com_github_grpc_grpc' because it already exists.
      DEBUG: /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/third_party/repo.bzl:132:14:
      Warning: skipping import of repository 'zlib' because it already exists.
      DEBUG: /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/third_party/repo.bzl:132:14:
      Warning: skipping import of repository 'nvtx_archive' because it already exists.
      DEBUG: /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/third_party/repo.bzl:132:14:
      Warning: skipping import of repository 'pybind11' because it already exists.
      DEBUG: /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/third_party/repo.bzl:132:14:
      Warning: skipping import of repository 'upb' because it already exists.
      DEBUG: /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/xla/third_party/repo.bzl:132:14:
      Warning: skipping import of repository 'jsoncpp_git' because it already exists.
      Loading:
      Loading: 1 packages loaded
      Analyzing: 3 targets (3 packages loaded, 0 targets configured)
      INFO: Repository local_execution_config_python instantiated at:
        /home/userA/project/sf/spu/WORKSPACE:72:15: in <toplevel>
        /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/xla/workspace2.bzl:123:19: in workspace
        /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/workspace2.bzl:617:19: in workspace
        /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/workspace2.bzl:67:27: in _tf_toolchains
        /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/tools/toolchains/remote_config/configs.bzl:6:28: in initialize_rbe_configs
        /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/tools/toolchains/remote_config/rbe_config.bzl:158:27: in _tensorflow_local_config
      Repository rule local_python_configure defined at:
        /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/third_party/py/python_configure.bzl:276:41: in <toplevel>
      ERROR: An error occurred during the fetch of repository 'local_execution_config_python':
         Traceback (most recent call last):
          File "/home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/third_party/py/python_configure.bzl", line 213, column 39, in _create_local_python_repository
                  numpy_include = _get_numpy_include(repository_ctx, python_bin) + "/numpy"
          File "/home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/third_party/py/python_configure.bzl", line 187, column 19, in _get_numpy_include
                  return execute(
          File "/home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/third_party/remote_config/common.bzl", line 230, column 13, in execute
                  fail(
      Error in fail: Problem getting numpy include path.
      Traceback (most recent call last):
        File "<string>", line 1, in <module>
      ModuleNotFoundError: No module named 'numpy'
      Is numpy installed?
      ERROR: /home/userA/project/sf/spu/WORKSPACE:72:15: fetching local_python_configure rule //external:local_execution_config_python: Traceback (most recent call last):
          File "/home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/third_party/py/python_configure.bzl", line 213, column 39, in _create_local_python_repository
                  numpy_include = _get_numpy_include(repository_ctx, python_bin) + "/numpy"
          File "/home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/third_party/py/python_configure.bzl", line 187, column 19, in _get_numpy_include
                  return execute(
          File "/home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/third_party/remote_config/common.bzl", line 230, column 13, in execute
                  fail(
      Error in fail: Problem getting numpy include path.
      Traceback (most recent call last):
        File "<string>", line 1, in <module>
      ModuleNotFoundError: No module named 'numpy'
      Is numpy installed?
      Analyzing: 3 targets (43 packages loaded, 34 targets configured)
      INFO: Repository go_sdk instantiated at:
        /home/userA/project/sf/spu/WORKSPACE:80:15: in <toplevel>
        /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/xla/workspace0.bzl:52:19: in workspace
        /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/tsl/workspace0.bzl:130:20: in workspace
        /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/com_github_grpc_grpc/bazel/grpc_extra_deps.bzl:56:27: in grpc_extra_deps
        /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/io_bazel_rules_go/go/private/sdk.bzl:431:28: in go_register_toolchains
        /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/io_bazel_rules_go/go/private/sdk.bzl:130:21: in go_download_sdk
      Repository rule _go_download_sdk defined at:
        /home/userA/.cache/bazel/_bazel_userA/faae206eac0fa7d05e2c25985585c89f/external/io_bazel_rules_go/go/private/sdk.bzl:117:35: in <toplevel>
      ERROR: Analysis of target '//spu:init' failed; build aborted: Problem getting numpy include path.
      Traceback (most recent call last):
        File "<string>", line 1, in <module>
      ModuleNotFoundError: No module named 'numpy'
      Is numpy installed?
      INFO: Elapsed time: 2.288s
      INFO: 0 processes.
      FAILED: Build did NOT complete successfully (43 packages loaded, 34 targets configured)
      Traceback (most recent call last):
        File "/tmp/pip-build-env-75c0zuwj/overlay/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 138, in run
          self._create_wheel_file(bdist_wheel)
        File "/tmp/pip-build-env-75c0zuwj/overlay/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 341, in _create_wheel_file
          files, mapping = self._run_build_commands(dist_name, unpacked, lib, tmp)
        File "/tmp/pip-build-env-75c0zuwj/overlay/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 264, in _run_build_commands
          self._run_build_subcommands()
        File "/tmp/pip-build-env-75c0zuwj/overlay/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 291, in _run_build_subcommands
          self.run_command(name)
        File "/tmp/pip-build-env-75c0zuwj/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-75c0zuwj/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 950, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-75c0zuwj/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 972, in run_command
          cmd_obj.run()
        File "<string>", line 237, in run
        File "<string>", line 208, in pip_run
        File "<string>", line 164, in build
        File "<string>", line 123, in bazel_invoke
        File "/home/userA/miniconda3/envs/sf/lib/python3.10/subprocess.py", line 369, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['bazel', 'build', '--verbose_failures', '-c', 'opt', '--config=avx', '--', '//spu:init', '//spu/utils:distributed', '//spu:api']' returned non-zero exit status 1.
      /tmp/pip-build-env-75c0zuwj/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py:972: _DebuggingTips: Problem in editable installation.
      !!

              ********************************************************************************
              An error happened while installing `spu` in editable mode.

              The following steps are recommended to help debug this problem:

              - Try to install the project normally, without using the editable mode.
                Does the error still persist?
                (If it does, try fixing the problem before attempting the editable mode).
              - If you are using binary extensions, make sure you have all OS-level
                dependencies installed (e.g. compilers, toolchains, binary libraries, ...).
              - Try the latest version of setuptools (maybe the error was already fixed).
              - If you (or your project dependencies) are using any setuptools extension
                or customization, make sure they support the editable mode.

              After following the steps above, if the problem still persists and
              you think this is related to how setuptools handles editable installations,
              please submit a reproducible example
              (see https://stackoverflow.com/help/minimal-reproducible-example) to:

                  https://github.com/pypa/setuptools/issues

              See https://setuptools.pypa.io/en/latest/userguide/development_mode.html for details.
              ********************************************************************************

      !!
        cmd_obj.run()
      Build with extra flags = ['--verbose_failures', '-c', 'opt', '--config=avx']
      Traceback (most recent call last):
        File "/home/userA/miniconda3/envs/sf/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/userA/miniconda3/envs/sf/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/home/userA/miniconda3/envs/sf/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 273, in build_editable
          return hook(wheel_directory, config_settings, metadata_directory)
        File "/tmp/pip-build-env-75c0zuwj/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 459, in build_editable
          return self._build_with_temp_dir(
        File "/tmp/pip-build-env-75c0zuwj/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 403, in _build_with_temp_dir
          self.run_setup()
        File "/tmp/pip-build-env-75c0zuwj/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 503, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-75c0zuwj/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 318, in run_setup
          exec(code, locals())
        File "<string>", line 266, in <module>
        File "/tmp/pip-build-env-75c0zuwj/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 117, in setup
          return distutils.core.setup(**attrs)
        File "/tmp/pip-build-env-75c0zuwj/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 184, in setup
          return run_commands(dist)
        File "/tmp/pip-build-env-75c0zuwj/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-75c0zuwj/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 953, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-75c0zuwj/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 950, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-75c0zuwj/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 972, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-75c0zuwj/overlay/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 138, in run
          self._create_wheel_file(bdist_wheel)
        File "/tmp/pip-build-env-75c0zuwj/overlay/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 341, in _create_wheel_file
          files, mapping = self._run_build_commands(dist_name, unpacked, lib, tmp)
        File "/tmp/pip-build-env-75c0zuwj/overlay/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 264, in _run_build_commands
          self._run_build_subcommands()
        File "/tmp/pip-build-env-75c0zuwj/overlay/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 291, in _run_build_subcommands
          self.run_command(name)
        File "/tmp/pip-build-env-75c0zuwj/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-75c0zuwj/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 950, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-75c0zuwj/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 972, in run_command
          cmd_obj.run()
        File "<string>", line 237, in run
        File "<string>", line 208, in pip_run
        File "<string>", line 164, in build
        File "<string>", line 123, in bazel_invoke
        File "/home/userA/miniconda3/envs/sf/lib/python3.10/subprocess.py", line 369, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['bazel', 'build', '--verbose_failures', '-c', 'opt', '--config=avx', '--', '//spu:init', '//spu/utils:distributed', '//spu:api']' returned non-zero exit status 1.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building editable for spu
Failed to build spu
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (spu)
anakinxc commented 2 months ago

Hi @grueyg

你是想 build 一个 wheel 包吗?直接用这个 script 吧

grueyg commented 2 months ago

Hi @grueyg

你是想 build 一个 wheel 包吗?直接用这个 script 吧

@anakinxc,谢谢,使用这个脚本可以正确build出whl包,也可以进行正确的安装。

但我想的是,将spu安装到当前目录(pip install -e .),而不是python的site-packages里(pip install *.whl)。这样每次修改源代码后,只需要在当前目录下重新编译即可。

这样操作是可行的吗?还是说这样做,实际上没有每次修改后build成whl包再重新安装方便?

最后,直接pip install .pip install -e .为什么不能正确执行呢?反而是先build成whl,再pip install就可以正确执行

anakinxc commented 2 months ago

这样操作是可行的吗?还是说这样做,实际上没有每次修改后build成whl包再重新安装方便?

pip install -e . 对于纯 python 的东西来说比较有用。对 spu 来说,会是个意义不大的事情。

修改代码的话,可以用这个里提到的方式 launch spu,或者用这个来快速 debug

anakinxc commented 2 months ago

最后,直接pip install .pip install -e .为什么不能正确执行呢?反而是先build成whl,再pip install就可以正确执行

这个感觉是 pip env 的 setup 的问题

grueyg commented 2 months ago

谢谢你的解答,我没有任何问题了