kubernetes-sigs / kueue

Kubernetes-native Job Queueing
https://kueue.sigs.k8s.io
Apache License 2.0
1.36k stars 239 forks source link

Running `make test` on MacOS Sonoma with golang go1.22.5 errors with `has malformed LC_DYSYMTAB` error #3196

Open akram opened 19 hours ago

akram commented 19 hours ago

What happened: run make test it will crash with the following error:

=== Errors
ld: warning: '/private/var/folders/36/kbjrd7bn4cbgz8dpt50n5k5w0000gp/T/go-link-3088648823/000014.o' has malformed LC_DYSYMTAB, expected 98 undefined symbols to start at index 1626, found 95 undefined symbols starting at index 1626
ld: warning: '/private/var/folders/36/kbjrd7bn4cbgz8dpt50n5k5w0000gp/T/go-link-845880015/000014.o' has malformed LC_DYSYMTAB, expected 98 undefined symbols to start at index 1626, found 95 undefined symbols starting at index 1626
ld: warning: '/private/var/folders/36/kbjrd7bn4cbgz8dpt50n5k5w0000gp/T/go-link-99404289/000014.o' has malformed LC_DYSYMTAB, expected 98 undefined symbols to start at index 1626, found 95 undefined symbols starting at index 1626
ld: warning: '/private/var/folders/36/kbjrd7bn4cbgz8dpt50n5k5w0000gp/T/go-link-2652475332/000014.o' has malformed LC_DYSYMTAB, expected 98 undefined symbols to start at index 1626, found 95 undefined symbols starting at index 1626

What you expected to happen: the build to succeed How to reproduce it (as minimally and precisely as possible):

run make test

Anything else we need to know?:

Environment:

akram commented 19 hours ago

Setting GOFLAGS to the following value make it run properly.

GOFLAGS=-ldflags=-extldflags=-Wl,-ld_classic make test

seen on the following issue: https://github.com/golang/go/issues/61229#issuecomment-1952798326

IrvingMg commented 16 hours ago

As mentioned in https://github.com/golang/go/issues/61229#issue-1793742809 as well, those are just warnings, not errors. Therefore, even if you see those messages in Kueue, they are not crashing the tests.

NOTE -- please read

If you see lines starting with ld: warning but not other outputs, they are just warnings, not errors. You should still get a working binary, if there is no other output. Please only report if you see a link error, or a broken binary, or a warning that is not mentioned in the "warnings" section below. Thanks.

See #61229 (comment) for more notes about malformed LC_DYSYMTAB warning. Thanks.

akram commented 4 hours ago

thanks @IrvingMg

You are correct, they are not crashing; I was thinking it was crashing, but they are just in error in my case:

=== Errors
ld: warning: '/private/var/folders/36/kbjrd7bn4cbgz8dpt50n5k5w0000gp/T/go-link-3088648823/000014.o' has malformed LC_DYSYMTAB, expected 98 undefined symbols to start at index 1626, found 95 undefined symbols starting at index 1626
ld: warning: '/private/var/folders/36/kbjrd7bn4cbgz8dpt50n5k5w0000gp/T/go-link-845880015/000014.o' has malformed LC_DYSYMTAB, expected 98 undefined symbols to start at index 1626, found 95 undefined symbols starting at index 1626
ld: warning: '/private/var/folders/36/kbjrd7bn4cbgz8dpt50n5k5w0000gp/T/go-link-99404289/000014.o' has malformed LC_DYSYMTAB, expected 98 undefined symbols to start at index 1626, found 95 undefined symbols starting at index 1626
ld: warning: '/private/var/folders/36/kbjrd7bn4cbgz8dpt50n5k5w0000gp/T/go-link-2652475332/000014.o' has malformed LC_DYSYMTAB, expected 98 undefined symbols to start at index 1626, found 95 undefined symbols starting at index 1626

DONE 1585 tests, 4 errors in 50.377s

where, if I run the case with the mentioned parameters they will run without any erro

(base) akram@wadez-m1 kueue % GOFLAGS=-ldflags=-extldflags=-Wl,-ld_classic make test
[...]
∅  apis/kueue/v1alpha1 (18ms) (coverage: 0.0% of statements)
∅  apis/kueue/v1beta1 (19ms) (coverage: 0.0% of statements)
∅  apis/visibility/v1alpha1/openapi (21ms) (coverage: 0.0% of statements)
[...]
✓  pkg/util/useragent (1.589s) (coverage: 0.0% of statements in ./...)
✓  pkg/util/wait (1.565s) (coverage: 0.1% of statements in ./...)
✓  pkg/visibility/api/rest (1.597s) (coverage: 2.1% of statements in ./...)
✓  pkg/webhooks (1.725s) (coverage: 2.3% of statements in ./...)
✓  pkg/workload (1.584s) (coverage: 2.9% of statements in ./...)
✓  pkg/scheduler (7.321s) (coverage: 12.9% of statements in ./...)

DONE 1585 tests in 22.354s