Open odidev opened 2 years ago
Hello, I am Blathers. I am here to help you get the issue triaged.
Hoot - a bug! Though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here.
I was unable to automatically find someone to ping.
If we have not gotten back to your issue within a few business days, you can try the following:
:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.
Hi @odidev, a couple questions:
libresolv-wrapper
library installed? res_nsearch
is provided by that library so you need to have it installed..bazelrc.user
? You should probably be building in the dev
configuration, if you're not already.Yes, I have installed libresolv-wrapper
library, but still it was not working, so I have updated BUILD.bazel
file.
cockroach$ git diff
diff --git a/pkg/ccl/gssapiccl/BUILD.bazel b/pkg/ccl/gssapiccl/BUILD.bazel
index b5f0a1c8f7..07a651a527 100644
--- a/pkg/ccl/gssapiccl/BUILD.bazel
+++ b/pkg/ccl/gssapiccl/BUILD.bazel
@@ -20,7 +20,7 @@ go_library(
# NB: On Ubuntu, res_nsearch is found in the resolv_wrapper library,
# found in the libresolv-wrapper package.
"//build/toolchains:is_dev_linux": ["-ldl -lresolv -lresolv_wrapper"],
- "@io_bazel_rules_go//go/platform:linux": ["-ldl -lresolv"],
+ "@io_bazel_rules_go//go/platform:linux": ["-ldl -lresolv -lresolv_wrapper"],
"//conditions:default": [],
}),
importpath = "github.com/cockroachdb/cockroach/pkg/ccl/gssapiccl",
And I have successfully built cockroachDB binary on ARM64.
Can I raise PR with the above code?
As I mentioned -- you should probably be building with the dev
config (--config dev
). If you had, you would have been building with -lresolv_wrapper
either way. Is there a reason the dev
config didn't work for you?
Thanks @rickystewart for your valuable suggestion. Yes, I have successfully built cockroachDB binary on ARM64 using ./dev build pkg/cmd/cockroach-short
command. But before running this command I had to run ./dev doctor
command. So as ./dev doctor
command suggested, I have created .bazelrc.user
file and added
build --config lintonbuild
build --config dev
test --test_tmpdir=/PATH/TO/TMPDIR
Just a query, to use inbuild-sql of cockroach, we need libgeos.so
and libgeos_c.so
files. So, after building with bazel, there are no .so files created. Do we need to build these files separately?
Yes, you have to build them separately. bazel build c-deps:libgeos
. Depending on which platform you're on this may download a pre-built version, but you can force building it from scratch with bazel build c-deps:libgeos --config force_build_cdeps
.
We have marked this issue as stale because it has been inactive for 18 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 10 days to keep the issue queue tidy. Thank you for your contribution to CockroachDB!
Describe the problem
I am trying to build cockroachdb from source on ARM64 platform via bazel 5.2.0, by using this documentation.
Command: - bazel build pkg/cmd/cockroach-short
While building with bazel, the build is failing.
Expected behavior Building on ARM64 Platform should succeed.
Environment:
Please suggest if there is any specific documentation to follow to build for arm64 platform.
Jira issue: CRDB-18851