Score:0

How to install lld in Ubuntu using apt-get install

se flag

I want to use the lld linker in my project.

I saw this Question but the solution didn't use apt-get.

I tried:

sudo apt-get install llvm
sudo apt-get install clang
sudo apt-get install clang-tools

Nothing worked.

I added to the Cmake -fuse-ld=lld:

set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -fuse-ld=lld")

I have a compilation error:

collect2: fatal error: cannot find 'ld'

Can't find lld:

lld --version
command not found: lld

Edit-1

I am using Ubuntu Ubuntu 18.04.6 LTS on arm architecture

Edit-2

It's not essential to the problem because Ubuntu 18.04 LTS has reached the end of its standard support life but for the sake of good order I will give full details:

arm64 architecture, universe repository is enabled

guiverc avatar
cn flag
You've not provided any OS/release, though you do mention Ubuntu (but not product & release). The `lld` package is available I see for most releases/architectures (*but not all*), but as we don't know yours, we cannot provide much specifics. Have you tried a simple package install? for your *unstated* Ubuntu product/release/architecture?
guiverc avatar
cn flag
Does this answer your question? [How do I enable the "Universe" repository?](https://askubuntu.com/questions/148638/how-do-i-enable-the-universe-repository) based on `lld | 1:15.0-56~exp2 | lunar/universe | amd64, arm64, armhf, i386, ppc64el, riscv64` & lack of details provided by OP
guiverc avatar
cn flag
[Ubuntu 18.04 LTS has reached the end of it's *standard* support life](https://fridge.ubuntu.com/2023/05/13/extended-security-maintenance-for-ubuntu-18-04-bionic-beaver-begins-31-may-2023/) thus is now off-topic here unless your question is specific to helping you move to a *fully supported* release of Ubuntu. Ubuntu 18.04 ESM support is available, but not on-topic here, see https://askubuntu.com/help/on-topic See also https://ubuntu.com//blog/18-04-end-of-standard-support
guiverc avatar
cn flag
Its always helpful if you're specific with details; if you look back at the package details I provided of it existing for *lunar* you'll note its available for multiple ARM architectures... but you don't mention which only its ARM? Either way you're off-topic with this question given you're using an EOSS release, with only 20.04, 22.04, 22.10 & 23.04 now in *standard* Support & thus on-topic on this site.
lior.i avatar
se flag
@guiverc, Thank you so much for the information, I was surprised to know that `Ubuntu 18.04 LTS has reached the end of its standard support life` so sadly I will have to wait with the `lld` linker until we will update our system, this is one more reason to do it.
guiverc avatar
cn flag
18.04 tells you it was the 2018-April release from the *year.month* format used for Ubuntu releases (2000 being subtracted from the *year*), thus adding 5 years of *standard* support isn't hard to work out in future. Warnings of the approaching EOSS also go out six weeks before EOSS (or EOL when its that) so watching for notices shouldn't be hard to detect either.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.