Skip to content

Problem with CppCompilerAndLinker=musl-gcc #119318

@DeafMan1983

Description

@DeafMan1983

Description

Why does dotnet 10 Preview 7 force to use clang against musl-gcc?

dotnet publish -c Release -r linux-musl-x64 -p:StripSymbols=true -p:CppComilerAndLinker=/usr/bin/musl-gcc  -p:ExtraLinkerArguments="-L/opt/Gtk4Latest/MUSL/l
ib -L/usr/lib/x86_64-linux-musl -I/opt/Gtk4Latest/MUSL/include"
Restore complete (0.7s)
    info NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
  03_SimpleXCB_BASIC_WM failed with 2 error(s) and 1 warning(s) (0.9s) → bin/Release/net10.0/linux-musl-x64/03_SimpleXCB_BASIC_WM.dll
    clang : warning : argument unused during compilation: '-pie' [-Wunused-command-line-argument]
    clang : error : linker command failed with exit code 1 (use -v to see invocation

How do I switch to musl-gcc?

I am working on Ubuntu 24.04.3

Reproduction Steps

I have tried to force to use gcc / musl-gcc

Expected behavior

Why does clang rush again gcc / musl-gcc?

Actual behavior

same like problem with annoying clang jumped

Regression?

No response

Known Workarounds

No response

Configuration

Exe net10.0 _03_SimpleXCB_BASIC_WM enable enable true true link true linux-x64 true

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-NativeAOT-coreclrquestionAnswer questions and provide assistance, not an issue with source code or documentation.

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions