google / tcmalloc

Apache License 2.0
4.32k stars 466 forks source link

QuickStart guide woefully inadequate #166

Open paulfloyd opened 1 year ago

paulfloyd commented 1 year ago

I tried to build tcmalloc on FreeBSD (13.1 amd64). That's with bazel 5,3 installed from the ports system. Result: lots of indecipherable errors (I'll add them here later).

Then I tried on Fedora 37. bazel installed following the first hit for "bazel package fedora" here https://bazel.build/install/redhat Got a java exception. I'll try again and see if the repo has a more recent bazel.

Impression so far: only works if you have a devops team that specialize in bazel.

paulfloyd commented 1 year ago

This is what I got on Fedora 37

paulf> bazel test //tcmalloc/... Extracting Bazel installation... Starting local Bazel server and connecting to it... DEBUG: /home/paulf/.cache/bazel/_bazel_paulf/e64d1969a773086bd77690242a8869ce/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 INFO: Analyzed 473 targets (86 packages loaded, 3258 targets configured). INFO: Found 123 targets and 350 test targets... [0 / 62] [Prepa] BazelWorkspaceStatusAction stable-status.txt FATAL: bazel crashed due to an internal error. Printing stack trace: java.lang.NoClassDefFoundError: Could not initialize class com.google.devtools.build.lib.unsafe.StringUnsafe at com.google.devtools.build.lib.actions.ParameterFile.writeContent(ParameterFile.java:118) at com.google.devtools.build.lib.actions.ParameterFile.writeParameterFile(ParameterFile.java:111) at com.google.devtools.build.lib.analysis.actions.ParameterFileWriteAction$ParamFileWriter.writeOutputFile(ParameterFileWriteAction.java:170) at com.google.devtools.build.lib.exec.FileWriteStrategy.beginWriteOutputToFile(FileWriteStrategy.java:58) at com.google.devtools.build.lib.analysis.actions.FileWriteActionContext.beginWriteOutputToFile(FileWriteActionContext.java:49) at com.google.devtools.build.lib.analysis.actions.AbstractFileWriteAction.beginExecution(AbstractFileWriteAction.java:66) at com.google.devtools.build.lib.actions.Action.execute(Action.java:133) at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$5.execute(SkyframeActionExecutor.java:907) at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$ActionRunner.continueAction(SkyframeActionExecutor.java:1076) at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$ActionRunner.run(SkyframeActionExecutor.java:1031) at com.google.devtools.build.lib.skyframe.ActionExecutionState.runStateMachine(ActionExecutionState.java:152) at com.google.devtools.build.lib.skyframe.ActionExecutionState.getResultOrDependOnFuture(ActionExecutionState.java:91) at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor.executeAction(SkyframeActionExecutor.java:492) at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.checkCacheAndExecuteIfNeeded(ActionExecutionFunction.java:856) at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.computeInternal(ActionExecutionFunction.java:349) at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.compute(ActionExecutionFunction.java:169) at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:590) at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:382) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833)

paulfloyd commented 1 year ago

FreeBSD even worse

paulf> bazel test //tcmalloc/...
Extracting Bazel installation... Starting local Bazel server and connecting to it... DEBUG: /usr/home/paulf/.cache/bazel/_bazel_paulf/722be58ee7ed91e801507a31210933e1/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 INFO: Repository fuzzing_py_deps instantiated at: /usr/home/paulf/scratch/tcmalloc/WORKSPACE:111:19: in /usr/home/paulf/.cache/bazel/_bazel_paulf/722be58ee7ed91e801507a31210933e1/external/rules_fuzzing/fuzzing/init.bzl:23:16: in rules_fuzzing_init /usr/home/paulf/.cache/bazel/_bazel_paulf/722be58ee7ed91e801507a31210933e1/external/rules_python/python/pip.bzl:98:19: in pip_install Repository rule pip_repository defined at: /usr/home/paulf/.cache/bazel/_bazel_paulf/722be58ee7ed91e801507a31210933e1/external/rules_python/python/pip_install/pip_repository.bzl:369:33: in ERROR: An error occurred during the fetch of repository 'fuzzing_py_deps': Traceback (most recent call last): File "/usr/home/paulf/.cache/bazel/_bazel_paulf/722be58ee7ed91e801507a31210933e1/external/rules_python/python/pip_install/pip_repository.bzl", line 185, column 53, in _pip_repository_impl python_interpreter = _resolve_python_interpreter(rctx) File "/usr/home/paulf/.cache/bazel/_bazel_paulf/722be58ee7ed91e801507a31210933e1/external/rules_python/python/pip_install/pip_repository.bzl", line 66, column 17, in _resolve_python_interpreter fail("python interpreter {} not found in PATH".format(python_interpreter)) Error in fail: python interpreter None not found in PATH ERROR: /usr/home/paulf/scratch/tcmalloc/WORKSPACE:111:19: fetching pip_repository rule //external:fuzzing_py_deps: Traceback (most recent call last): File "/usr/home/paulf/.cache/bazel/_bazel_paulf/722be58ee7ed91e801507a31210933e1/external/rules_python/python/pip_install/pip_repository.bzl", line 185, column 53, in _pip_repository_impl python_interpreter = _resolve_python_interpreter(rctx) File "/usr/home/paulf/.cache/bazel/_bazel_paulf/722be58ee7ed91e801507a31210933e1/external/rules_python/python/pip_install/pip_repository.bzl", line 66, column 17, in _resolve_python_interpreter fail("python interpreter {} not found in PATH".format(python_interpreter)) Error in fail: python interpreter None not found in PATH INFO: Repository rules_pkg instantiated at: /usr/home/paulf/scratch/tcmalloc/WORKSPACE:80:14: in /usr/home/paulf/.cache/bazel/_bazel_paulf/722be58ee7ed91e801507a31210933e1/external/com_google_protobuf/protobuf_deps.bzl:78:21: in protobuf_deps Repository rule http_archive defined at: /usr/home/paulf/.cache/bazel/_bazel_paulf/722be58ee7ed91e801507a31210933e1/external/bazel_tools/tools/build_defs/repo/http.bzl:355:31: in INFO: Repository remote_coverage_tools instantiated at: /DEFAULT.WORKSPACE.SUFFIX:3:13: in Repository rule http_archive defined at: /usr/home/paulf/.cache/bazel/_bazel_paulf/722be58ee7ed91e801507a31210933e1/external/bazel_tools/tools/build_defs/repo/http.bzl:355:31: in ERROR: /usr/home/paulf/scratch/tcmalloc/tcmalloc/BUILD:1396:13: //tcmalloc:experiment_fuzz_corpus depends on @rules_fuzzing//fuzzing/tools:make_corpus_dir in repository @rules_fuzzing which failed to fetch. no such package '@fuzzing_py_deps//': python interpreter None not found in PATH ERROR: Analysis of target '//tcmalloc:experiment_fuzz_corpus' failed; build aborted: Analysis failed INFO: Elapsed time: 16.845s INFO: 0 processes. FAILED: Build did NOT complete successfully (19 packages loaded, 21 targets configured) FAILED: Build did NOT complete successfully (19 packages loaded, 21 targets configured) currently loading: @com_google_protobuf// ... (17 packages) Fetching @local_jdk; fetching Fetching https://mirror.bazel.build/bazel_coverage_output_generator/releases/coverage_output_generator-v2.5.zip Fetching https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.5.1/rules_pkg-0.5.1.tar.gz