Bug 234857 - cad/qcad: fails to build on i386 with lld as system linker
Summary: cad/qcad: fails to build on i386 with lld as system linker
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: Michael Reifenberger
URL:
Keywords:
Depends on:
Blocks: 214864
  Show dependency treegraph
 
Reported: 2019-01-11 13:58 UTC by Ed Maste
Modified: 2020-06-10 20:08 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (mr)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer 2019-01-11 13:58:21 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/qcad-3.21.3.11.log

ld: error: relocation R_386_PC32 cannot be used against symbol ON_GetPointListBoundingBox(int, int, int, int, double const*, ON_BoundingBox&, int, ON_Xform const*); recompile with -fPIC
>>> defined in /usr/local/lib/libopenNURBS.a(opennurbs_bounding_box.o)
>>> referenced by opennurbs_bezier.cpp:30
>>>               opennurbs_bezier.o:(ON_BezierCurve::GetTightBoundingBox(ON_BoundingBox&, int, ON_Xform const*) const) in archive /usr/local/lib/libopenNURBS.a

ld: error: relocation R_386_PC32 cannot be used against symbol ON_4dPointArray::ON_4dPointArray(); recompile with -fPIC
>>> defined in /usr/local/lib/libopenNURBS.a(opennurbs_array.o)
>>> referenced by opennurbs_bezier.cpp:44
>>>               opennurbs_bezier.o:(ON_PolynomialCurve::ON_PolynomialCurve()) in archive /usr/local/lib/libopenNURBS.a

ld: error: relocation R_386_PC32 cannot be used against symbol ON_Interval::ON_Interval(double, double); recompile with -fPIC
>>> defined in /usr/local/lib/libopenNURBS.a(opennurbs_point.o)
>>> referenced by opennurbs_bezier.cpp:45
>>>               opennurbs_bezier.o:(ON_PolynomialCurve::ON_PolynomialCurve()) in archive /usr/local/lib/libopenNURBS.a

...


It may be as simple as adding LDFLAGS_i386=-Wl,-z,notext to the port's Makefile or adding -fPIC to CFLAGS for the associated objects. (I haven't yet been able to build it locally to try.)
Comment 1 Ed Maste freebsd_committer 2019-07-24 19:35:04 UTC
lld has been enabled as system linker for i386 on stable/12 in advance of 12.1 (base svn r350297, a few minutes ago)
Comment 2 Ed Maste freebsd_committer 2020-05-27 02:43:10 UTC
This builds with LDFLAGS_i386=-Wl,-z,notext
Comment 3 commit-hook freebsd_committer 2020-06-07 16:48:31 UTC
A commit references this bug:

Author: mr
Date: Sun Jun  7 16:48:24 UTC 2020
New revision: 538166
URL: https://svnweb.freebsd.org/changeset/ports/538166

Log:
  Try to fix i386 build.

  While there update to 3.24.3.8

  PR:		234857
  Submitted by:	emaste@

Changes:
  head/cad/qcad/Makefile
  head/cad/qcad/distinfo
  head/cad/qcad/pkg-plist
Comment 4 Michael Reifenberger freebsd_committer 2020-06-07 16:50:36 UTC
Fix committed.
Please test as I currently can only test amd64.

Thanks for providing the change!
Comment 5 Ed Maste freebsd_committer 2020-06-09 01:39:38 UTC
It still has a BROKEN_i386 tag?
Comment 6 Ed Maste freebsd_committer 2020-06-09 17:11:51 UTC
Confirmed that it builds on i386 with your LDFLAGS change and the BROKEN_i386 removed.
Comment 7 commit-hook freebsd_committer 2020-06-10 20:07:27 UTC
A commit references this bug:

Author: mr
Date: Wed Jun 10 20:06:29 UTC 2020
New revision: 538437
URL: https://svnweb.freebsd.org/changeset/ports/538437

Log:
  Remove BROKEN_i386 after the previous fix got verified.

  PR:		234857
  Reported by:	emaste@

Changes:
  head/cad/qcad/Makefile
Comment 8 Michael Reifenberger freebsd_committer 2020-06-10 20:08:32 UTC
Change committed.
Thanks for testing!