Opened 20 months ago

Closed 20 months ago

Last modified 20 months ago

#65839 closed defect (fixed)

xar: Remove icu dependency and avoid overlinking to libxml2's dependencies

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: Schamschula (Marius Schamschula)
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: haspatch Cc: catap (Kirill A. Korinsky)
Port: xar

Description

In [8f9c15ffae374e6da5d4e5697e3697644275c6ef/macports-ports] a dependency on icu was added to the xar port. It should be removed because xar does not use icu. It only uses libxml2, and libxml2 happens to use icu.

The reason why xar ends up linked with icu and libxml2's other internal dependencies (libiconv, liblzma) is that it uses xml2-config to find libxml2, and xml2-config by default assumes you will be making static libraries. It's the same problem reported against old versions of php in #59439.

The solution is to add the --dynamic flag when invoking xml2-config --libs. (The --dynamic flag is a fairly recent addition to xml2-config and probably didn't exist when xar was being developed.) I'll send a PR.

Change History (3)

comment:1 Changed 20 months ago by ryandesign (Ryan Carsten Schmidt)

Keywords: haspatch added

https://github.com/macports/macports-ports/pull/16130

The xar port does create both dynamic and static libraries and I was concerned that this change might prevent the static library from building, but it does not seem to. Presumably anyone wanting to use the static library would have to manually specify the recursive set of static libraries that it depends on, which is probably unavoidable.

comment:2 Changed 20 months ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

In 386749bb73ce0a774d1d00f2e548e7b35538d930/macports-ports (master):

xar: Don't overlink to libxml2's dependencies

Closes: #65839

comment:3 Changed 20 months ago by catap (Kirill A. Korinsky)

Thanks fixing that mess!

Note: See TracTickets for help on using tickets.