tursodatabase/turso · error · SystemExit
usage: check_elf_dynsym_exports.py <elf> <symbol>...
Error message
usage: check_elf_dynsym_exports.py <elf> <symbol>...
What it means
This script checks that an ELF shared library exports the required symbols in its .dynsym table. The usage error is raised by main() when fewer than 2 command-line arguments are supplied (only the script name and the ELF path, with no symbols to check). SystemExit with a string makes Python print the message and exit with status 1.
Source
Thrown at bindings/dotnet/scripts/check_elf_dynsym_exports.py:20
import struct
import sys
from pathlib import Path
NAME = 0
TYPE = 1
OFFSET = 4
SIZE = 5
LINK = 6
ENTRY_SIZE = 9
def main() -> None:
if len(sys.argv) == 2 and sys.argv[1] == "--self-test":
run_self_test()
return
if len(sys.argv) < 3:
raise SystemExit("usage: check_elf_dynsym_exports.py <elf> <symbol>...")
path = Path(sys.argv[1])
needed = sys.argv[2:]
missing = missing_exports(path, needed)
if missing:
raise SystemExit(f"{path} is missing dynsym exports: {', '.join(missing)}")
def run_self_test() -> None:
import tempfile
symbol = "turso_sync_database_new"
with tempfile.NamedTemporaryFile(delete=False, suffix=".so") as handle:
handle.write(elf64_with_dynsym(symbol))
path = Path(handle.name)
try:
if missing_exports(path, [symbol]):
raise SystemExit("self-test failed: expected export was not found")View on GitHub (pinned to 492c4a71cd)
Solutions
- Pass at least one symbol name after the ELF path: check_elf_dynsym_exports.py <elf> <symbol>...
- Run with --self-test first to verify the script works without needing a real ELF
Example fix
// before check_elf_dynsym_exports.py libturso.so // after check_elf_dynsym_exports.py libturso.so turso_sync_database_new
Defensive patterns
Strategy: validation
Validate before calling
import sys
if len(sys.argv) < 3:
sys.exit("usage: check_elf_dynsym_exports.py <elf> <symbol>...") Prevention
- Always pass the ELF path followed by at least one symbol name
- Wrap CI invocations to assert argument count before calling the script
- Use --self-test to smoke-test the script without arguments
When it happens
Trigger: Running the script with zero or one argument, e.g. `check_elf_dynsym_exports.py libturso.so` or `check_elf_dynsym_exports.py` — no symbol names given after the ELF path.
Common situations: A developer wiring this into CI forgets the symbol list, a build-system variable holding the symbol names expands to empty, or the script is invoked manually to 'see what it does' without arguments.
Understand the failure class
Background: "no subcommand specified" and "... is required": CLI errors when a required argument is missing — this error's family across 13 libraries.
Related errors
- Unexpected row for INSERT
- pyturso's SQLAlchemy dialects require SQLAlchemy >= 2.0.45 (
- Cannot get raw connection from SQLAlchemy connection
- Expected turso.sync.ConnectionSync, got {type(dbapi_conn).__
- Unsupported value type: {type(value).__name__}
AI-assisted analysis of tursodatabase/turso@492c4a71cd (2026-09-13).
Data as JSON: /api/errors/d6e1419f5c84d4c3.
Report an issue: GitHub.