Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 940473 - app-editors/zed-0.153.6: fails to compile with LLVM 18, mold linker and musl
Summary: app-editors/zed-0.153.6: fails to compile with LLVM 18, mold linker and musl
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Robert G. Siebeck
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2024-09-29 07:24 UTC by truffle074
Modified: 2024-11-06 11:41 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (build.log,765.47 KB, text/x-log)
2024-09-29 07:24 UTC, truffle074
Details
emerge --info (emerge-info.txt,7.74 KB, text/plain)
2024-09-29 07:24 UTC, truffle074
Details

Note You need to log in before you can comment on or make changes to this bug.
Description truffle074 2024-09-29 07:24:35 UTC
Created attachment 904129 [details]
build log

This version of app-editors/zed fails to build with a linker error:

```
mold: warning: unknown command line option: -z nostart-stop-gc
mold: fatal: could not open plugin file: Error loading shared library : Invalid argument
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```

I had a look at the ebuild and it looks like this it due to the "-z nostart-stop-gc" being adding in to stop an LLVM 18 bug:

```
# linking error with llvm-18
export RUSTFLAGS="${RUSTFLAGS} -C link-args=-Wl,-z,nostart-stop-gc"
```

Since the ebuild manually overrides the linker to mold, I wasn't able to fall back to lld like normal.

I've been playing around with some of the flags and different versions of mold to see if it'll work but haven't had any luck so far
Comment 1 truffle074 2024-09-29 07:24:56 UTC
Created attachment 904130 [details]
emerge --info
Comment 2 Robert G. Siebeck 2024-10-30 20:07:40 UTC
According to https://zed.dev/blog/remote-development , upstream doesn't support musl.
Comment 3 Larry the Git Cow gentoo-dev 2024-11-06 11:41:48 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb67ab670d4de98aac954ee861121348aed8ac4f

commit cb67ab670d4de98aac954ee861121348aed8ac4f
Author:     Robert Siebeck <gentoo.2019@r123.de>
AuthorDate: 2024-10-30 20:09:59 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2024-11-06 11:40:15 +0000

    features/musl/package.mask: mask app-editors/zed
    
    Not supported by upstream, see https://zed.dev/blog/remote-development
    
    Closes: https://bugs.gentoo.org/940473
    Signed-off-by: Robert Siebeck <gentoo.2019@r123.de>
    Closes: https://github.com/gentoo/gentoo/pull/39163
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 profiles/features/musl/package.mask | 4 ++++
 1 file changed, 4 insertions(+)