[MacPorts] #60165: meson @0.53.2 produces on PPC Mac OS X 10.4.11, Tiger, faulty files with illegal loader switch '-Wl, -rpath, @loader_path/'

MacPorts noreply at macports.org
Thu Oct 8 19:50:19 UTC 2020


#60165: meson @0.53.2 produces on PPC Mac OS X 10.4.11, Tiger, faulty files with
illegal loader switch '-Wl,-rpath, at loader_path/'
------------------------+-----------------------
  Reporter:  ballapete  |      Owner:  (none)
      Type:  defect     |     Status:  new
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:  2.6.2
Resolution:             |   Keywords:  tiger ppc
      Port:  meson      |
------------------------+-----------------------

Comment (by kencu):

 at present, on systems that support @rpath, meson uses @rpath during the
 build and test phase.

 From the top of the build directory, the @rpath library references are
 constructed and embedded into the executables. The libraries are all named
 with the @rpath/dylibname.dylib syntax, no matter where they are in the
 build tree, usually.

 Then later, at the install phase, all the @rpath references are stripped
 out, the libraries are installed with their final full static names, and
 any installed executables are rejigged to point to those final installed
 library names.

 meson assumes darwin is a standard @rpath using system, which it is, on
 10.5+, and so meson is written assuming darwin is using @rpath.

 I hacked meson to use @loaderpath instead of @rpah for the library names,
 and this works surprisingly well, except with the libraries in the build
 directory are not in the same folder as the executables in the build
 directory, in which case it fails as it doesn't know what subdirectory to
 look in.

 Instead of @loaderpath, if I could make meson use the full library path
 name, even in the build directory, then it would all work. Some other
 systems, like Windows, do this with meson. But there are intricacies to it
 and you can't just Bogart meson to use the full library path name on
 darwin like it does on windows, as there are many places in meson that
 windows or darwin code paths diverge.

 I often can fix these manually -- changing the library path names in the
 build directory, or symlinking or moving a library into a workable spot --
 but I'm not about to write a bunch of spaghetti like that for meson ports
 in general, so I have not been uploading that crud to MacPorts.

 It can be done -- making darwin not use @rpath, but use full path names
 like windows does -- but meson is a moving target, and it would be a
 project to do it -- and unless upstream is interested in taking this on,
 it's kindof a lost cause. And upstream has almost NO darwin users, and
 certainly NONE that use legacy systems. So that is a long long long shot.

 We could fork meson and make it not use @rpath -- I am not interested in
 that project. Life is too short for me to do that.

 SO -- we hack a bit, hope for the best, peg the really tricky ones like
 at-sp2-atk.

 I am wondering if a wrapper script for ld might be written that could make
 @rpath references work. OR if the dyld from Leopard could be built and
 installed on Tiger as that one supports @rpath.

 BUT unless we sort this out soon, Tiger is doomed as meson, with all it's
 warts, seems to be taking up a prime place in the GNOME world.

-- 
Ticket URL: <https://trac.macports.org/ticket/60165#comment:12>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list