# Compilation: handle system C compiler not found · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/65bea514ae3860a5169d044d22ece7170c445bd3)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 65bea514ae3860a5169d044d22ece7170c445bd3

Requested commit: 65bea514ae3860a5169d044d22ece7170c445bd3

Commit: 65bea514ae3860a5169d044d22ece7170c445bd3

Tree: 64bc55e984c908f1056fdfd101757612d119d2fc

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
Compilation: handle system C compiler not found

When linking libc and compiling natively, Zig tries to integrate with
the system C compiler. However, this caused Zig to fail when no system C
compiler is installed, despite the fact that Zig is perfectly capable of
compiling & linking libc without one.

This commit makes Zig fall back to using its own ability to provide libc
in the case that no C compiler is installed. For glibc, it means
sometimes getting the warning "zig cannot build new glibc version abc,
providing instead xyz".

Ideally, Zig would do some more validation about the system libraries
being linked against, and report an error in case it could not provide
the exact correct libc version of the system libraries (or that the
system libraries themselves conflict with each other), however, I think
it is fair to call that a separate enhancement.

```

## Parents

- [aec0e595f2a679f10e927ea4531b8f58ced7080a](https://git.cafe/gitcafe/zig/commit/aec0e595f2a679f10e927ea4531b8f58ced7080a?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/65bea514ae3860a5169d044d22ece7170c445bd3?format=markdown)
