Bug 276113 - lang/julia: fails to run when kern.elf64.allow_wx=0
Summary: lang/julia: fails to run when kern.elf64.allow_wx=0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-04 16:18 UTC by Trond Endrestøl
Modified: 2024-03-27 18:09 UTC (History)
2 users (show)

See Also:


Attachments
Patch for lang/julia/Makefile (554 bytes, patch)
2024-01-04 16:19 UTC, Trond Endrestøl
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Trond Endrestøl 2024-01-04 16:18:56 UTC
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>
Comment 1 Trond Endrestøl 2024-01-04 16:19:22 UTC
Created attachment 247445 [details]
Patch for lang/julia/Makefile
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-03-16 12:34:20 UTC
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(-)