Skip to content

linker/compiler errors are silently consumed and don't appear in stdout or stderr #7114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
compnerd opened this issue Nov 21, 2023 · 3 comments · Fixed by #7130
Closed

linker/compiler errors are silently consumed and don't appear in stdout or stderr #7114

compnerd opened this issue Nov 21, 2023 · 3 comments · Fixed by #7130
Assignees
Labels

Comments

@compnerd
Copy link
Member

Description

Some recent work that @neonichu (or @tomerd?) did to silence some output seems to have resulted in linker errors being silently dropped making it difficult to identify build failures.

Expected behavior

Linker errors should be presented to the user.

Actual behavior

No response

Steps to reproduce

swift build a project that has undefined references.

Swift Package Manager version/commit hash

No response

Swift & OS version (output of swift --version ; uname -a)

Windows 11

@compnerd compnerd added the bug label Nov 21, 2023
@MaxDesiatov MaxDesiatov self-assigned this Nov 27, 2023
@al45tair
Copy link
Contributor

It also seems to have silenced some compiler errors too.

...
/home/alastair/Source/grpc-swift/.build/checkouts/swift-nio/Sources/CNIOLinux/shim.c:112:25: error: unknown type name 'cpu_set_t'
void CNIOLinux_CPU_ZERO(cpu_set_t *set) {
                        ^
/home/alastair/Source/grpc-swift/.build/checkouts/swift-nio/Sources/CNIOLinux/shim.c:113:5: error: call to undeclared function 'CPU_ZERO'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    CPU_ZERO(set);
    ^
/home/alastair/Source/grpc-swift/.build/checkouts/swift-nio/Sources/CNIOLinux/shim.c:116:34: error: unknown type name 'cpu_set_t'
int CNIOLinux_CPU_ISSET(int cpu, cpu_set_t *set) {
                                 ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

only now appears if I pass -v.

@MaxDesiatov MaxDesiatov changed the title Linker Errors are silently consumed by SPM Linker Errors are silently consumed and don't appear in stdout or stderr Nov 27, 2023
@compnerd
Copy link
Member Author

@al45tair I just happened to run into that same thing on Windows!

@compnerd compnerd changed the title Linker Errors are silently consumed and don't appear in stdout or stderr linker/compiler errors are silently consumed and don't appear in stdout or stderr Nov 27, 2023
@neonichu
Copy link
Contributor

Seems like we should revert #7078 -- we'll need a broader change to address the issue with code-signing output.

MaxDesiatov added a commit that referenced this issue Nov 28, 2023
### Motivation:

With recent changes linker/compiler errors are silently consumed and
don't appear in stdout or stderr.

### Modifications:

This reverts commit 4c35491.

### Result:

Resolves #7114.
MaxDesiatov added a commit that referenced this issue Nov 29, 2023
Cherry-pick of #7130.

### Motivation:

With recent changes linker/compiler errors are silently consumed and
don't appear in stdout or stderr.

### Modifications:

This reverts commit 4c35491.

### Result:

Resolves #7114.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants