#69870 closed defect (fixed)
mpdecimal: Change libmpdec and libmpdec++ shared library install name to not use @rpath
Reported by: | ned-deily (Ned Deily) | Owned by: | Schamschula (Marius Schamschula) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | haspatch | Cc: | jmroot (Joshua Root) |
Port: | mpdecimal |
Description
By default, the upstream mpdecimal package builds and installs its shared libraries with an @rpath-prefixed install name rather than an absolute path as most shared libraries do. This can cause confusion and extra steps for projects that want to link with these libraries. The Homebrew project installs their version of these libraries with conventional absolute paths and we believe it would benefit users if MacPorts did as well. The motivation for this is described in the following upstream Python issue: https://github.com/python/cpython/issues/115119#issuecomment-2084390561. In short, Python has long vendored a copy of libmpdec in the cpython source tree. There have been discussions about removing that vendored copy and requiring the use of a external copy. As documented in the issue, while attempting to implement that feature, we ran into various somewhat cryptic build errors as a result of the default @rpath-prefixed install names when building libmpdec ourselves or when linking with MacPorts-provided copies but curiously did not when linking with Homebrew-provided copies. If MacPorts would also adopt Homebrew's strategy of removing the @rpath name, users who have built Python with MacPorts-supplied libraries for many years would be able to continue to easily use MacPorts for this purpose; otherwise, some ugly hacks would be needed to their build setups. Note this change would also affect the building of MacPort's own python ports, starting with Python 3.13 at the earliest, although the unvendoring is not yet a done deal.
Change History (5)
comment:1 Changed 7 months ago by jmroot (Joshua Root)
Cc: | Schamschula removed |
---|---|
Owner: | set to Schamschula |
Status: | new → assigned |
Summary: | Change libmpdec and libmpdec++ shared library install name to not use @rpath → mpdecimal: Change libmpdec and libmpdec++ shared library install name to not use @rpath |
comment:2 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)
comment:3 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | haspatch added |
---|
https://github.com/macports/macports-ports/pull/23767
There are no ports that depend on mpdecimal so nothing needs to be revbumped afterward.
comment:4 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:5 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)
I reported the issue and our fix to the developer of mpdecimal by email, since there is no issue tracker.
Yes, absolutely, we already know that we should not install libraries with
@rpath
install names. Ideally, we should convince the developers of mpdecimal to stop doing so by default. Then Homebrew, MacPorts, and everybody else would not need to patch it.