google / tcmalloc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

failed mater branch build on Fedora 38

sergey-safarov opened this issue · comments

[centos@sbc-stage-a0 tcmalloc]$ bazel test //tcmalloc/... --sandbox_debug
INFO: Analyzed 770 targets (0 packages loaded, 0 targets configured).
INFO: Found 128 targets and 642 test targets...
ERROR: /tmp/tcmalloc/tcmalloc/BUILD:137:26: Compiling tcmalloc/static_vars.cc failed: (Exit 1): process-wrapper failed: error executing CppCompile command 
  (cd /home/centos/.cache/bazel/_bazel_centos/54050d9eace562345e749d605caa8143/sandbox/processwrapper-sandbox/332/execroot/com_google_tcmalloc && \
  exec env - \
    PATH=/home/centos/.local/bin:/home/centos/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin \
    PWD=/proc/self/cwd \
    TMPDIR=/tmp \
  /home/centos/.cache/bazel/_bazel_centos/install/e35776b7f6e7942d80f99a8a88bdd24b/process-wrapper '--timeout=0' '--kill_delay=15' '--stats=/home/centos/.cache/bazel/_bazel_centos/54050d9eace562345e749d605caa8143/sandbox/processwrapper-sandbox/332/stats.out' /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++14' -MD -MF bazel-out/aarch64-fastbuild/bin/tcmalloc/_objs/common_deprecated_perthread/static_vars.pic.d '-frandom-seed=bazel-out/aarch64-fastbuild/bin/tcmalloc/_objs/common_deprecated_perthread/static_vars.pic.o' -fPIC '-DBAZEL_CURRENT_REPOSITORY=""' -iquote . -iquote bazel-out/aarch64-fastbuild/bin -iquote external/com_google_absl -iquote bazel-out/aarch64-fastbuild/bin/external/com_google_absl '-std=c++17' -Werror -Wno-attribute-alias -Wno-sign-compare -Wno-stringop-overflow -Wno-uninitialized -Wno-unused-function -Wno-unused-result -Wno-unused-variable -DTCMALLOC_DEPRECATED_PERTHREAD -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c tcmalloc/static_vars.cc -o bazel-out/aarch64-fastbuild/bin/tcmalloc/_objs/common_deprecated_perthread/static_vars.pic.o)
In file included from ./tcmalloc/cpu_cache.h:41,
                 from tcmalloc/static_vars.cc:26:
./tcmalloc/internal/percpu_tcmalloc.h: In function 'int tcmalloc::tcmalloc_internal::subtle::percpu::TcmallocSlab_Internal_Push(typename TcmallocSlab<NumClasses>::Slabs*, size_t, void*, Shift, OverflowHandler, void*, size_t)':
./tcmalloc/internal/percpu_tcmalloc.h:684:37: error: expected ')' before ':' token
  684 |       : "x16", "x17", "cc", "memory"
      |                                     ^
      |                                     )
  685 |       : overflow_label
      |       ~                              
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 4.610s, Critical Path: 1.90s
INFO: 19 processes: 5 internal, 14 processwrapper-sandbox.

I have applied this change

diff --git a/tcmalloc/internal/percpu_tcmalloc.h b/tcmalloc/internal/percpu_tcmalloc.h
index 0157ffe..11345d3 100644
--- a/tcmalloc/internal/percpu_tcmalloc.h
+++ b/tcmalloc/internal/percpu_tcmalloc.h
@@ -682,7 +682,6 @@ static inline ABSL_ATTRIBUTE_ALWAYS_INLINE int TcmallocSlab_Internal_Push(
       // the x16 or x17 register according to the ARMv8 ABI standard.
 #if TCMALLOC_INTERNAL_PERCPU_USE_RSEQ_ASM_GOTO
       : "x16", "x17", "cc", "memory"
-      : overflow_label
 #else
       : "x16", "x17", "memory"
 #endif

I got other build error

ERROR: /tmp/tcmalloc/tcmalloc/BUILD:110:11: Compiling tcmalloc/tcmalloc.cc failed: (Exit 1): process-wrapper failed: error executing CppCompile command 
  (cd /home/centos/.cache/bazel/_bazel_centos/54050d9eace562345e749d605caa8143/sandbox/processwrapper-sandbox/398/execroot/com_google_tcmalloc && \
  exec env - \
    PATH=/home/centos/.local/bin:/home/centos/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin \
    PWD=/proc/self/cwd \
    TMPDIR=/tmp \
  /home/centos/.cache/bazel/_bazel_centos/install/e35776b7f6e7942d80f99a8a88bdd24b/process-wrapper '--timeout=0' '--kill_delay=15' '--stats=/home/centos/.cache/bazel/_bazel_centos/54050d9eace562345e749d605caa8143/sandbox/processwrapper-sandbox/398/stats.out' /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++14' -MD -MF bazel-out/aarch64-fastbuild/bin/tcmalloc/_objs/tcmalloc_deprecated_perthread/tcmalloc.pic.d '-frandom-seed=bazel-out/aarch64-fastbuild/bin/tcmalloc/_objs/tcmalloc_deprecated_perthread/tcmalloc.pic.o' -fPIC '-DBAZEL_CURRENT_REPOSITORY=""' -iquote . -iquote bazel-out/aarch64-fastbuild/bin -iquote external/com_google_absl -iquote bazel-out/aarch64-fastbuild/bin/external/com_google_absl '-std=c++17' -DTCMALLOC_DEPRECATED_PERTHREAD -Werror -Wno-attribute-alias -Wno-sign-compare -Wno-stringop-overflow -Wno-uninitialized -Wno-unused-function -Wno-unused-result -Wno-unused-variable -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c tcmalloc/tcmalloc.cc -o bazel-out/aarch64-fastbuild/bin/tcmalloc/_objs/tcmalloc_deprecated_perthread/tcmalloc.pic.o)
during RTL pass: expand
In file included from ./tcmalloc/cpu_cache.h:41,
                 from ./tcmalloc/allocation_sampling.h:25,
                 from tcmalloc/tcmalloc.cc:91:
In function 'int tcmalloc::tcmalloc_internal::subtle::percpu::TcmallocSlab_Internal_Push(typename TcmallocSlab<NumClasses>::Slabs*, size_t, void*, Shift, OverflowHandler, void*, size_t) [with long unsigned int NumClasses = 172]',
    inlined from 'bool tcmalloc::tcmalloc_internal::subtle::percpu::TcmallocSlab<NumClasses>::Push(size_t, void*, tcmalloc::tcmalloc_internal::subtle::percpu::OverflowHandler, void*) [with long unsigned int NumClasses = 172]' at ./tcmalloc/internal/percpu_tcmalloc.h:723:48,
    inlined from 'void tcmalloc::tcmalloc_internal::cpu_cache_internal::CpuCache<Forwarder>::Deallocate(void*, size_t) [with Forwarder = tcmalloc::tcmalloc_internal::cpu_cache_internal::StaticForwarder]' at ./tcmalloc/cpu_cache.h:666:17,
    inlined from 'void tcmalloc::tcmalloc_internal::FreeSmallSlow(void*, size_t)' at tcmalloc/tcmalloc.cc:611:38:
./tcmalloc/internal/percpu_tcmalloc.h:595:3: internal compiler error: 'asm' clobber conflict with output operand
  595 |   asm volatile(
      |   ^~~
Please submit a full bug report, with preprocessed source.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/cc40SQMN.out file, please attach this to your bugreport.
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 70.789s, Critical Path: 17.02s
INFO: 66 processes: 3 internal, 63 processwrapper-sandbox.