The following patch adds USES+=elfctl and marks the Julia executable as "wxneeded." While here, sort USES. Here are samples of what happens when kern.elf64.allow_wx=0 and when kern.elf64.allow_wx=1 before the executable is properly tagged: $ sysctl kern.elf64.allow_wx kern.elf64.allow_wx: 0 $ julia fatal: error thrown and no exception handler available. InitError(mod=:Sys, error=ErrorException("PCRE JIT error: no more memory")) unknown function (ip: 0x844d5ee08) unknown function (ip: 0x844da02af) unknown function (ip: 0x844a7ea39) unknown function (ip: 0x844d3e8da) unknown function (ip: 0x844a9a42e) unknown function (ip: 0x844d59a1d) unknown function (ip: 0x844d59a78) ijl_apply_generic at /usr/local/bin/../lib/julia/libjulia-internal.so.1 (unknown line) ijl_base_relative_to at /usr/local/bin/../lib/julia/libjulia-internal.so.1 (unknown line) julia_init at /usr/local/bin/../lib/julia/libjulia-internal.so.1 (unknown line) julia_init at /usr/local/bin/../lib/julia/libjulia-internal.so.1 (unknown line) jl_repl_entrypoint at /usr/local/bin/../lib/julia/libjulia-internal.so.1 (unknown line) main at /usr/local/bin/julia (unknown line) _start at /usr/local/bin/julia (unknown line) unknown function (ip: 0x821877007) $ sysctl kern.elf64.allow_wx kern.elf64.allow_wx: 1 $ julia _ _ _ _(_)_ | Documentation: https://docs.julialang.org (_) | (_) (_) | _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help. | | | | | | |/ _` | | | | |_| | | | (_| | | Version 1.9.4 (2023-11-14) _/ |\__'_|_|_|\__'_| | FreeBSD port lang/julia build |__/ | julia>
Created attachment 247445 [details] Patch for lang/julia/Makefile
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=09e6bef0b8f4a221753585e0f46ac8eea06f6ddc commit 09e6bef0b8f4a221753585e0f46ac8eea06f6ddc Author: Hiroo Ono <hiroo.ono+freebsd@gmail.com> AuthorDate: 2024-03-16 12:32:43 +0000 Commit: Kurt Jaeger <pi@FreeBSD.org> CommitDate: 2024-03-16 12:32:43 +0000 lang/julia: unbreak build - unbreak build - elfctl wxneeded PR: 277697, 276113 lang/julia/Makefile | 8 ++++++-- lang/julia/files/patch-Make.inc | 33 ++++++++++++++++++++++++--------- 2 files changed, 30 insertions(+), 11 deletions(-)