Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Unable to compile tcmalloc on Alpine Linux #128

Closed
jvoisin opened this issue Jun 4, 2022 · 0 comments
Closed

Unable to compile tcmalloc on Alpine Linux #128

jvoisin opened this issue Jun 4, 2022 · 0 comments

Comments

@jvoisin
Copy link

jvoisin commented Jun 4, 2022

I'm currently trying to add tcmalloc to the mimalloc-bench repository, and run it on Alpine Linux. Unfortunately, it doesn't compile:

/__w/mimalloc-bench/mimalloc-bench/extern /__w/mimalloc-bench/mimalloc-bench
Cloning into 'tcg'...
HEAD is now at 0fdd7dc Make SampledAllocation accept a stack trace at initialization.
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
    currently loading: tcmalloc
Analyzing: target //tcmalloc:tcmalloc (1 packages loaded, 0 targets configured)
Analyzing: target //tcmalloc:tcmalloc (12 packages loaded, 23 targets configured)
INFO: Analyzed target //tcmalloc:tcmalloc (34 packages loaded, 487 targets configured).
INFO: Found 1 target...
[0 / 4] [Prepa] BazelWorkspaceStatusAction stable-status.txt
[3 / 47] Compiling absl/synchronization/internal/graphcycles.cc; 1s processwrapper-sandbox ... (2 actions running)
[6 / 49] Compiling tcmalloc/tcmalloc.cc; 2s processwrapper-sandbox ... (2 actions running)
ERROR: /__w/mimalloc-bench/mimalloc-bench/extern/tcg/tcmalloc/BUILD:87:10: Compiling tcmalloc/tcmalloc.cc failed: (Exit 1): gcc failed: error executing command /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 ... (remaining 37 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox
tcmalloc/tcmalloc.cc:2210:41: error: declaration of 'void* TCMallocInternalMalloc(size_t) noexcept' has a different exception specifier
 2210 | extern "C" ABSL_CACHELINE_ALIGNED void* TCMallocInternalMalloc(
      |                                         ^~~~~~~~~~~~~~~~~~~~~~
In file included from tcmalloc/tcmalloc.cc:49:
./tcmalloc/tcmalloc.h:43:7: note: from previous declaration 'void* TCMallocInternalMalloc(size_t)'
   43 | void* TCMallocInternalMalloc(size_t size) __THROW
      |       ^~~~~~~~~~~~~~~~~~~~~~
tcmalloc/tcmalloc.cc:2266:40: error: declaration of 'void TCMallocInternalFree(void*) noexcept' has a different exception specifier
 2266 | extern "C" ABSL_CACHELINE_ALIGNED void TCMallocInternalFree(
      |                                        ^~~~~~~~~~~~~~~~~~~~
In file included from tcmalloc/tcmalloc.cc:49:
./tcmalloc/tcmalloc.h:45:6: note: from previous declaration 'void TCMallocInternalFree(void*)'
   45 | void TCMallocInternalFree(void* ptr) __THROW
      |      ^~~~~~~~~~~~~~~~~~~~
tcmalloc/tcmalloc.cc:2271:17: error: declaration of 'void TCMallocInternalSdallocx(void*, size_t, int) noexcept' has a different exception specifier
 2271 | extern "C" void TCMallocInternalSdallocx(void* ptr, size_t size,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from tcmalloc/tcmalloc.cc:49:
./tcmalloc/tcmalloc.h:47:6: note: from previous declaration 'void TCMallocInternalSdallocx(void*, size_t, int)'
   47 | void TCMallocInternalSdallocx(void* ptr, size_t size, int flags) __THROW
      |      ^~~~~~~~~~~~~~~~~~~~~~~~
tcmalloc/tcmalloc.cc:2283:18: error: declaration of 'void* TCMallocInternalCalloc(size_t, size_t) noexcept' has a different exception specifier
 2283 | extern "C" void* TCMallocInternalCalloc(size_t n, size_t elem_size) noexcept {
      |                  ^~~~~~~~~~~~~~~~~~~~~~
In file included from tcmalloc/tcmalloc.cc:49:
./tcmalloc/tcmalloc.h:51:7: note: from previous declaration 'void* TCMallocInternalCalloc(size_t, size_t)'
   51 | void* TCMallocInternalCalloc(size_t n, size_t size) __THROW
      |       ^~~~~~~~~~~~~~~~~~~~~~
tcmalloc/tcmalloc.cc:2299:17: error: declaration of 'void TCMallocInternalCfree(void*) noexcept' has a different exception specifier
 2299 | extern "C" void TCMallocInternalCfree(void* ptr) noexcept
      |                 ^~~~~~~~~~~~~~~~~~~~~
In file included from tcmalloc/tcmalloc.cc:49:
./tcmalloc/tcmalloc.h:53:6: note: from previous declaration 'void TCMallocInternalCfree(void*)'
   53 | void TCMallocInternalCfree(void* ptr) __THROW
      |      ^~~~~~~~~~~~~~~~~~~~~
tcmalloc/tcmalloc.cc:2356:18: error: declaration of 'void* TCMallocInternalRealloc(void*, size_t) noexcept' has a different exception specifier
 2356 | extern "C" void* TCMallocInternalRealloc(void* old_ptr,
      |                  ^~~~~~~~~~~~~~~~~~~~~~~
In file included from tcmalloc/tcmalloc.cc:49:
./tcmalloc/tcmalloc.h:49:7: note: from previous declaration 'void* TCMallocInternalRealloc(void*, size_t)'
   49 | void* TCMallocInternalRealloc(void* ptr, size_t size) __THROW
      |       ^~~~~~~~~~~~~~~~~~~~~~~
tcmalloc/tcmalloc.cc:2368:18: error: declaration of 'void* TCMallocInternalNewNothrow(size_t, const std::nothrow_t&) noexcept' has a different exception specifier
 2368 | extern "C" void* TCMallocInternalNewNothrow(size_t size,
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from tcmalloc/tcmalloc.cc:49:
./tcmalloc/tcmalloc.h:92:7: note: from previous declaration 'void* TCMallocInternalNewNothrow(size_t, const std::nothrow_t&)'
   92 | void* TCMallocInternalNewNothrow(size_t size, const std::nothrow_t&) __THROW
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~
tcmalloc/tcmalloc.cc:2391:40: error: declaration of 'void TCMallocInternalDelete(void*) noexcept' has a different exception specifier
 2391 | extern "C" ABSL_CACHELINE_ALIGNED void TCMallocInternalDelete(void* p) noexcept
      |                                        ^~~~~~~~~~~~~~~~~~~~~~
In file included from tcmalloc/tcmalloc.cc:49:
./tcmalloc/tcmalloc.h:94:6: note: from previous declaration 'void TCMallocInternalDelete(void*)'
   94 | void TCMallocInternalDelete(void* p) __THROW
      |      ^~~~~~~~~~~~~~~~~~~~~~
tcmalloc/tcmalloc.cc:2400:17: error: declaration of 'void TCMallocInternalDeleteAligned(void*, std::align_val_t) noexcept' has a different exception specifier
 2400 | extern "C" void TCMallocInternalDeleteAligned(
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from tcmalloc/tcmalloc.cc:49:
./tcmalloc/tcmalloc.h:96:6: note: from previous declaration 'void TCMallocInternalDeleteAligned(void*, std::align_val_t)'
   96 | void TCMallocInternalDeleteAligned(void* p, std::align_val_t alignment) __THROW
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tcmalloc/tcmalloc.cc:2414:40: error: declaration of 'void TCMallocInternalDeleteSized(void*, size_t) noexcept' has a different exception specifier
 2414 | extern "C" ABSL_CACHELINE_ALIGNED void TCMallocInternalDeleteSized(
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from tcmalloc/tcmalloc.cc:49:
./tcmalloc/tcmalloc.h:98:6: note: from previous declaration 'void TCMallocInternalDeleteSized(void*, size_t)'
   98 | void TCMallocInternalDeleteSized(void* p, size_t size) __THROW
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
tcmalloc/tcmalloc.cc:2420:17: error: declaration of 'void TCMallocInternalDeleteSizedAligned(void*, size_t, std::align_val_t) noexcept' has a different exception specifier
 2420 | extern "C" void TCMallocInternalDeleteSizedAligned(
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from tcmalloc/tcmalloc.cc:49:
./tcmalloc/tcmalloc.h:100:6: note: from previous declaration 'void TCMallocInternalDeleteSizedAligned(void*, size_t, std::align_val_t)'
  100 | void TCMallocInternalDeleteSizedAligned(void* p, size_t t,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tcmalloc/tcmalloc.cc:2425:17: error: declaration of 'void TCMallocInternalDeleteArraySized(void*, size_t) noexcept' has a different exception specifier
 2425 | extern "C" void TCMallocInternalDeleteArraySized(void* p, size_t size) noexcept
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from tcmalloc/tcmalloc.cc:49:
./tcmalloc/tcmalloc.h:117:6: note: from previous declaration 'void TCMallocInternalDeleteArraySized(void*, size_t)'
  117 | void TCMallocInternalDeleteArraySized(void* p, size_t size) __THROW
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tcmalloc/tcmalloc.cc:2434:17: error: declaration of 'void TCMallocInternalDeleteArraySizedAligned(void*, size_t, std::align_val_t) noexcept' has a different exception specifier
 2434 | extern "C" void TCMallocInternalDeleteArraySizedAligned(
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from tcmalloc/tcmalloc.cc:49:
./tcmalloc/tcmalloc.h:119:6: note: from previous declaration 'void TCMallocInternalDeleteArraySizedAligned(void*, size_t, std::align_val_t)'
  119 | void TCMallocInternalDeleteArraySizedAligned(void* p, size_t t,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tcmalloc/tcmalloc.cc:2447:17: error: declaration of 'void TCMallocInternalDeleteNothrow(void*, const std::nothrow_t&) noexcept' has a different exception specifier
 2447 | extern "C" void TCMallocInternalDeleteNothrow(void* p,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from tcmalloc/tcmalloc.cc:49:
./tcmalloc/tcmalloc.h:103:6: note: from previous declaration 'void TCMallocInternalDeleteNothrow(void*, const std::nothrow_t&)'
  103 | void TCMallocInternalDeleteNothrow(void* p, const std::nothrow_t&) __THROW
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tcmalloc/tcmalloc.cc:2493:18: error: declaration of 'void* TCMallocInternalNewArrayNothrow(size_t, const std::nothrow_t&) noexcept' has a different exception specifier
 2493 | extern "C" void* TCMallocInternalNewArrayNothrow(size_t size,
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from tcmalloc/tcmalloc.cc:49:
./tcmalloc/tcmalloc.h:109:7: note: from previous declaration 'void* TCMallocInternalNewArrayNothrow(size_t, const std::nothrow_t&)'
  109 | void* TCMallocInternalNewArrayNothrow(size_t size,
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tcmalloc/tcmalloc.cc:2520:17: error: declaration of 'void TCMallocInternalDeleteArray(void*) noexcept' has a different exception specifier
 2520 | extern "C" void TCMallocInternalDeleteArray(void* p) noexcept
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from tcmalloc/tcmalloc.cc:49:
./tcmalloc/tcmalloc.h:112:6: note: from previous declaration 'void TCMallocInternalDeleteArray(void*)'
  112 | void TCMallocInternalDeleteArray(void* p) __THROW
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
tcmalloc/tcmalloc.cc:2529:17: error: declaration of 'void TCMallocInternalDeleteArrayAligned(void*, std::align_val_t) noexcept' has a different exception specifier
 2529 | extern "C" void TCMallocInternalDeleteArrayAligned(
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from tcmalloc/tcmalloc.cc:49:
./tcmalloc/tcmalloc.h:114:6: note: from previous declaration 'void TCMallocInternalDeleteArrayAligned(void*, std::align_val_t)'
  114 | void TCMallocInternalDeleteArrayAligned(void* p,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tcmalloc/tcmalloc.cc:2540:17: error: declaration of 'void TCMallocInternalDeleteArrayNothrow(void*, const std::nothrow_t&) noexcept' has a different exception specifier
 2540 | extern "C" void TCMallocInternalDeleteArrayNothrow(
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from tcmalloc/tcmalloc.cc:49:
./tcmalloc/tcmalloc.h:122:6: note: from previous declaration 'void TCMallocInternalDeleteArrayNothrow(void*, const std::nothrow_t&)'
  122 | void TCMallocInternalDeleteArrayNothrow(void* p, const std::nothrow_t&) __THROW
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tcmalloc/tcmalloc.cc:2566:18: error: declaration of 'void* TCMallocInternalMemalign(size_t, size_t) noexcept' has a different exception specifier
 2566 | extern "C" void* TCMallocInternalMemalign(size_t align, size_t size) noexcept {
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from tcmalloc/tcmalloc.cc:49:
./tcmalloc/tcmalloc.h:58:7: note: from previous declaration 'void* TCMallocInternalMemalign(size_t, size_t)'
   58 | void* TCMallocInternalMemalign(size_t align, size_t __size) __THROW
      |       ^~~~~~~~~~~~~~~~~~~~~~~~
tcmalloc/tcmalloc.cc:2571:18: error: declaration of 'void* TCMallocInternalAlignedAlloc(size_t, size_t) noexcept' has a different exception specifier
 2571 | extern "C" void* TCMallocInternalAlignedAlloc(size_t align,
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from tcmalloc/tcmalloc.cc:49:
./tcmalloc/tcmalloc.h:56:7: note: from previous declaration 'void* TCMallocInternalAlignedAlloc(size_t, size_t)'
   56 | void* TCMallocInternalAlignedAlloc(size_t align, size_t __size) __THROW
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
tcmalloc/tcmalloc.cc:2587:16: error: declaration of 'int TCMallocInternalPosixMemalign(void**, size_t, size_t) noexcept' has a different exception specifier
 2587 | extern "C" int TCMallocInternalPosixMemalign(void** result_ptr, size_t align,
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from tcmalloc/tcmalloc.cc:49:
./tcmalloc/tcmalloc.h:60:5: note: from previous declaration 'int TCMallocInternalPosixMemalign(void**, size_t, size_t)'
   60 | int TCMallocInternalPosixMemalign(void** ptr, size_t align, size_t size) __THROW
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tcmalloc/tcmalloc.cc:2603:18: error: declaration of 'void* TCMallocInternalValloc(size_t) noexcept' has a different exception specifier
 2603 | extern "C" void* TCMallocInternalValloc(size_t size) noexcept {
      |                  ^~~~~~~~~~~~~~~~~~~~~~
In file included from tcmalloc/tcmalloc.cc:49:
./tcmalloc/tcmalloc.h:62:7: note: from previous declaration 'void* TCMallocInternalValloc(size_t)'
   62 | void* TCMallocInternalValloc(size_t __size) __THROW
      |       ^~~~~~~~~~~~~~~~~~~~~~
tcmalloc/tcmalloc.cc:2609:18: error: declaration of 'void* TCMallocInternalPvalloc(size_t) noexcept' has a different exception specifier
 2609 | extern "C" void* TCMallocInternalPvalloc(size_t size) noexcept {
      |                  ^~~~~~~~~~~~~~~~~~~~~~~
In file included from tcmalloc/tcmalloc.cc:49:
./tcmalloc/tcmalloc.h:64:7: note: from previous declaration 'void* TCMallocInternalPvalloc(size_t)'
   64 | void* TCMallocInternalPvalloc(size_t __size) __THROW
      |       ^~~~~~~~~~~~~~~~~~~~~~~
tcmalloc/tcmalloc.cc:2619:17: error: declaration of 'void TCMallocInternalMallocStats() noexcept' has a different exception specifier
 2619 | extern "C" void TCMallocInternalMallocStats(void) noexcept {
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from tcmalloc/tcmalloc.cc:49:
./tcmalloc/tcmalloc.h:67:6: note: from previous declaration 'void TCMallocInternalMallocStats()'
   67 | void TCMallocInternalMallocStats(void) __THROW
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
tcmalloc/tcmalloc.cc:2629:16: error: declaration of 'int TCMallocInternalMallOpt(int, int) noexcept' has a different exception specifier
 2629 | extern "C" int TCMallocInternalMallOpt(int cmd, int value) noexcept {
      |                ^~~~~~~~~~~~~~~~~~~~~~~
In file included from tcmalloc/tcmalloc.cc:49:
./tcmalloc/tcmalloc.h:73:5: note: from previous declaration 'int TCMallocInternalMallOpt(int, int)'
   73 | int TCMallocInternalMallOpt(int cmd, int value) __THROW
      |     ^~~~~~~~~~~~~~~~~~~~~~~
tcmalloc/tcmalloc.cc:2639:19: error: declaration of 'size_t TCMallocInternalMallocSize(void*) noexcept' has a different exception specifier
 2639 | extern "C" size_t TCMallocInternalMallocSize(void* ptr) noexcept {
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from tcmalloc/tcmalloc.cc:49:
./tcmalloc/tcmalloc.h:85:8: note: from previous declaration 'size_t TCMallocInternalMallocSize(void*)'
   85 | size_t TCMallocInternalMallocSize(void* ptr) __THROW
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~
Target //tcmalloc:tcmalloc failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 12.221s, Critical Path: 3.09s
INFO: 8 processes: 6 internal, 2 processwrapper-sandbox.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
Error: Process completed with exit code 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant