Summary: | [PATCH] math/mprime: does not work on FreeBSD 12. | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Ivan Rozhuk <rozhuk.im> | ||||||||||||||
Component: | Individual Port(s) | Assignee: | Steve Wills <swills> | ||||||||||||||
Status: | Closed FIXED | ||||||||||||||||
Severity: | Affects Some People | CC: | dim, emaste, kib, rozhuk.im | ||||||||||||||
Priority: | --- | Flags: | rozhuk.im:
maintainer-feedback+
rozhuk.im: merge-quarterly? |
||||||||||||||
Version: | Latest | ||||||||||||||||
Hardware: | Any | ||||||||||||||||
OS: | Any | ||||||||||||||||
Attachments: |
|
Created attachment 202877 [details]
patch
Created attachment 202908 [details] Force mprime linking to use BFD ld There's definitely something fishy going on: $ gdb /usr/local/bin/mprime-real GNU gdb (GDB) 8.2.1 [GDB v8.2.1 for FreeBSD] ... (gdb) run Starting program: /usr/local/bin/mprime-real target.c:2238: internal-error: void target_mourn_inferior(ptid_t): Assertion `ptid == inferior_ptid' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) y This is a bug, please report it. For instructions, see: <http://www.gnu.org/software/gdb/bugs/>. target.c:2238: internal-error: void target_mourn_inferior(ptid_t): Assertion `ptid == inferior_ptid' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Create a core file of GDB? (y or n) n And even worse, the dynamic linker asserts on it: $ ldd /usr/local/bin/mprime-real /usr/local/bin/mprime-real: /usr/local/bin/mprime-real: signal 6 It looks like ld.lld is mangling the executable somehow: when I force the mprime-real executable to be linked with ld.bfd, it does run correctly. See the force-ld-bfd-1.diff patch. Created attachment 202909 [details]
readelf -aW output for lld-linked mprime executable
Created attachment 202910 [details]
readelf -aW output for bfd-linked mprime executable
(In reply to Dimitry Andric from comment #2) LLD_UNSAFE= yes should do same. (In reply to rozhuk.im from comment #5) > (In reply to Dimitry Andric from comment #2) > LLD_UNSAFE= yes > should do same. I thought of that, but it doesn't seem to work since the makefile is rather non-standard and doesn't follow any regular conventions. But if it works for you, please use it. Created attachment 202917 [details]
use LLD_UNSAFE instead of gcc to avoid run error on FreeBSD 12
(In reply to Dimitry Andric from comment #6) It wotks for me because I already patch makefiles to proper handle LDFLAGS and other staff. A commit references this bug: Author: swills Date: Fri Apr 12 20:17:33 UTC 2019 New revision: 498741 URL: https://svnweb.freebsd.org/changeset/ports/498741 Log: math/mprime: avoid runtime issue PR: 236546 Submitted by: rozhuk.im@gmail.com (maintainer) Changes: head/math/mprime/Makefile head/math/mprime/files/patch-gwnum_makebsd64 head/math/mprime/files/patch-gwnum_makemsys head/math/mprime/files/patch-linux64_makebsd head/math/mprime/files/patch-linux_makebsd Committed, thanks! |
Created attachment 202876 [details] patch I discover that mprime fail to start on FreeBSD 12. There is something wrong with compiling/linking the used clang. Then build with gcc - run ok. Also multithreaded build enabled.