linux-on-ibm-z / docs

A collection of instructions and tutorials to help you get your favorite software up and running on Linux on z
147 stars 58 forks source link

Building CockroachDB 23.1.2 fails on compiling cluster-ui #60

Closed ashfreeth closed 1 week ago

ashfreeth commented 3 months ago

I'm trying to build CockroachDB 23.1.2 on a RHEL 9.2 (s390x) machine using the build script: https://github.com/linux-on-ibm-z/scripts/blob/master/CockroachDB/23.1.2/build_crdb.sh

The build seems to fail at the point of compiling the cluster-ui component (output below). Please can someone take a look at replicating the issue, and indentifying the root cause?

Also, in terms of updates to the wiki docs for the CockroachDB build, one thing I noticed is that the EPEL package repos are required on RHEL 9 specifically to provide the required ghc-resolv package. If that's confirmed, then please can that also be added somewhere in the docs.

Appreciate the help!

$ bazel build //pkg/cmd/cockroach:cockroach --config=with_ui
INFO: Invocation ID: 0247a4a8-acb3-4c1d-86e1-5ca1c82ccfe0
Loading:
Loading: 1 packages loaded
INFO: Build options --//build/toolchains:nogo_disable_flag, --//pkg/ui:with_ui_flag, and --run_under have changed, discarding analysis cache.
Analyzing: target //pkg/cmd/cockroach:cockroach (2 packages loaded, 0 targets configured)
Analyzing: target //pkg/cmd/cockroach:cockroach (49 packages loaded, 9169 targets configured)
Analyzing: target //pkg/cmd/cockroach:cockroach (177 packages loaded, 9170 targets configured)
Analyzing: target //pkg/cmd/cockroach:cockroach (275 packages loaded, 9315 targets configured)
Analyzing: target //pkg/cmd/cockroach:cockroach (342 packages loaded, 9317 targets configured)
Analyzing: target //pkg/cmd/cockroach:cockroach (427 packages loaded, 9362 targets configured)
Analyzing: target //pkg/cmd/cockroach:cockroach (427 packages loaded, 9362 targets configured)
Analyzing: target //pkg/cmd/cockroach:cockroach (441 packages loaded, 9362 targets configured)
Analyzing: target //pkg/cmd/cockroach:cockroach (544 packages loaded, 9730 targets configured)
Analyzing: target //pkg/cmd/cockroach:cockroach (553 packages loaded, 9737 targets configured)
Analyzing: target //pkg/cmd/cockroach:cockroach (615 packages loaded, 10562 targets configured)
Analyzing: target //pkg/cmd/cockroach:cockroach (639 packages loaded, 10612 targets configured)
Analyzing: target //pkg/cmd/cockroach:cockroach (675 packages loaded, 10738 targets configured)
Analyzing: target //pkg/cmd/cockroach:cockroach (677 packages loaded, 10867 targets configured)
Analyzing: target //pkg/cmd/cockroach:cockroach (768 packages loaded, 12554 targets configured)
Analyzing: target //pkg/cmd/cockroach:cockroach (870 packages loaded, 14129 targets configured)
Analyzing: target //pkg/cmd/cockroach:cockroach (905 packages loaded, 14655 targets configured)
Analyzing: target //pkg/cmd/cockroach:cockroach (1060 packages loaded, 17074 targets configured)
Analyzing: target //pkg/cmd/cockroach:cockroach (1323 packages loaded, 23082 targets configured)
Analyzing: target //pkg/cmd/cockroach:cockroach (1468 packages loaded, 28505 targets configured)
Analyzing: target //pkg/cmd/cockroach:cockroach (1468 packages loaded, 29666 targets configured)
Analyzing: target //pkg/cmd/cockroach:cockroach (1613 packages loaded, 29669 targets configured)
Analyzing: target //pkg/cmd/cockroach:cockroach (1613 packages loaded, 29669 targets configured)
INFO: Analyzed target //pkg/cmd/cockroach:cockroach (1809 packages loaded, 41559 targets configured).
INFO: Found 1 target...
[0 / 1] [Prepa] BazelWorkspaceStatusAction stable-status.txt
[11 / 16] Foreign Cc - Configure: Building libjemalloc_foreign; 13s linux-sandbox, remote-cache ... (3 actions, 2 running)
[13 / 16] Foreign Cc - Configure: Building libjemalloc_foreign; 34s linux-sandbox, remote-cache ... (4 actions running)
[13 / 16] Foreign Cc - Configure: Building libjemalloc_foreign; 54s linux-sandbox, remote-cache ... (4 actions running)
[200 / 555] Foreign Cc - Configure: Building libjemalloc_foreign; 76s linux-sandbox, remote-cache ... (3 actions, 2 running)
[246 / 664] Foreign Cc - Configure: Building libjemalloc_foreign; 102s linux-sandbox, remote-cache ... (3 actions, 2 running)
[295 / 664] Compiling src/google/protobuf/generated_message_reflection.cc; 2s linux-sandbox, remote-cache ... (3 actions, 2 running)
[759 / 1,363] Compiling src/google/protobuf/compiler/command_line_interface.cc; 1s linux-sandbox, remote-cache ... (3 actions, 2 running)
[846 / 1,363] Compiling src/google/protobuf/descriptor.cc; 3s linux-sandbox, remote-cache ... (3 actions, 2 running)
[1,399 / 1,908] Generating into bazel-out/s390x-fastbuild/bin/pkg/kv/kvserver/kvserverpb/kvserverpb_go_proto_/github.com/cockroachdb/cockroach/pkg/kv/kvserver/kvserverpb; 0s linux-sandbox, remote-cache ... (3 actions, 2 running)
[2,028 / 2,635] GoCompilePkg external/com_github_jackc_pgx_v5/pgtype/pgtype.a; 2s linux-sandbox, remote-cache ... (3 actions, 2 running)
[2,564 / 2,979] GoCompilePkg pkg/sql/parser/parser.a; 18s linux-sandbox, remote-cache ... (3 actions, 2 running)
[2,861 / 3,085] GoCompilePkg pkg/server/serverpb/serverpb.a; 8s linux-sandbox, remote-cache ... (3 actions, 2 running)
[3,398 / 3,449] GoCompilePkg pkg/keyvisualizer/keyvisstorage/keyvisstorage.a; 0s linux-sandbox, remote-cache ... (3 actions, 2 running)
[6,806 / 6,812] NpmPackageBin pkg/ui/workspaces/cluster-ui/dist/js/main.js; 32s linux-sandbox, remote-cache
ERROR: /home/ashfreeth/cockroach/pkg/ui/workspaces/cluster-ui/BUILD.bazel:178:8: NpmPackageBin pkg/ui/workspaces/cluster-ui/dist/js/main.js failed: (Killed): webpack-cli.sh failed: error executing command bazel-out/s390x-opt-exec-2B5CBBC6/bin/external/npm_cluster_ui/webpack-cli/bin/webpack-cli.sh pkg/ui/workspaces/cluster-ui/src/index.ts --config pkg/ui/workspaces/cluster-ui/webpack.config.js ... (remaining 7 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
bazel-out/s390x-opt-exec-2B5CBBC6/bin/external/npm_cluster_ui/webpack-cli/bin/webpack-cli.sh: line 431:    36 Killed                  "${node}" ${LAUNCHER_NODE_OPTIONS[@]+"${LAUNCHER_NODE_OPTIONS[@]}"} ${USER_NODE_OPTIONS[@]+"${USER_NODE_OPTIONS[@]}"} "${MAIN}" ${ARGS[@]+"${ARGS[@]}"} 0<&0
ℹ Compiling Cluster-ui
Target //pkg/cmd/cockroach:cockroach failed to build
linuxonz commented 2 months ago

Hi @ashfreeth, We have added a note in the cockroachDB build instruction for enabling the EPEL repo. Also, We are not able to reproduce this issue. Seems to be related to the environment.