• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 28578038934
93%

Build:
DEFAULT BRANCH: main
Ran 02 Jul 2026 09:06AM UTC
Jobs 11
Files 1766
Run time 4min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

02 Jul 2026 08:58AM UTC coverage: 92.827%. Remained the same
28578038934

push

github

web-flow
Pass the same set of object files when retrying linking for cgo (#23447)

With the latest `main` branch, `pants test
src/python/pants/backend/go/util_rules/cgo_test.py:tests` fails in my
environment:

```
============================= test session starts ==============================
collecting ... collected 5 items

src/python/pants/backend/go/util_rules/cgo_test.py::test_cgo_compile PASSED [ 20%]
src/python/pants/backend/go/util_rules/cgo_test.py::test_cgo_with_cxx_source FAILED [ 40%]
src/python/pants/backend/go/util_rules/cgo_test.py::test_cgo_with_objc_source FAILED [ 60%]
src/python/pants/backend/go/util_rules/cgo_test.py::test_cgo_with_fortran_source FAILED [ 80%]
src/python/pants/backend/go/util_rules/cgo_test.py::test_cgo_with_embedded_static_library PASSED [100%]

=================================== FAILURES ===================================
```

The 3 tests fail with the same linker error:

```
ValueError: cgo binary link failed:
stdout:

stderr:
Undefined symbols for architecture arm64:
  "_main", referenced from:
      <initial-undefines>
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```

(found this issue during playing around the tests in
https://github.com/pantsbuild/pants/pull/23439)

In `cgo.py`, linking of object files are retried with additional linker
options:

https://github.com/pantsbuild/pants/blob/main/src/python/pants/backend/go/util_rules/cgo.py#L500-L559
For relatively simple case, linking succeeds at the 1st try. In the case
of ObjC, C++ and Fortran tests, linking fails (due to lack of the
language's stdlib?) and retried. `_main` (cgo-generated dummy function)
resides in `_cgo_main.o` file and is required by the linker, but the
object file is not included in the linker flags at the 2nd try.

My environment:
- OS: macOS 15.7.7
- gcc: clang-1700.6.4.2
- python: 3.14.6
- go: 1.26.2

1 of 1 new or added line in 1 file covered. (100.0%)

93775 of 101021 relevant lines covered (92.83%)

3.7 hits per line

Jobs
ID Job ID Ran Files Coverage
1 test_python_linux_x86_64_2/10 - 28578038934.1 02 Jul 2026 09:08AM UTC 1211
58.57
GitHub Action Run
2 test_python_linux_arm64 - 28578038934.2 02 Jul 2026 09:06AM UTC 1190
51.74
GitHub Action Run
3 test_python_linux_x86_64_6/10 - 28578038934.3 02 Jul 2026 09:07AM UTC 1202
49.24
GitHub Action Run
4 test_python_linux_x86_64_0/10 - 28578038934.4 02 Jul 2026 09:07AM UTC 1231
57.26
GitHub Action Run
5 test_python_linux_x86_64_7/10 - 28578038934.5 02 Jul 2026 09:09AM UTC 1212
50.75
GitHub Action Run
6 test_python_linux_x86_64_3/10 - 28578038934.6 02 Jul 2026 09:08AM UTC 1209
53.57
GitHub Action Run
7 test_python_linux_x86_64_5/10 - 28578038934.7 02 Jul 2026 09:07AM UTC 1224
59.91
GitHub Action Run
8 test_python_linux_x86_64_4/10 - 28578038934.8 02 Jul 2026 09:12AM UTC 1241
58.85
GitHub Action Run
9 test_python_linux_x86_64_1/10 - 28578038934.9 02 Jul 2026 09:09AM UTC 1207
48.77
GitHub Action Run
10 test_python_linux_x86_64_9/10 - 28578038934.10 02 Jul 2026 09:09AM UTC 1218
53.76
GitHub Action Run
11 test_python_linux_x86_64_8/10 - 28578038934.11 02 Jul 2026 09:10AM UTC 1210
52.77
GitHub Action Run
Source Files on build 28578038934
  • Tree
  • List 1766
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #28578038934
  • ccb7f45a on github
  • Prev Build on main (#28575780130)
  • Next Build on main (#28619476844)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc