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

Retries failed go get requests. #229

Merged
merged 1 commit into from
Jan 13, 2023
Merged

Retries failed go get requests. #229

merged 1 commit into from
Jan 13, 2023

Conversation

ser-io
Copy link
Member

@ser-io ser-io commented Jan 13, 2023

Temporary solution until golang/go#28194 is fixed in order to retry failed fetch requests.

# Temporary solution until https://github.com/golang/go/issues/28194 is fixed
# in order to retry failed fetch requests.
# GOPROXY fallback was added in Go 1.15
export GOPROXY="proxy.golang.org|proxy.golang.org|direct"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we be worried about go 1.14?
The other branch of the if is for go 1.13, but the functionality you're using here is for 1.15+

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed the logic, now based on the output of go version

Temporary solution until golang/go#28194 is fixed
in order to retry failed fetch requests.
@ser-io ser-io merged commit 083b287 into google:main Jan 13, 2023
@ser-io ser-io deleted the go-fech-retry branch January 20, 2023 21:51
@spiritedRunning
Copy link
Contributor

spiritedRunning commented Apr 4, 2024

+ version=1.22.1
+ [[ 1.22.1 > 1.15 ]]
+ export 'GOPROXY=proxy.golang.org|proxy.golang.org|direct'
+ GOPROXY='proxy.golang.org|proxy.golang.org|direct'
+ go test ./...
?   	github.com/google/android-cuttlefish/frontend/src/host_orchestrator	[no test files]
?   	github.com/google/android-cuttlefish/frontend/src/host_orchestrator/orchestrator/cvd	[no test files]
?   	github.com/google/android-cuttlefish/frontend/src/host_orchestrator/orchestrator/debug	[no test files]
?   	github.com/google/android-cuttlefish/frontend/src/host_orchestrator/orchestrator/testing	[no test files]
2024/04/04 22:39:29 request "POST /cvds" failed with error: invalid CreateCVDRequest: field CVD is empty
2024/04/04 22:39:29 request "GET /cvds/cvd-1/logs" failed with error: fork/exec /usr/bin/cvd: no such file or directory
2024/04/04 22:39:29 request "GET /operations/foo" failed with error: Operation not found: operation not found: foo
2024/04/04 22:39:29 request "GET /operations/9631f64f-853f-424d-b306-85f97bfb9bbf/result" failed with error: Operation not found: operation not found: 9631f64f-853f-424d-b306-85f97bfb9bbf
2024/04/04 22:39:29 request "POST /operations/foo/:wait" failed with error: Operation not found: operation not found: map key didn't exist
2024/04/04 22:39:29 request "POST /operations/foo/:wait" failed with error: Operation not found: operation not found: map key didn't exist
2024/04/04 22:39:30 request "POST /operations/e9ec7b22-35cf-4b39-8217-4d5494859e07/:wait" failed with error: Wait for operation timed out: waiting for operation timed out
2024/04/04 22:39:30 error removing host bug report file "/tmp/hostbugreport8495d052-326a-4bca-96f2-8f5657fc2eac": remove /tmp/hostbugreport8495d052-326a-4bca-96f2-8f5657fc2eac: no such file or directory
--- FAIL: TestCreateCVDVerifyStartCVDCmdArgs (5.01s)
    --- FAIL: TestCreateCVDVerifyStartCVDCmdArgs/android_ci_build_default (1.00s)
        createcvdaction_test.go:299: command line mismatch (-want +got):
              string(
            - 	"sudo -u fakecvduser ANDROID_HOST_OUT=/tmp/cuttlefishTestDir4258872679/artifacts/9551522_aosp_cf_x86_64_phone-trunk_staging-userdebug__cvd /usr/bin/cvd --group_name=cvd start --daemon --report_anonymous_usage_stats=y --base_instance_num=1 --system_image_dir"...,
            + 	" ",
              )
    --- FAIL: TestCreateCVDVerifyStartCVDCmdArgs/android_ci_build_specific_main_build (1.00s)
        createcvdaction_test.go:299: command line mismatch (-want +got):
              string(
            - 	"sudo -u fakecvduser ANDROID_HOST_OUT=/tmp/cuttlefishTestDir4258872679/artifacts/1_foo__cvd /usr/bin/cvd --group_name=cvd start --daemon --report_anonymous_usage_stats=y --base_instance_num=1 --system_image_dir=/tmp/cuttlefishTestDir4258872679/artifacts/1_f"...,
            + 	" ",
              )
    --- FAIL: TestCreateCVDVerifyStartCVDCmdArgs/android_ci_build_specific_kernel_build (1.00s)
        createcvdaction_test.go:299: command line mismatch (-want +got):
              string(
            - 	"sudo -u fakecvduser ANDROID_HOST_OUT=/tmp/cuttlefishTestDir4258872679/artifacts/1_foo__cvd /usr/bin/cvd --group_name=cvd start --daemon --report_anonymous_usage_stats=y --base_instance_num=1 --system_image_dir=/tmp/cuttlefishTestDir4258872679/artifacts/1_f"...,
            + 	" ",
              )
    --- FAIL: TestCreateCVDVerifyStartCVDCmdArgs/android_ci_build_specific_bootloader_build (1.00s)
        createcvdaction_test.go:299: command line mismatch (-want +got):
              string(
            - 	"sudo -u fakecvduser ANDROID_HOST_OUT=/tmp/cuttlefishTestDir4258872679/artifacts/1_foo__cvd /usr/bin/cvd --group_name=cvd start --daemon --report_anonymous_usage_stats=y --base_instance_num=1 --system_image_dir=/tmp/cuttlefishTestDir4258872679/artifacts/1_f"...,
            + 	" ",
              )
    --- FAIL: TestCreateCVDVerifyStartCVDCmdArgs/android_ci_build_with_system_image_build (1.00s)
        createcvdaction_test.go:299: command line mismatch (-want +got):
              string(
            - 	"sudo -u fakecvduser ANDROID_HOST_OUT=/tmp/cuttlefishTestDir4258872679/artifacts/123e4567-__custom_cvd /usr/bin/cvd --group_name=cvd start --daemon --report_anonymous_usage_stats=y --base_instance_num=1 --system_image_dir=/tmp/cuttlefishTestDir4258872679/ar"...,
            + 	" ",
              )
2024/04/04 22:39:38 Failed parsing `cvd fleet` ouput. Output:
...
--- FAIL: TestCreateCVDFailsDueCVDSubCommandExecution (1.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x925ad5]

goroutine 111 [running]:
testing.tRunner.func1.2({0x9a5800, 0xeeb940})
	/usr/local/go/src/testing/testing.go:1631 +0x24a
testing.tRunner.func1()
	/usr/local/go/src/testing/testing.go:1634 +0x377
panic({0x9a5800?, 0xeeb940?})
	/usr/local/go/src/runtime/panic.go:770 +0x132
github.com/google/android-cuttlefish/frontend/src/host_orchestrator/orchestrator.TestCreateCVDFailsDueCVDSubCommandExecution(0xc0001ba1a0)
	/home/zach/cuttlefish/frontend/src/host_orchestrator/orchestrator/createcvdaction_test.go:399 +0x3b5
testing.tRunner(0xc0001ba1a0, 0xa95de8)
	/usr/local/go/src/testing/testing.go:1689 +0xfb
created by testing.(*T).Run in goroutine 1
	/usr/local/go/src/testing/testing.go:1742 +0x390
FAIL	github.com/google/android-cuttlefish/frontend/src/host_orchestrator/orchestrator	9.137s
ok  	github.com/google/android-cuttlefish/frontend/src/host_orchestrator/orchestrator/artifacts	(cached)
FAIL
make[1]: *** [debian/rules:32: override_dh_auto_test] Error 1
make[1]: Leaving directory '/home/zach/cuttlefish/frontend'
make: *** [debian/rules:17: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

With this fix, it seems that still get go request failed. Or am missing something here?

@ser-io
Copy link
Member Author

ser-io commented Apr 4, 2024

it seems you got Go installed, which is what this change was for, as you were able to run the tests.

what's happening here is that some unit tests are failing in your environment. I sent out #499 to improve the error messages in these tests, once the PR is merged feel free to send us the errors again for better triaging.

Thanks.

@spiritedRunning
Copy link
Contributor

spiritedRunning commented Apr 5, 2024

Thanks for your quick reply. After updating the code, got "operation timeout" error. Does it means it's my network issue? If so, what address does it try to access?

+ version=1.22.1
+ [[ 1.22.1 > 1.15 ]]
+ export 'GOPROXY=proxy.golang.org|proxy.golang.org|direct'
+ GOPROXY='proxy.golang.org|proxy.golang.org|direct'
+ go test ./...
go: downloading github.com/google/go-cmp v0.5.9
?   	github.com/google/android-cuttlefish/frontend/src/host_orchestrator	[no test files]
?   	github.com/google/android-cuttlefish/frontend/src/host_orchestrator/orchestrator/cvd	[no test files]
?   	github.com/google/android-cuttlefish/frontend/src/host_orchestrator/orchestrator/debug	[no test files]
?   	github.com/google/android-cuttlefish/frontend/src/host_orchestrator/orchestrator/testing	[no test files]
2024/04/05 19:32:08 request "POST /cvds" failed with error: invalid CreateCVDRequest: field CVD is empty
2024/04/05 19:32:08 request "GET /cvds/cvd-1/logs" failed with error: fork/exec /usr/bin/cvd: no such file or directory
2024/04/05 19:32:08 request "GET /operations/foo" failed with error: Operation not found: operation not found: foo
2024/04/05 19:32:08 request "GET /operations/328a6185-5039-4e4d-9653-29ba33dbf9cb/result" failed with error: Operation not found: operation not found: 328a6185-5039-4e4d-9653-29ba33dbf9cb
2024/04/05 19:32:08 request "POST /operations/foo/:wait" failed with error: Operation not found: operation not found: map key didn't exist
2024/04/05 19:32:08 request "POST /operations/foo/:wait" failed with error: Operation not found: operation not found: map key didn't exist
2024/04/05 19:32:09 request "POST /operations/0d0bad1e-fe76-44e4-96d3-32370a48a819/:wait" failed with error: Wait for operation timed out: waiting for operation timed out
2024/04/05 19:32:09 error removing host bug report file "/tmp/hostbugreport267e2bf4-07f6-4012-bad4-d54ed466ffbc": remove /tmp/hostbugreport267e2bf4-07f6-4012-bad4-d54ed466ffbc: no such file or directory
--- FAIL: TestCreateCVDSameTargetArtifactsIsDownloadedOnce (1.00s)
    testing.go:55: waiting for operation timed out
--- FAIL: TestCreateCVDVerifyRootDirectoriesAreCreated (1.00s)
    testing.go:55: waiting for operation timed out
--- FAIL: TestCreateCVDVerifyStartCVDCmdArgs (5.00s)
    --- FAIL: TestCreateCVDVerifyStartCVDCmdArgs/android_ci_build_default (1.00s)
        testing.go:55: waiting for operation timed out
    --- FAIL: TestCreateCVDVerifyStartCVDCmdArgs/android_ci_build_specific_main_build (1.00s)
        testing.go:55: waiting for operation timed out
    --- FAIL: TestCreateCVDVerifyStartCVDCmdArgs/android_ci_build_specific_kernel_build (1.00s)
        testing.go:55: waiting for operation timed out
    --- FAIL: TestCreateCVDVerifyStartCVDCmdArgs/android_ci_build_specific_bootloader_build (1.00s)
        testing.go:55: waiting for operation timed out
    --- FAIL: TestCreateCVDVerifyStartCVDCmdArgs/android_ci_build_with_system_image_build (1.00s)
        testing.go:55: waiting for operation timed out
2024/04/05 19:32:16 Failed parsing `cvd fleet` ouput. Output: 
...

--- FAIL: TestCreateCVDFailsDueCVDSubCommandExecution (1.00s)
    testing.go:55: waiting for operation timed out
--- FAIL: TestCreateCVDFailsDueTimeout (1.00s)
    testing.go:55: waiting for operation timed out
FAIL
FAIL	github.com/google/android-cuttlefish/frontend/src/host_orchestrator/orchestrator	10.146s
ok  	github.com/google/android-cuttlefish/frontend/src/host_orchestrator/orchestrator/artifacts	0.005s
FAIL
make[1]: *** [debian/rules:32: override_dh_auto_test] Error 1
make[1]: Leaving directory '/home/zach/cuttlefish/frontend'
make: *** [debian/rules:17: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

@spiritedRunning
Copy link
Contributor

spiritedRunning commented Apr 19, 2024

I also changed go version to 1.13.8, seems that has the same issue. please help to check it when you have time.
In addition, before the error I mentioned eariler there is another error:

+ [[ 1.13.8 > 1.15 ]]
+ go build -v -ldflags=-w
./build-webui.sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 21.3M  100 21.3M    0     0  9817k      0  0:00:02  0:00:02 --:--:-- 9817k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3153    0  3153    0     0  13708      0 --:--:-- --:--:-- --:--:-- 13649
node-v16.17.0-linux-x64.tar.xz: OK
npm ERR! code ERR_INVALID_URL
npm ERR! Invalid URL

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/zach/.npm/_logs/2024-04-19T13_32_21_710Z-debug-0.log

.npm/_logs/2024-04-19T13_32_21_710Z-debug-0.log as follows

2356 1328 verbose stack TypeError [ERR_INVALID_URL]: Invalid URL
2357 1328 verbose stack     at new NodeError (node:internal/errors:387:5)
2358 1328 verbose stack     at URL.onParseError (node:internal/url:564:9)
2359 1328 verbose stack     at parse (<anonymous>)
2360 1328 verbose stack     at new URL (node:internal/url:640:5)
2361 1328 verbose stack     at getProxyUri (/tmp/nodejs/node-v16.17.0-linux-x64/lib/node_modules/npm/node_modules/make-fetch-happen/lib/agent.js:160:53)
2362 1328 verbose stack     at getAgent (/tmp/nodejs/node-v16.17.0-linux-x64/lib/node_modules/npm/node_modules/make-fetch-happen/lib/agent.js:21:17)
2363 1328 verbose stack     at remoteFetch (/tmp/nodejs/node-v16.17.0-linux-x64/lib/node_modules/npm/node_modules/make-fetch-happen/lib/remote.js:31:17)
2364 1328 verbose stack     at cacheFetch (/tmp/nodejs/node-v16.17.0-linux-x64/lib/node_modules/npm/node_modules/make-fetch-happen/lib/cache/index.js:16:28)
2365 1328 verbose stack     at async fetch (/tmp/nodejs/node-v16.17.0-linux-x64/lib/node_modules/npm/node_modules/make-fetch-happen/lib/fetch.js:98:7)
2366 1329 verbose cwd /home/zach/android-cuttlefish/frontend/src/operator/webui
2367 1330 verbose Linux 5.15.0-102-generic
2368 1331 verbose node v16.17.0
2369 1332 verbose npm  v8.15.0
2370 1333 error code ERR_INVALID_URL
2371 1334 error Invalid URL
2372 1335 verbose exit 1
2373 1336 timing npm Completed in 3850ms

Because I found error like "POST /cvds" failed with error: invalid CreateCVDRequest: field CVD is empty". Could here be the root cause?
@ser-io Can you give some advices here? or where I can report this issue? Many thanks!

@ser-io
Copy link
Member Author

ser-io commented Apr 19, 2024

Hi Zach,

Apologize for the late reply, I have been working on a solution for the errors in comment #229 (comment). Expect some updates by next week.

I'll create an internal ticket for the new npm error.

@ser-io
Copy link
Member Author

ser-io commented Jun 12, 2024

Thanks for your quick reply. After updating the code, got "operation timeout" error. Does it means it's my network issue? If so, what address does it try to access?

+ version=1.22.1
+ [[ 1.22.1 > 1.15 ]]
+ export 'GOPROXY=proxy.golang.org|proxy.golang.org|direct'
+ GOPROXY='proxy.golang.org|proxy.golang.org|direct'
+ go test ./...
go: downloading github.com/google/go-cmp v0.5.9
?   	github.com/google/android-cuttlefish/frontend/src/host_orchestrator	[no test files]
?   	github.com/google/android-cuttlefish/frontend/src/host_orchestrator/orchestrator/cvd	[no test files]
?   	github.com/google/android-cuttlefish/frontend/src/host_orchestrator/orchestrator/debug	[no test files]
?   	github.com/google/android-cuttlefish/frontend/src/host_orchestrator/orchestrator/testing	[no test files]
2024/04/05 19:32:08 request "POST /cvds" failed with error: invalid CreateCVDRequest: field CVD is empty
2024/04/05 19:32:08 request "GET /cvds/cvd-1/logs" failed with error: fork/exec /usr/bin/cvd: no such file or directory
2024/04/05 19:32:08 request "GET /operations/foo" failed with error: Operation not found: operation not found: foo
2024/04/05 19:32:08 request "GET /operations/328a6185-5039-4e4d-9653-29ba33dbf9cb/result" failed with error: Operation not found: operation not found: 328a6185-5039-4e4d-9653-29ba33dbf9cb
2024/04/05 19:32:08 request "POST /operations/foo/:wait" failed with error: Operation not found: operation not found: map key didn't exist
2024/04/05 19:32:08 request "POST /operations/foo/:wait" failed with error: Operation not found: operation not found: map key didn't exist
2024/04/05 19:32:09 request "POST /operations/0d0bad1e-fe76-44e4-96d3-32370a48a819/:wait" failed with error: Wait for operation timed out: waiting for operation timed out
2024/04/05 19:32:09 error removing host bug report file "/tmp/hostbugreport267e2bf4-07f6-4012-bad4-d54ed466ffbc": remove /tmp/hostbugreport267e2bf4-07f6-4012-bad4-d54ed466ffbc: no such file or directory
--- FAIL: TestCreateCVDSameTargetArtifactsIsDownloadedOnce (1.00s)
    testing.go:55: waiting for operation timed out
--- FAIL: TestCreateCVDVerifyRootDirectoriesAreCreated (1.00s)
    testing.go:55: waiting for operation timed out
--- FAIL: TestCreateCVDVerifyStartCVDCmdArgs (5.00s)
    --- FAIL: TestCreateCVDVerifyStartCVDCmdArgs/android_ci_build_default (1.00s)
        testing.go:55: waiting for operation timed out
    --- FAIL: TestCreateCVDVerifyStartCVDCmdArgs/android_ci_build_specific_main_build (1.00s)
        testing.go:55: waiting for operation timed out
    --- FAIL: TestCreateCVDVerifyStartCVDCmdArgs/android_ci_build_specific_kernel_build (1.00s)
        testing.go:55: waiting for operation timed out
    --- FAIL: TestCreateCVDVerifyStartCVDCmdArgs/android_ci_build_specific_bootloader_build (1.00s)
        testing.go:55: waiting for operation timed out
    --- FAIL: TestCreateCVDVerifyStartCVDCmdArgs/android_ci_build_with_system_image_build (1.00s)
        testing.go:55: waiting for operation timed out
2024/04/05 19:32:16 Failed parsing `cvd fleet` ouput. Output: 
...

--- FAIL: TestCreateCVDFailsDueCVDSubCommandExecution (1.00s)
    testing.go:55: waiting for operation timed out
--- FAIL: TestCreateCVDFailsDueTimeout (1.00s)
    testing.go:55: waiting for operation timed out
FAIL
FAIL	github.com/google/android-cuttlefish/frontend/src/host_orchestrator/orchestrator	10.146s
ok  	github.com/google/android-cuttlefish/frontend/src/host_orchestrator/orchestrator/artifacts	0.005s
FAIL
make[1]: *** [debian/rules:32: override_dh_auto_test] Error 1
make[1]: Leaving directory '/home/zach/cuttlefish/frontend'
make: *** [debian/rules:17: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

Hi @spiritedRunning, an update on this, these unit tests were removed in favor of integration tests, these failures are no longer happening.

@spiritedRunning
Copy link
Contributor

spiritedRunning commented Jun 29, 2024

Hi @ser-io , thanks for your effort! Now this error is no longer happen.
But I found now has changed to new building method. so when I use tools/buildutils/build_packages.sh to build debs, it gives me the following error:

+++ dirname tools/buildutils/build_packages.sh
++ realpath tools/buildutils/../..
+ REPO_DIR=/home/zach/android-cuttlefish
++ dirname tools/buildutils/build_packages.sh
+ INSTALL_BAZEL=tools/buildutils/installbazel.sh
+ sudo tools/buildutils/installbazel.sh
Installing bazel
Reading package lists... Done
Building dependency tree       
Reading state information... Done
curl is already the newest version (7.68.0-1ubuntu2.22).
gnupg is already the newest version (2.2.19-3ubuntu2.2).
apt-transport-https is already the newest version (2.0.10).
0 upgraded, 0 newly installed, 0 to remove and 96 not upgraded.
curl: (7) Failed to connect to bazel.build port 443: Connection refused
gpg: no valid OpenPGP data found.

I didn't find the suitable place to submit this error, can you give some advice about this? Thanks.

@ser-io
Copy link
Member Author

ser-io commented Jul 1, 2024

Hi Zach, the cvd tool is now built with bazel, and it seems that the new installbazel.sh script is failing in your environment, specifically line: curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor >bazel-archive-keyring.gpg failing to download bazel's apt repository public key https://bazel.build/bazel-release.pub.gpg which might be due proxy restrictions.

@spiritedRunning
Copy link
Contributor

Hi, I tried to find the solution about this but failed, do we have other alternative method instead of bazel for building?

@ser-io
Copy link
Member Author

ser-io commented Jul 2, 2024

Hi Zach, we are only supporting bazel. Please explore other ways to install bazel in your system following https://bazel.build/install and feel free to modify https://github.com/google/android-cuttlefish/blob/main/tools/buildutils/installbazel.sh with your findings and send us a PR.

@spiritedRunning
Copy link
Contributor

spiritedRunning commented Jul 5, 2024

Hi Sergio, after I install bazel manually, the building process has been successful, and I raised a PR #607 for checking bazel installation status to prevent timeout error caused by repeated installation.

@RelaxYeyuan
Copy link

Sorry to interrupt, but I have a question, I am building cuttlefish-base_.deb and cuttlefish-user_.deb with the following commands

sudo apt install -y git devscripts equivs config-package-dev debhelper-compat golang curl
git clone https://github.com/google/android-cuttlefish
cd android-cuttlefish
for dir in base frontend; do
  pushd $dir
  # Install build dependencies
  sudo mk-build-deps -i
  dpkg-buildpackage -uc -us
  popd
done
sudo dpkg -i ./cuttlefish-base_*_*64.deb || sudo apt-get install -f
sudo dpkg -i ./cuttlefish-user_*_*64.deb || sudo apt-get install -f
sudo usermod -aG kvm,cvdnetwork,render $USER
sudo reboot

But when executing the command it says "dpkg-checkbuilddeps: error: Unmet build dependencies: bazel "
I installed bazel manually under /usr/bin and still get the error

~$ bazel version
WARNING: Invoking Bazel in batch mode since it is not invoked from within a workspace (below a directory having a WORKSPACE file).
OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
Build label: 7.3.0rc2
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Wed Aug 7 15:51:08 2024 (1723045868)
Build timestamp: 1723045868
Build timestamp as int: 1723045868

I tried to run tools/buildutils/installbazel.sh but because of the proxy I can't download https://bazel.build/bazel-release.pub.gpg
Can you give some help? Thanks!

@spiritedRunning 兄弟你有遇到这个问题吗?

@jemoreira
Copy link
Member

Sorry to interrupt, but I have a question, I am building cuttlefish-base__.deb and cuttlefish-user__.deb with the following commands

sudo apt install -y git devscripts equivs config-package-dev debhelper-compat golang curl
git clone https://github.com/google/android-cuttlefish
cd android-cuttlefish
for dir in base frontend; do
  pushd $dir
  # Install build dependencies
  sudo mk-build-deps -i
  dpkg-buildpackage -uc -us
  popd
done
sudo dpkg -i ./cuttlefish-base_*_*64.deb || sudo apt-get install -f
sudo dpkg -i ./cuttlefish-user_*_*64.deb || sudo apt-get install -f
sudo usermod -aG kvm,cvdnetwork,render $USER
sudo reboot

But when executing the command it says "dpkg-checkbuilddeps: error: Unmet build dependencies: bazel " I installed bazel manually under /usr/bin and still get the error

~$ bazel version
WARNING: Invoking Bazel in batch mode since it is not invoked from within a workspace (below a directory having a WORKSPACE file).
OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
Build label: 7.3.0rc2
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Wed Aug 7 15:51:08 2024 (1723045868)
Build timestamp: 1723045868
Build timestamp as int: 1723045868

I tried to run tools/buildutils/installbazel.sh but because of the proxy I can't download https://bazel.build/bazel-release.pub.gpg Can you give some help? Thanks!

@spiritedRunning 兄弟你有遇到这个问题吗?

It seems that bazel was not installed as a debian package, so the dependency from the debian builder point of view is still unmet, as it depends on the bazel package being installed in the system, not the binary being available in /usr/bin or similar.

If you can't install the bazel package in your system you won't be able to build in a supported way. You could try deleting the bazel dependency from base/debian/control and/or frontend/debian/control as it's only a build time dependency and you already installed it manually, but keep in mind that that's only a temporary workaround not guaranteed to work in the long term.

@RelaxYeyuan
Copy link

Thank you for your reply! I tried switching proxy mode and successfully downloaded bazel.

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

Successfully merging this pull request may close these issues.

4 participants