Re: Our ld doesn't like elf_aarch64: error: unknown emulation

From: Nuno Teixeira <eduardo_at_freebsd.org>
Date: Mon, 06 May 2024 10:40:22 UTC
Hello,

I instructed port to use binutils from ports (version 2.40 native) instead
of base:

`/usr/local/bin/ld: unrecognised emulation mode: elf_aarch64`

```
/usr/local/bin/ld -V |grep aarch64
   aarch64cloudabi
   aarch64cloudabib
   aarch64elf
   aarch64elf32
   aarch64elf32b
   aarch64elfb
   aarch64fbsd
   aarch64fbsdb
   aarch64haiku
   aarch64linux
   aarch64linux32
   aarch64linux32b
   aarch64linuxb
   aarch64pe
```

Any clues about "elf_aarch64" and "aarch64elf" mismatch?

Thanks,

Nuno Teixeira <eduardo@freebsd.org> escreveu (domingo, 5/05/2024 à(s)
09:57):

> Hello all,
>
> Trying to figure out why sysutils/slurm-wlm fails to build on aarch64.
>
> `ld: error: unknown emulation: elf_aarch64`
>
> Upstream answer:
>
> "All I can think is that your ld doesn't like elf_aarch64, from the log
> your posting it looks that's being injected from the FreeBSD ports system.
> Looking at the man page for ld on Linux it says:
>
> -m emulation Emulate the emulation linker. You can list the available
> emulations with the --verbose or -V options.
>
> So I'd guess you'd need to look at what that version of ld supports and
> then update the ports system to match."
> Does devel/binutils should be used to fix that? And how?
>
> Full log:
>
> https://pkg-status.freebsd.org/ampere2/data/main-arm64-default/pb78025a96ed9_s3c1be0b2615/logs/slurm-wlm-23.11.6.log
>
> Thanks in advance,
> --
> Nuno Teixeira
> FreeBSD UNIX:  <eduardo@FreeBSD.org>   Web:  https://FreeBSD.org
>


-- 
Nuno Teixeira
FreeBSD UNIX:  <eduardo@FreeBSD.org>   Web:  https://FreeBSD.org