Bug 219796

Summary: devel/ruby-gems doesn't build - Shared object "libunwind.so.8" not found
Product: Ports & Packages Reporter: Grzegorz Junka <list1>
Component: Individual Port(s)Assignee: Steve Wills <swills>
Status: Closed FIXED    
Severity: Affects Some People CC: swills
Priority: --- Flags: bugzilla: maintainer-feedback? (ruby)
Version: Latest   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
poudriere logs none

Description Grzegorz Junka 2017-06-05 07:23:36 UTC
Created attachment 183233 [details]
poudriere logs

Please let me know if you require any additional logs or settings.
Comment 1 Po-Chuan Hsieh freebsd_committer freebsd_triage 2017-06-05 15:37:03 UTC
from the poudriere log:
Shared object "libunwind.so.8" not found, required by "ruby23"

Please rebuild lang/ruby23 first and let's see what happen later.
Comment 2 Grzegorz Junka 2017-06-11 07:02:42 UTC
After some digging I found that devel/ruby-gems fails to build if the following option is set in lang/ruby23:

OPTIONS_FILE_SET+=CAPIDOCS

Once that options is unset devel/ruby-gems builds fine.
Comment 3 Grzegorz Junka 2017-06-11 07:13:37 UTC
Actually, I will need to compare options for all packages that CAPIDOCS enables between their default settings and those in my environment in order to be able to tell if it's just CAPIDOCS or maybe one of the dependent packages. I will try to do it today.
Comment 4 Grzegorz Junka 2017-06-11 09:54:03 UTC
Confirmed. I built devel/ruby-gems with defaults options for all dependencies apart from CAPIDOCS, which I enabled, and the build failed.
Comment 5 Po-Chuan Hsieh freebsd_committer freebsd_triage 2017-06-13 16:00:44 UTC
(In reply to Grzegorz Junka from comment #4)

Here's the reason why it failed in poudriere.

ruby's configure script checks for unw_backtrace() in libunwind. When CAPIDOCS enabled, libunwind is installed as a dependency of doxygen and graphviz. Then, ruby links against libunwind.so.8 but the dependency is not registered.
Comment 6 commit-hook freebsd_committer freebsd_triage 2017-07-11 21:03:37 UTC
A commit references this bug:

Author: swills
Date: Tue Jul 11 21:03:09 UTC 2017
New revision: 445549
URL: https://svnweb.freebsd.org/changeset/ports/445549

Log:
  lang/ruby2{2,3,4}: require libunwind

  Since ruby detects this if it's installed, and it's more often installed now
  due to other deps, and ruby provides no way to not depend on it if it's found,
  pull it in as a dependency unconditionally. While here, fix plist for ruby 2.4
  with the CAPIDOCS option on, and restore the MAKE_JOBS_UNSAFE flag when using
  that build option since it's not fixed like I thought it was.

  PR:		219796
  Reported by:	Grzegorz Junka <list1@gjunka.com>

Changes:
  head/Mk/bsd.ruby.mk
  head/lang/ruby22/Makefile
  head/lang/ruby23/Makefile
  head/lang/ruby24/Makefile
  head/lang/ruby24/pkg-plist
Comment 7 Steve Wills freebsd_committer freebsd_triage 2017-07-11 21:08:14 UTC
Fix committed, thanks for reporting.