Skip to content

ICU symbol resolution fails on Linux with versioned exports #639

@frostney

Description

@frostney

Summary

On Linux, ICU libraries export versioned symbols (e.g. unum_open_76 instead of unum_open). ICUGetProcAddress in source/shared/ICU.pas looks up bare names only, so all symbol resolution fails silently and ICU is never loaded. All Intl formatting falls through to the CLDR path.

Why

The CLDR fallback lacks significant digits, rounding modes, rounding increments, collation sensitivity, proper datetime formatting, and locale-aware canonicalization. With ICU disabled, ~50+ intl402 test262 tests that depend on correct ICU behavior either fail or pass vacuously.

Current behavior

# On Ubuntu 25.04 with ICU 76:
nm -D /lib/aarch64-linux-gnu/libicui18n.so.76 | grep "T unum_open"
# 00000000002ccd80 T unum_open_76    (versioned, no bare alias)

TryLoadLinuxICU loads libicui18n.so.76 successfully, but every GetProcAddress(Handle, 'unum_open') call returns nil. TryLoadIntlFunctions returns False.

Expected behavior

ICUGetProcAddress should try the versioned name (unum_open_76) when the bare lookup fails. The version suffix is already known from TryLoadLinuxICU which iterates ICU_VERSION_MAX downto ICU_VERSION_MIN.

Scope notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    engineTGocciaEngine: language semantics, ECMAScript built-ins, parser, interpreter, bytecode VM

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions