Failing tests in 1.21.6 bootstrap

I need help with bootstrapping 1.21.6. A few tests fail and I see there are requirements about gdb, swig etc, however, they are hard to guess.

3 errors fatal error: trace: ReadTrace got invalid frequency in
os/signal -src/runtime/panic.go
syscall - exec_linux_test.go:354: Cmd failed with err fork/exec /tmp/go-build1662809362/b1680/syscall.test: no such file or directory, it is repeated aslo with TestUnshareUidGidMapping
runtime/trace -runtime/panic.go

I suppose these errors are generated by 2 tests namely
TestUnshareUidGidMapping TestAnalyzeAnnotations but they write the trace in parallel and it is a mess.

7 fails in git tests in vcstest_test.go

It might be an outdated git?

And one more:
go tool dist test -run=^archive/tar$
Failed: exit status 1

Please tell what I should install or how to fix them.

1 Like

1. Address Missing Dependencies:

  • Install gdb and swig: These are essential for parts of the Go build process. Use your system’s package manager to install them:
    • Ubuntu/Debian: sudo apt install gdb swig
    • Fedora/CentOS: sudo dnf install gdb swig
    • macOS: brew install gdb swig

2. Resolve “Cmd failed with err fork/exec…” Errors:

  • Check file permissions: Ensure temporary build files are created with correct permissions:
    • Temporarily disable any security software that might interfere with file creation.
    • Verify that the user running the build has write permissions in /tmp .

3. Fix “trace: ReadTrace got invalid frequency” Errors:

  • Review trace configuration: Check if any trace-related tools or settings conflict with the Go build process.
  • Upgrade Go version: Consider updating to a newer version (1.21.7 or later) if available, as it might have bug fixes related to trace functionality.

4. Address Failed Git Tests:

  • Upgrade Git: Ensure you have the latest version of Git installed.
  • Verify environment variables: Check if any Git-related environment variables are set incorrectly.
  • Review test scripts: If possible, examine the failing Git test scripts to pinpoint specific issues.

5. Troubleshoot “archive/tar” Test Failure:

  • Inspect logs: Seek any error messages or clues in the build logs related to archive/tar tests.
  • Review test code: If possible, examine the test code for potential issues or dependencies.
  • Consider cross-compiling: If building for a different architecture, ensure you have the necessary cross-compilation tools and dependencies.
  • Official documentation for the software/project you’re working with. They often have troubleshooting sections or known issues lists.

I was unable to read more detailed information about the bootstrap. The system apps are outdated and thus cannot be updated. Rebuilding gdb and swig is easy. However, rebuilding git is quite difficult since gnutls depends on many apps. Is it good to make go depend only on openssl like python does? Information about permissions etc is nowhere to read,

How about composing a small INSTALL file with the requirements what is required in the src. Anybody downloads, unzips and does what is required for the specific version.

visit this page for read more info