call_once is undefined when the Link-Parser tries to exit causing it to crash. Example console: link-grammar: Error: Could not open dictionary "C.UTF/4.0.dict" link-grammar: Info: Dictionary found at ./data/en/4.0.dict link-grammar: Info: Dictionary version 5.11.0, locale en_US.UTF-8 link-grammar: Info: Library version link-grammar-5.11.0. Enter "!help" for help. linkparser> hello world ld-elf.so.1: /root/link-grammar-5.11.0/link-grammar/.libs/liblink-grammar.so.5: Undefined symbol "call_once" I suspect the C11 Threads Library should be linked in to provide "call_once"
Created attachment 238392 [details] patch Try this patch for textproc/link-grammar.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=7b3995c7b76ffcfce55e26687ea86b9c2d8535ee commit 7b3995c7b76ffcfce55e26687ea86b9c2d8535ee Author: Tijl Coosemans <tijl@FreeBSD.org> AuthorDate: 2022-11-30 15:29:41 +0000 Commit: Tijl Coosemans <tijl@FreeBSD.org> CommitDate: 2024-09-15 13:53:07 +0000 textproc/link-grammar: Link with -lstdthreads The library uses call_once and other C11 Threads functions that are implemented by libstdthreads on FreeBSD. Use new upstream. PR: 267758 textproc/link-grammar/Makefile | 7 +++-- textproc/link-grammar/files/patch-configure (new) | 31 +++++++++++++++++++++++ 2 files changed, 34 insertions(+), 4 deletions(-)