[Rust template] Clang error

Open
#85 2 comments 0 reactions 0 assignees View on GitHub

@tomberek is already working on this.

Since Sep 14, 2026.

  • #108 by @tomberek — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
rust
Domain
build-system

Research direction

Start with the generated flake.nix and shell.nix, then reproduce the reported Mac M1 failure by adding sqlx and running cargo build. Trace the clang linker error for the missing SystemConfiguration framework; done means the Rust template provides a documented or incorporated workaround that allows this build to succeed.

Written by the indexing model from the issue text.

Description

Hi, thanks for these useful templates!

Unfortunately, the rust one can face the error: linking with cc failed: exit status: 1 error on Mac M1...

It worked perfectly, until I run cargo add sqlx then try to cargo build:

Compiling sqlx-macros v0.7.4
error: linking with `cc` failed: exit status: 1
[...]
  = note: ld: framework not found SystemConfiguration
          clang-16: error: linker command failed with exit code 1 (use -v to see invocation)

error: could not compile `sqlx-macros` (lib) due to 1 previous error

I know this error is linked to clang but I don't find any way to solve it on my Mac M1...
That would be great to have inside the template, the workaround to avoid any other Mac user to face this error.

I don't have any modifications on the flake.nix or the shell.nix generated and created by the template.

Cheers and thanks again!

Dominant language
Nix
Stars
766
Forks
105
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NixOS/templates

All issues in NixOS/templates

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.