templates icon indicating copy to clipboard operation
templates copied to clipboard

[Rust template] Clang error

Open Gau-thier opened this issue 8 months ago • 2 comments

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!

Gau-thier avatar Jun 13 '24 15:06 Gau-thier