daanx / mimalloc-bench

Suite for benchmarking malloc implementations.
MIT License
373 stars 53 forks source link

build-bench-env.sh fails to build tcmalloc with "no such attribute 'linkshared' in 'cc_library' rule" #182

Closed godmar closed 1 year ago

godmar commented 1 year ago

When I run build-bench-env.sh all it fails with:

--------------------------------------------
build tcg: version 41fc1266a08d9662a7e3dd76aebd0a3587f4cc36
--------------------------------------------

~/mimalloc-bench/extern ~/mimalloc-bench
/home/gback/mimalloc-bench/extern/tcg already exists; no need to git clone
M   tcmalloc/BUILD
M   tcmalloc/internal/BUILD
M   tcmalloc/testing/BUILD
M   tcmalloc/variants.bzl
HEAD is now at 41fc126 Remove unused internal ID
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
DEBUG: /home/gback/.cache/bazel/_bazel_gback/c266bf8adc7840fc660cb33eb19a7b04/external/rules_python/python/repositories.bzl:32:10: py_repositories is a no-op and is deprecated. You can remove this from your WORKSPACE file
ERROR: /home/gback/mimalloc-bench/extern/tcg/tcmalloc/BUILD:112:11: //tcmalloc:tcmalloc_deprecated_perthread: no such attribute 'linkshared' in 'cc_library' rule
ERROR: Skipping 'tcmalloc': Error evaluating 'tcmalloc': error loading package 'tcmalloc': Package 'tcmalloc' contains errors
WARNING: Target pattern parsing failed.
ERROR: Error evaluating 'tcmalloc': error loading package 'tcmalloc': Package 'tcmalloc' contains errors
INFO: Elapsed time: 4.446s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1 packages loaded)

Is this related to #108?

jvoisin commented 1 year ago

It looks like it is, yup. My awk-magic seems to be broken, sigh.

prim commented 1 year ago

I was still hoping to find a way to compile google-tcmalloc into a standalone .so file in this repository. Sigh.

mjp41 commented 1 year ago

I was still hoping to find a way to compile google-tcmalloc into a standalone .so file in this repository. Sigh.

So for me with a fresh checkout I did

./build-bench-env.sh packages
./build-bench-env.sh tcg

and I get an so at:

  [mimalloc-bench]/extern/tcg/bazel-bin/tcmalloc/libtcmalloc.so

Could you elaborate on what is going wrong?

prim commented 1 year ago

I re-clone a clean repository and I can compile the so now. I think I messed up google-tcmaloc and mimalloc-bench repositories yesterday.