[Bug 230213] math/p5-Math-Pari: fail to link with lld as /usr/bin/ld on i386

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 230213] math/p5-Math-Pari: fail to link with lld as /usr/bin/ld on i386

bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230213

            Bug ID: 230213
           Summary: math/p5-Math-Pari: fail to link with lld as
                    /usr/bin/ld on i386
           Product: Ports & Packages
           Version: Latest
          Hardware: i386
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: [hidden email]
          Reporter: [hidden email]
            Blocks: 214864
          Assignee: [hidden email]
             Flags: maintainer-feedback?([hidden email])

The migration to the LLVM project's lld linker as the system linker
(/usr/bin/ld) for FreeBSD is in progress - it is the case for arm64 and amd64
today, and i386 will switch once ports issues are addressed - see exp-run in
PR214864.

Linking math/p5-Math-Pari with lld fails with errors of the form:

/usr/bin/ld: error: can't create dynamic relocation R_386_32 against local
symbol in readonly segment; recompile object files with -fPIC
>>> defined in mp.o
>>> referenced by mp.c
>>>               mp.o:(pari_kernel_init)

/usr/bin/ld: error: can't create dynamic relocation R_386_32 against symbol:
gpmalloc in readonly segment; recompile object files with -fPIC
>>> defined in init.o
>>> referenced by mp.c
>>>               mp.o:(pari_kernel_init)

http://package18.nyi.freebsd.org/data/headi386PR214864-default/2018-07-30_18h09m59s/logs/errors/p5-Math-Pari-2.01080900.log


Referenced Bugs:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214864
[Bug 214864] [exp-run] test build with lld as /usr/bin/ld
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-perl
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

maintainer-feedback requested: [Bug 230213] math/p5-Math-Pari: fail to link with lld as /usr/bin/ld on i386

bugzilla-noreply
Bugzilla Automation <[hidden email]> has asked freebsd-perl mailing list
<[hidden email]> for maintainer-feedback:
Bug 230213: math/p5-Math-Pari: fail to link with lld as /usr/bin/ld on i386
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230213



--- Description ---
The migration to the LLVM project's lld linker as the system linker
(/usr/bin/ld) for FreeBSD is in progress - it is the case for arm64 and amd64
today, and i386 will switch once ports issues are addressed - see exp-run in
PR214864.

Linking math/p5-Math-Pari with lld fails with errors of the form:

/usr/bin/ld: error: can't create dynamic relocation R_386_32 against local
symbol in readonly segment; recompile object files with -fPIC
>>> defined in mp.o
>>> referenced by mp.c
>>>  mp.o:(pari_kernel_init)

/usr/bin/ld: error: can't create dynamic relocation R_386_32 against symbol:
gpmalloc in readonly segment; recompile object files with -fPIC
>>> defined in init.o
>>> referenced by mp.c
>>>  mp.o:(pari_kernel_init)

http://package18.nyi.freebsd.org/data/headi386PR214864-default/2018-07-30_18h09
m59s/logs/errors/p5-Math-Pari-2.01080900.log
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-perl
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 230213] math/p5-Math-Pari: fail to link with lld as /usr/bin/ld on i386

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230213

Nathan <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #1 from Nathan <[hidden email]> ---
I added -fuse-ld=lld to LDFLAGS and it currently has LLD_UNSAFE=yes already in
ports and I did not get an error in poudriere on 12-current i386

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-perl
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 230213] math/p5-Math-Pari: fail to link with lld as /usr/bin/ld on i386

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230213

--- Comment #2 from Ed Maste <[hidden email]> ---
(In reply to Nathan from comment #1)
It looks like this port does not honour LDFLAGS, so adding -fuse-ld=lld there
likely has no effect.

With LLD_UNSAFE=yes and -Wl,-znotext in LDFLAGS it still fails with:

cc  -o libpari-gmp.so.2.3.5 -shared  -O2 -pipe
-I/usr/ports/math/p5-Math-Pari/work/pari-2.3.5/src/headers
-I/usr/ports/math/p5-Math-Pari/work/pari-2.3.5/build -fstack-protector
-fno-strict-aliasing  -Wl,-shared,-soname=libpari-gmp.so.2 mp.o mpinl.o Flx.o
Qfb.o RgX.o alglin1.o alglin2.o arith1.o arith2.o base1.o base2.o base3.o
base4.o base5.o bibli1.o bibli2.o buch1.o buch2.o buch3.o buch4.o galconj.o
gen1.o gen2.o gen3.o ifactor1.o perm.o polarit1.o polarit2.o polarit3.o
rootpol.o subcyclo.o subgroup.o trans1.o trans2.o trans3.o anal.o compat.o
default.o errmsg.o es.o init.o intnum.o members.o sumiter.o aprcl.o elldata.o
elliptic.o galois.o groupid.o kummer.o mpqs.o nffactor.o part.o stark.o
subfield.o thue.o -lc -lm -L/usr/local/lib -lgmp
/usr/bin/ld: error: can't create dynamic relocation R_386_32 against local
symbol in readonly segment; recompile object files with -fPIC
>>> defined in mp.o
>>> referenced by mp.c
>>>               mp.o:(pari_kernel_init)

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-perl
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 230213] math/p5-Math-Pari: fail to link with lld as /usr/bin/ld on i386

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230213

--- Comment #3 from Nathan <[hidden email]> ---
Created attachment 197219
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=197219&action=edit
Fix LLD on i386

Tried with and without patch on 12-i386

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-perl
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 230213] math/p5-Math-Pari: fail to link with lld as /usr/bin/ld on i386

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230213

--- Comment #4 from Nathan <[hidden email]> ---
Just tested it on 11.2 poudriere jail successfully

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-perl
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 230213] math/p5-Math-Pari: fail to link with lld as /usr/bin/ld on i386

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230213

--- Comment #5 from Ed Maste <[hidden email]> ---
Comment on attachment 197219
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=197219
Fix LLD on i386

Patch looks reasonable

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-perl
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 230213] math/p5-Math-Pari: fail to link with lld as /usr/bin/ld on i386

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230213

--- Comment #6 from Nathan <[hidden email]> ---
(In reply to Ed Maste from comment #5)
Makefile.PL pulls the info from config/ldflags, and it had just -Wl in the
script, so replaced it and worked

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-perl
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 230213] math/p5-Math-Pari: fail to link with lld as /usr/bin/ld on i386

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230213

--- Comment #7 from Ed Maste <[hidden email]> ---
Patch works for me.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-perl
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 230213] math/p5-Math-Pari: fail to link with lld as /usr/bin/ld on i386

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230213

--- Comment #8 from Ed Maste <[hidden email]> ---
lld has been enabled as system linker for i386 on stable/12 in advance of 12.1

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-perl
To unsubscribe, send any mail to "[hidden email]"