>Synopsis:Port textproc/aspell unusable on mips64el: USE_LLD=No override fails,
>manual edit of core/Makefile required
>Category:ports
>Environment:
System : OpenBSD 7.8
Details : OpenBSD 7.8 (GENERIC) #89: Thu Oct 9 11:13:45 GMT 2025
[email protected]:/usr/src/sys/arch/loongson/compile/GENERIC
Architecture: OpenBSD.loongson
Machine : loongson
>Description:
The `textproc/aspell` port is currently broken on mips64el (loongson)
architecture in OpenBSD 7.8.
The root cause is that the portâs core Makefile
(`/usr/ports/textproc/aspell/core/Makefile`) forces `USE_LLD = Yes` for
mips64/mips64el to avoid a historical ICE in `ld.bfd`. However, the current
`ld.lld` linker fails with numerous "invalid local symbol" errors when linking
against core system libraries (libc++abi.so.9.0, libpthread.so.28.0,
libm.so.10.1), preventing any compilation.
The critical issue is that the documented workaround of overriding with `env
USE_LLD=No` **does NOT work**. The build still fails with the same `ld.lld`
errors. The **only** successful workaround is to manually comment out the
`USE_LLD = Yes` assignment in the core Makefile itself.
This indicates two potential bugs:
1. The primary bug: `ld.lld` is incompatible with the symbol format of system
libraries on mips64el in OpenBSD 7.8.
2. The secondary bug: The `USE_LLD` variable override from the environment is
not being respected, possibly due to how `core/Makefile` is evaluated or
included within the ports framework.
The problematic code block in `/usr/ports/textproc/aspell/core/Makefile` is:
use ld.lld on mips64 to avoid ld.bfd ICE:
/usr/bin/ld: BFD 2.17 internal error, aborting at
/usr/src/gnu/usr.bin/binutils-2.17/bfd/elfxx-mips.c line 4797 in
mips_elf_create_dynamic_relocation
.if ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el"
USE_LLD = Yes
.endif
>How-To-Repeat:
1. On an OpenBSD 7.8 loongson (mips64el) system:
cd /usr/ports/textproc/aspell
2. Attempt the standard build (will fail):
make
3. Attempt the suggested workaround (will also fail, demonstrating the
secondary bug):
env USE_LLD=No make
4. Observe that both fail with identical `ld.lld` linker errors about invalid
symbols (e.g., `abort_message`, `_thread_pagesize`, `_ItL_atanlo`).
5. The only way to succeed is to manually edit
`/usr/ports/textproc/aspell/core/Makefile` to disable the `USE_LLD = Yes`
assignment (e.g., by commenting out the `.if` block), then run `make`.
>Fix:
The immediate fix for users is to manually edit
`/usr/ports/textproc/aspell/core/Makefile` by commenting out or removing the
conditional block that sets `USE_LLD = Yes`.
For the port maintainers, the required fixes are likely:
1. Investigate and resolve the incompatibility between `ld.lld` and mips64el
system libraries in OpenBSD 7.8.
2. Ensure that the `USE_LLD` variable can be reliably overridden from the build
environment when building this port, or adjust the conditional logic.
3. Re-evaluate whether the original `ld.bfd` ICE (from binutils 2.17) is still
present in the current toolchain, which might make the forced use of `ld.lld`
unnecessary for this port.
dmesg:
OpenBSD 7.8 (GENERIC) #89: Thu Oct 9 11:13:45 GMT 2025
[email protected]:/usr/src/sys/arch/loongson/compile/GENERIC
real mem = 1073741824 (1024MB)
avail mem = 1051803648 (1003MB)
random: good seed from bootblocks
mainbus0 at root: Lemote Lynloong
cpu0 at mainbus0: STC Loongson2F CPU 800 MHz, STC Loongson2F FPU
cpu0: cache L1-I 64KB D 64KB 4 way, L2 512KB 4 way
bonito0 at mainbus0: memory and PCI-X controller, rev 1
pci0 at bonito0 bus 0
rl0 at pci0 dev 6 function 0 "Realtek 8139" rev 0x10: irq 4, address
00:23:9e:00:71:c5
rlphy0 at rl0 phy 0: RTL internal PHY
sisfb0 at pci0 dev 8 function 0 "SiS 315 Pro VGA" rev 0x00: 1360x768, 16bpp
wsdisplay0 at sisfb0 mux 1: console (std, vt100 emulation)
glxpcib0 at pci0 dev 14 function 0 "AMD CS5536 ISA" rev 0x03: rev 3, 32-bit
3579545Hz timer, watchdog, gpio, i2c
isa0 at glxpcib0
mcclock0 at isa0 port 0x70/2: mc146818 or compatible
gpio1 at glxpcib0: 32 pins
iic1 at glxpcib0
spdmem0 at iic1 addr 0x50: 1GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
glxclk0 at glxpcib0
pciide0 at pci0 dev 14 function 2 "AMD CS5536 IDE" rev 0x01: DMA, channel 0
wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: <SAMSUNG HM161HI>
wd0: 16-sector PIO, LBA48, 152627MB, 312581808 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 ignored (disabled)
auglx0 at pci0 dev 14 function 3 "AMD CS5536 Audio" rev 0x01: isa irq 9, CS5536
AC97
ac97: codec id 0x414c4760 (Avance Logic ALC655 rev 0)
audio0 at auglx0
ohci0 at pci0 dev 14 function 4 "AMD CS5536 USB" rev 0x02: isa irq 11, version
1.0, legacy support
ehci0 at pci0 dev 14 function 5 "AMD CS5536 USB" rev 0x02: isa irq 11
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "AMD EHCI root hub" rev 2.00/1.00
addr 1
usb1 at ohci0: USB revision 1.0
uhub1 at usb1 configuration 1 interface 0 "AMD OHCI root hub" rev 1.00/1.00
addr 1
apm0 at mainbus0
vscsi0 at root
scsibus0 at vscsi0: 256 targets
softraid0 at root
scsibus1 at softraid0: 256 targets
pmon bootpath: bootduid=0c5a85b50bd214cd
root on wd0a (0c5a85b50bd214cd.a) swap on wd0b dump on wd0b
usbdevs:
Controller /dev/usb0:
addr 01: 1022:0000 AMD, EHCI root hub
high speed, self powered, config 1, rev 1.00
driver: uhub0
Controller /dev/usb1:
addr 01: 1022:0000 AMD, OHCI root hub
full speed, self powered, config 1, rev 1.00
driver: uhub1
pcidump:
Domain /dev/pci0:
0:6:0: Realtek 8139
0x0000: Vendor ID: 10ec, Product ID: 8139
0x0004: Command: 0147, Status: 0290
0x0008: Class: 02 Network, Subclass: 00 Ethernet,
Interface: 00, Revision: 10
0x000c: BIST: 00, Header Type: 00, Latency Timer: 40,
Cache Line Size: 00
0x0010: BAR io addr: 0x0000b100/0x0100
0x0014: BAR mem 32bit addr: 0x04055000/0x00000100
0x0018: BAR empty (00000000)
0x001c: BAR empty (00000000)
0x0020: BAR empty (00000000)
0x0024: BAR empty (00000000)
0x0028: Cardbus CIS: 00000000
0x002c: Subsystem Vendor ID: 10ec Product ID: 8139
0x0030: Expansion ROM Base Address: 00000000
0x0038: 00000000
0x003c: Interrupt Pin: 01 Line: 00 Min Gnt: 20 Max Lat: 40
0x0050: Capability 0x01: Power Management
State: D0
0x0000: 813910ec 02900147 02000010 00004000
0x0010: 0000b101 04055000 00000000 00000000
0x0020: 00000000 00000000 00000000 813910ec
0x0030: 00000000 00000050 00000000 40200100
0x0040: 00000000 00000000 00000000 00000000
0x0050: f7c20001 00000000 00000000 00000000
0x0060: 00000000 00000000 00000000 00000000
0x0070: 00000000 00000000 00000000 00000000
0x0080: 00000000 00000000 00000000 00000000
0x0090: 00000000 00000000 00000000 00000000
0x00a0: 00000000 00000000 00000000 00000000
0x00b0: 00000000 00000000 00000000 00000000
0x00c0: 00000000 00000000 00000000 00000000
0x00d0: 00000000 00000000 00000000 00000000
0x00e0: 00000000 00000000 00000000 00000000
0x00f0: 00000000 00000000 00000000 00000000
0:8:0: SiS 315 Pro VGA
0x0000: Vendor ID: 1039, Product ID: 0325
0x0004: Command: 0007, Status: 0230
0x0008: Class: 03 Display, Subclass: 00 VGA,
Interface: 00, Revision: 00
0x000c: BIST: 80, Header Type: 00, Latency Timer: 47,
Cache Line Size: 00
0x0010: BAR mem prefetchable 32bit addr: 0x40000000/0x10000000
0x0014: BAR mem 32bit addr: 0x04000000/0x00040000
0x0018: BAR io addr: 0x0000b300/0x0080
0x001c: BAR empty (00000000)
0x0020: BAR empty (00000000)
0x0024: BAR empty (00000000)
0x0028: Cardbus CIS: 00000000
0x002c: Subsystem Vendor ID: 3030 Product ID: 3030
0x0030: Expansion ROM Base Address: 04040001
0x0038: 00000000
0x003c: Interrupt Pin: 01 Line: 00 Min Gnt: 03 Max Lat: 10
0x0040: Capability 0x01: Power Management
State: D0
0x0000: 03251039 02300007 03000000 80004700
0x0010: 40000008 04000000 0000b301 00000000
0x0020: 00000000 00000000 00000000 30303030
0x0030: 04040001 00000040 00000000 10030100
0x0040: 06020001 00000000 00000000 00000000
0x0050: 00100002 0f000201 00000000 00000000
0x0060: 00000000 00000000 00000000 00000000
0x0070: 00000000 00000000 00000000 00000000
0x0080: 00000000 00000000 00000000 00000000
0x0090: 00000000 00000000 00000000 00000000
0x00a0: 00000000 00000000 00000000 00000000
0x00b0: 00000000 00000000 00000000 00000000
0x00c0: 00000000 00000000 00000000 00000000
0x00d0: 00000000 00000000 00000000 00000000
0x00e0: 00000000 00000000 00000000 00000000
0x00f0: 00000000 00000000 00000000 00000000
0:14:0: AMD CS5536 ISA
0x0000: Vendor ID: 1022, Product ID: 2090
0x0004: Command: 0045, Status: 02a0
0x0008: Class: 06 Bridge, Subclass: 01 ISA,
Interface: 00, Revision: 03
0x000c: BIST: 00, Header Type: 80, Latency Timer: 40,
Cache Line Size: 08
0x0010: BAR io addr: 0x0000b410/0x0008
0x0014: BAR io addr: 0x0000b000/0x0100
0x0018: BAR io addr: 0x0000b380/0x0040
0x001c: BAR io addr: 0x0000b3e0/0x0020
0x0020: BAR io addr: 0x0000b280/0x0080
0x0024: BAR io addr: 0x0000b3c0/0x0020
0x0028: Cardbus CIS: 00000000
0x002c: Subsystem Vendor ID: 1022 Product ID: 2090
0x0030: Expansion ROM Base Address: 00000000
0x0038: 00000000
0x003c: Interrupt Pin: 00 Line: 00 Min Gnt: 00 Max Lat: 40
0x0000: 20901022 02a00045 06010003 00804008
0x0010: 0000b411 0000b001 0000b381 0000b3e1
0x0020: 0000b281 0000b3c1 00000000 20901022
0x0030: 00000000 00000000 00000000 40000000
0x0040: 00000000 00000000 00000000 00000000
0x0050: 00000000 00000000 00000000 00000000
0x0060: 00000000 00000000 00000000 00000000
0x0070: 00000000 00000000 00000000 00000000
0x0080: 00000000 00000000 00000000 00000000
0x0090: 00000000 00000000 00000000 00000000
0x00a0: 00000000 00000000 00000000 00000000
0x00b0: 00000000 00000000 00000000 00000000
0x00c0: 00000000 00000000 00000000 00000000
0x00d0: 00000000 00000000 00000000 00000000
0x00e0: 00000000 00000000 00000000 00000000
0x00f0: 00000001 80000050 13aa60c2 00000000
0:14:2: AMD CS5536 IDE
0x0000: Vendor ID: 1022, Product ID: 209a
0x0004: Command: 0045, Status: 02a0
0x0008: Class: 01 Mass Storage, Subclass: 01 IDE,
Interface: 80, Revision: 01
0x000c: BIST: 00, Header Type: 00, Latency Timer: 40,
Cache Line Size: 08
0x0010: BAR empty (00000000)
0x0014: BAR empty (00000000)
0x0018: BAR empty (00000000)
0x001c: BAR empty (00000000)
0x0020: BAR io addr: 0x0000b400/0x0010
0x0024: BAR empty (00000000)
0x0028: Cardbus CIS: 00000000
0x002c: Subsystem Vendor ID: 1022 Product ID: 209a
0x0030: Expansion ROM Base Address: 00000000
0x0038: 00000000
0x003c: Interrupt Pin: 00 Line: 00 Min Gnt: 00 Max Lat: 40
0x0000: 209a1022 02a00045 01018001 00004008
0x0010: 00000000 00000000 00000000 00000000
0x0020: 0000b401 00000000 00000000 209a1022
0x0030: 00000000 00000000 00000000 40000000
0x0040: 00000002 00000000 20000000 00000000
0x0050: c0000303 00000000 00000000 00000000
0x0060: 00000000 00000000 00000000 00000000
0x0070: 00000000 00000000 00000000 00000000
0x0080: 00000000 00000000 00000000 00000000
0x0090: 00000000 00000000 00000000 00000000
0x00a0: 00000000 00000000 00000000 00000000
0x00b0: 00000000 00000000 00000000 00000000
0x00c0: 00000000 00000000 00000000 00000000
0x00d0: 00000000 00000000 00000000 00000000
0x00e0: 00000000 00000000 00000000 00000000
0x00f0: 00000000 00000000 00000000 00000000
0:14:3: AMD CS5536 Audio
0x0000: Vendor ID: 1022, Product ID: 2093
0x0004: Command: 0045, Status: 02a0
0x0008: Class: 04 Multimedia, Subclass: 01 Audio,
Interface: 00, Revision: 01
0x000c: BIST: 00, Header Type: 00, Latency Timer: 40,
Cache Line Size: 08
0x0010: BAR io addr: 0x0000b200/0x0080
0x0014: BAR empty (00000000)
0x0018: BAR empty (00000000)
0x001c: BAR empty (00000000)
0x0020: BAR empty (00000000)
0x0024: BAR empty (00000000)
0x0028: Cardbus CIS: 00000000
0x002c: Subsystem Vendor ID: 1022 Product ID: 2093
0x0030: Expansion ROM Base Address: 00000000
0x0038: 00000000
0x003c: Interrupt Pin: 01 Line: 00 Min Gnt: 00 Max Lat: 40
0x0000: 20931022 02a00045 04010001 00004008
0x0010: 0000b201 00000000 00000000 00000000
0x0020: 00000000 00000000 00000000 20931022
0x0030: 00000000 00000000 00000000 40000100
0x0040: 00000000 00000000 00000000 00000000
0x0050: 00000000 00000000 00000000 00000000
0x0060: 00000000 00000000 00000000 00000000
0x0070: 00000000 00000000 00000000 00000000
0x0080: 00000000 00000000 00000000 00000000
0x0090: 00000000 00000000 00000000 00000000
0x00a0: 00000000 00000000 00000000 00000000
0x00b0: 00000000 00000000 00000000 00000000
0x00c0: 00000000 00000000 00000000 00000000
0x00d0: 00000000 00000000 00000000 00000000
0x00e0: 00000000 00000000 00000000 00000000
0x00f0: 00000000 00000000 00000000 00000000
0:14:4: AMD CS5536 USB
0x0000: Vendor ID: 1022, Product ID: 2094
0x0004: Command: 0046, Status: 02a0
0x0008: Class: 0c Serial Bus, Subclass: 03 USB,
Interface: 10, Revision: 02
0x000c: BIST: 00, Header Type: 00, Latency Timer: 40,
Cache Line Size: 08
0x0010: BAR mem 32bit addr: 0x04054000/0x00001000
0x0014: BAR empty (00000000)
0x0018: BAR empty (00000000)
0x001c: BAR empty (00000000)
0x0020: BAR empty (00000000)
0x0024: BAR empty (00000000)
0x0028: Cardbus CIS: 00000000
0x002c: Subsystem Vendor ID: 1022 Product ID: 2094
0x0030: Expansion ROM Base Address: 00000000
0x0038: 00000000
0x003c: Interrupt Pin: 01 Line: 00 Min Gnt: 00 Max Lat: 40
0x0000: 20941022 02a00046 0c031002 00004008
0x0010: 04054000 00000000 00000000 00000000
0x0020: 00000000 00000000 00000000 20941022
0x0030: 00000000 00000040 00000000 40000100
0x0040: 00000000 00000000 00000000 00000000
0x0050: 00000000 00000000 00000000 00000000
0x0060: 00000000 00000000 00000000 00000000
0x0070: 00000000 00000000 00000000 00000000
0x0080: 00000000 00000000 00000000 00000000
0x0090: 00000000 00000000 00000000 00000000
0x00a0: 00000000 00000000 00000000 00000000
0x00b0: 00000000 00000000 00000000 00000000
0x00c0: 00000000 00000000 00000000 00000000
0x00d0: 00000000 00000000 00000000 00000000
0x00e0: 00000000 00000000 00000000 00000000
0x00f0: 00000000 00000000 00000000 00000000
0:14:5: AMD CS5536 USB
0x0000: Vendor ID: 1022, Product ID: 2095
0x0004: Command: 0046, Status: 02a0
0x0008: Class: 0c Serial Bus, Subclass: 03 USB,
Interface: 20, Revision: 02
0x000c: BIST: 00, Header Type: 00, Latency Timer: 40,
Cache Line Size: 08
0x0010: BAR mem 32bit addr: 0x04053000/0x00001000
0x0014: BAR empty (00000000)
0x0018: BAR empty (00000000)
0x001c: BAR empty (00000000)
0x0020: BAR empty (00000000)
0x0024: BAR empty (00000000)
0x0028: Cardbus CIS: 00000000
0x002c: Subsystem Vendor ID: 1022 Product ID: 2095
0x0030: Expansion ROM Base Address: 00000000
0x0038: 00000000
0x003c: Interrupt Pin: 01 Line: 00 Min Gnt: 00 Max Lat: 40
0x0000: 20951022 02a00046 0c032002 00004008
0x0010: 04053000 00000000 00000000 00000000
0x0020: 00000000 00000000 00000000 20951022
0x0030: 00000000 00000040 00000000 40000100
0x0040: 00000000 00000000 00000000 00000000
0x0050: 00000000 00000000 00000000 00000000
0x0060: 00002020 00000000 00000000 00000000
0x0070: 00000000 00000000 00000000 00000000
0x0080: 00000000 00000000 00000000 00000000
0x0090: 00000000 00000000 00000000 00000000
0x00a0: 00000000 00000000 00000000 00000000
0x00b0: 00000000 00000000 00000000 00000000
0x00c0: 00000000 00000000 00000000 00000000
0x00d0: 00000000 00000000 00000000 00000000
0x00e0: 00000000 00000000 00000000 00000000
0x00f0: 00000000 00000000 00000000 00000000
acpidump: