Bug 234720 - lang/nml: Fails to link on i386 with lld: ld: error: relocation R_386_PC32 cannot be used against symbol BnnAdd; recompile with -fPIC
Summary: lang/nml: Fails to link on i386 with lld: ld: error: relocation R_386_PC32 ca...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: i386 Any
: --- Affects Many People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords: easy, needs-patch
Depends on:
Blocks:
 
Reported: 2019-01-07 22:34 UTC by Ed Maste
Modified: 2021-09-29 07:46 UTC (History)
2 users (show)

See Also:
koobs: merge-quarterly?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer freebsd_triage 2019-01-07 22:34:40 UTC
http://package18.nyi.freebsd.org/build.html?mastername=headi386PR214864-default&build=2019-01-05_21h00m02s
http://package18.nyi.freebsd.org/data/headi386PR214864-default/2019-01-05_21h00m02s/logs/errors/nml-0.92b.log

cc -O -I./bignum/h -I../../ocaml/byterun  -fPIC   -c -o nat_stubs.o nat_stubs.c
../../boot/ncamlrun ../../ocaml/tools/ocamlmklib -o nums bignum/o/KerN.o bignum/o/bnInit.o bignum/o/bnMult.o bignum/o/bnDivide.o bignum/o/bnCmp.o bignum/o/bzf.o bignum/o/bz.o nat_stubs.o
ld: error: relocation R_386_PC32 cannot be used against symbol BnnAdd; recompile with -fPIC
>>> defined in bignum/o/KerN.o
>>> referenced by bignum/o/KerN.o:(.text+0x409)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[2]: *** [Makefile:47: libnums.a] Error 2
...
Comment 1 Ed Maste freebsd_committer freebsd_triage 2019-07-24 19:32:28 UTC
lld has been enabled as system linker for i386 on stable/12 in advance of 12.1 (as of a few minutes ago)
Comment 2 Ed Maste freebsd_committer freebsd_triage 2020-06-10 02:08:27 UTC
It looks like this port is incorrectly marked BROKEN - it builds fine with BROKEN removed.
Comment 3 Ed Maste freebsd_committer freebsd_triage 2020-06-10 02:10:29 UTC
(In reply to Ed Maste from comment #2)
That is, is now incorrectly marked BROKEN. It was broken with LLD in the past, but either a port update or LLD update has addressed the issue.
Comment 4 Mikael Urankar freebsd_committer freebsd_triage 2020-06-11 15:32:23 UTC
it's still broken for me (12.1 i386)

cc -O -I./bignum/h -I../../ocaml/byterun  -fPIC   -c -o nat_stubs.o nat_stubs.c
../../boot/ncamlrun ../../ocaml/tools/ocamlmklib -o nums bignum/o/KerN.o bignum/o/bnInit.o bignum/o/bnMult.o bignum/o/bnDivide.o bignum/o/bnCmp.o bignum/o/bzf.o bignum/o/bz.o nat_stubs.o
ld: error: relocation R_386_PC32 cannot be used against symbol BnnAdd; recompile with -fPIC
>>> defined in bignum/o/KerN.o
>>> referenced by bignum/o/KerN.o:(.text+0x409)

I haven't tried -current.
Comment 5 Ed Maste freebsd_committer freebsd_triage 2020-06-11 16:07:20 UTC
Ah, I tested on i386-current only - it could be that this will be solved in 12.2 with new Clang/LLVM.
Comment 6 Ed Maste freebsd_committer freebsd_triage 2021-02-08 01:18:44 UTC
Does it build on 12.2 now?
Comment 7 Mikael Urankar freebsd_committer freebsd_triage 2021-02-09 09:58:44 UTC
(In reply to Ed Maste from comment #6)
It still broken on 12.2 i386:
cc -O -I./bignum/h -I../../ocaml/byterun  -fPIC   -c -o nat_stubs.o nat_stubs.c
../../boot/ncamlrun ../../ocaml/tools/ocamlmklib -o nums bignum/o/KerN.o bignum/o/bnInit.o bignum/o/bnMult.o bignum/o/bnDivide.o bignum/o/bnCmp.o bignum/o/bzf.o bignum/o/bz.o nat_stubs.o
ld: error: relocation R_386_PC32 cannot be used against symbol BnnAdd; recompile with -fPIC

On 13 i386, the build fails with (no ld error):
gmake[2]: Entering directory '/wrkdirs/usr/ports/lang/nml/work/nml-0.92/stdlib'
../boot/ncamlrun ../nmlo  -nopervasives -c pervasives.ml
sh: as: not found
Comment 8 Ed Maste freebsd_committer freebsd_triage 2021-07-26 14:56:57 UTC
Remove block on 214864, ld.lld has been the system linker for some time now
Comment 9 Daniel Engberg freebsd_committer freebsd_triage 2021-09-15 22:14:22 UTC
Probably time to remove this from the tree as it seems to be abandoned upstream (last release 2004/4/19) and doesn't appear to build on any platform at this point?
Comment 10 Daniel Engberg freebsd_committer freebsd_triage 2021-09-26 22:59:51 UTC
I guess we can close this by now and remove it in the next BROKEN clean up?
Comment 11 commit-hook freebsd_committer freebsd_triage 2021-09-29 07:43:30 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5e6e5a45cde21367b3d95490cdce7dbd67beec9b

commit 5e6e5a45cde21367b3d95490cdce7dbd67beec9b
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2021-09-29 07:38:25 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2021-09-29 07:42:27 +0000

    lang/nml: Mark as BROKEN, deprecate and set expiration date to 2021-12-31

    Abandoned upstream, last release 2004-04-19 and doesn't compile
    Reference: PR 234720

    PR:             234720
    Reported by:    emaste and mikael
    Approved by:    arrowd (mentor)
    Differential Revision:  https://reviews.freebsd.org/D32218

 lang/nml/Makefile | 4 ++++
 1 file changed, 4 insertions(+)