How to debug a linker error during swift test?


When I run the test suite from the xcode, it runs correctly. However, when I run it from the command line with swift test, I get a linker error:

// a lot of lines before
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[9/10] Linking MiniFrame.ServerPackageTests
error: fatalError

The output is very long. Can anyone recommend what to look for in order to find the cause of this error? swift package reset did not help this time.

Lastly, I found this line in the output: ld: Undefined symbols: Could this be the cause? But which symbol is undefined?

Thank you.