Bug 240725

Summary: Mk/Uses/cargo.mk: onig_sys missing libclang.so build dependency
Product: Ports & Packages Reporter: Santhosh Raju <fox>
Component: Ports FrameworkAssignee: Luca Pizzamiglio <pizzamig>
Status: Closed FIXED    
Severity: Affects Only Me CC: ports-bugs
Priority: --- Keywords: needs-patch
Version: LatestFlags: tobik: maintainer-feedback+
Hardware: Any   
OS: Any   
URL: https://github.com/rust-onig/rust-onig/issues/109
Bug Depends on: 240304    
Bug Blocks:    
Attachments:
Description Flags
Patch to add libclang.so dependency for onig_sys none

Description Santhosh Raju freebsd_committer freebsd_triage 2019-09-21 07:31:33 UTC
Created attachment 207673 [details]
Patch to add libclang.so dependency for onig_sys

It looks like recent versions of onig_sys has a dependency on libclang.so when doing builds.

This issue was discovered when trying to update textproc/bat.

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240304#c3

The maintainer of textproc/bat suggested that the libclang.so dependency be added to Mk/Uses/cargo.mk since onig_sys has a section there.

I have attached a patch to add LIB_DEPENDS to Mk/Uses/cargo.mk 

Let me know if this is the correct way to fix this issue.
Comment 1 Tobias Kortkamp freebsd_committer freebsd_triage 2019-09-21 11:06:49 UTC
No, this is wrong.  If anything you need to add an entry for the
bindgen crate which is what onig_sys now uses and is what depends
on libclang.  And make it a BUILD_DEPENDS only.  It is not required
at runtime.  See textproc/sonic, editors/parinfer-rust for the
BUILD_DEPENDS line.  It would be good to remove it from them (and
probably others) too if this now lives in cargo.mk.
Comment 2 Tobias Kortkamp freebsd_committer freebsd_triage 2019-09-21 11:44:01 UTC
Actually looking deeper into it I am kind of hesitant on adding
this to cargo.mk.  The bindgen crate is often pulled in as a
dependency but not actually used (see games/genact, x11/alacritty)
during a normal build, so adding this will add a bunch of useless
dependencies to ports.  LLVM is kind of too large for this IMHO.
It might be better to leave it up to the individual ports to add
it when they actually need it.
Comment 3 Santhosh Raju freebsd_committer freebsd_triage 2019-09-21 14:42:05 UTC
Thank you for the insight. I shall discuss this with the maintainer of textproc/bat

For now leaving this ticket open, but will close it once I hear back from the textproc/bat maintainer.
Comment 4 Santhosh Raju freebsd_committer freebsd_triage 2019-09-23 10:40:42 UTC
Closing this ticket as the change will be integrated into textproc/bat. Thank you for the help.
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2019-09-23 11:42:14 UTC
^Triage:

- Depend on the issue that resolved this report
- Assign to committer that resolved (via bug 240304)