Skip to content

darwin: ld64.lld undefined symbol internal/reflectlite.TypeOf in waitgroup/goexit #1745

@luoliwoshang

Description

@luoliwoshang

Summary

On macOS (darwin), llgo run can fail with linker errors for internal/reflectlite symbols.

Affected cases

  • cl/_testlibgo/waitgroup
  • TestRunFromTestgo/goexit (or direct run in cl/_testgo/goexit)

Reproduction

cd cl/_testlibgo/waitgroup
llgo run in.go

and

cd cl/_testgo/goexit
llgo run in.go

Actual

ld64.lld: error: undefined symbol: internal/reflectlite.TypeOf
>>> referenced by ... (symbol errors.init+0x83)

ld64.lld: error: undefined symbol: internal/reflectlite.init
>>> referenced by ... (symbol errors.init+0x19)

clang++: error: linker command failed with exit code 1
exit status 1

Expected

Both cases should build and run (or fail with a deterministic, expected test reason), but should not fail with undefined internal reflectlite symbols at link time.

Notes

This issue is reported from branch/environment where TestRunFromTestgo/goexit and waitgroup recheck is being done.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions