Bug 216544 - 12-CURRENT: lang/ruby23 fails to compile with WITH_LLD_IS_LD=YES
Summary: 12-CURRENT: lang/ruby23 fails to compile with WITH_LLD_IS_LD=YES
Status: Closed Unable to Reproduce
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ruby (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-28 10:47 UTC by O. Hartmann
Modified: 2017-08-22 19:31 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2017-01-28 10:47:19 UTC
Using the option WITH_LLD_IS_LD=YES in /etc/src.conf leads to a failure of compiling of port lang/ruby23, as shown below. I haven't investigated this malfunction further, since the mentioned option is not standard yet and I report just for the record.


[...]
processing probes in object files
--- miniruby ---
linking miniruby
cc: error: unable to execute command: Segmentation fault
cc: error: linker command failed due to signal (use -v to see invocation)
*** [miniruby] Error code 254

make[2]: stopped in /usr/ports/lang/ruby23/work/ruby-2.3.3
1 error

make[2]: stopped in /usr/ports/lang/ruby23/work/ruby-2.3.3
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1
Comment 1 Ed Maste freebsd_committer freebsd_triage 2017-02-18 00:34:03 UTC
Thank you for the report. At this point it's probably premature to submit PRs for individual failures; Rafael and I are testing LLD head with Poudriere, and there's somewhat under 300 failures (and several hundred skipped) with WIP patches to both LLD and FreeBSD.
Comment 2 Ed Maste freebsd_committer freebsd_triage 2017-08-18 13:32:49 UTC
(In reply to Ed Maste from comment #1)
See https://reviews.freebsd.org/D12064 for infrastructure to force certain ports to link with ld.bfd instead of lld.

lld 5.0.0 is now in head, and once D12064 lands it's probably a good time to start submitting PRs for individual port failures, particularly if lld itself crashes (as it did here).

We'll set LLD_UNSAFE=yes in the Makefile for ports that fail to link with lld until the underlying problem in lld or in the port can be fixed.

Note that in this case it appears the original problem has been fixed; I just built lang/ruby23 with /usr/bin/ld = ld.lld. Would you kindly confirm?
Comment 3 O. Hartmann 2017-08-22 19:02:53 UTC
I'm sorry not being able to confirm. I've switched from WITH_LLD_IS_LD=YES towards disabling this knob because it caused to much trouble and left me with to much unresolved problems.

On CURRENT, I'll start soon then using the knowb again since LLVM 5.0 is in for a while now and see if problems are as frequent as when I tried first.

But for the problem this is now solution. I can't answer properly, my apology.
Comment 4 Ed Maste freebsd_committer freebsd_triage 2017-08-22 19:31:27 UTC
Closing as this appears to be fixed for me with Clang/LLD 5.0.0 and the original submitter is unable to retest. Thank you for the report.

Also D12064 has now been committed, so if you encounter future trouble with WITH_LLD_IS_LD, when building, please do the following:

- Save away the overall build log, as well as config.log and any other appropriate log files. Perhaps just tar up the entire ports workdir.
- Add LLD_UNSAFE=yes to the individual ports Makefile in your tree
- 'make clean' and then rebuild the port
- Test that the port works
- Submit a PR for the port