Skip to content

osxrelocator: Fix framework entrypoints being unable to load dylibs

amyspark requested to merge amyspark/cerbero:add-yet-more-workarounds-rpath into main

This is unexpected fallout from !1478 (merged) and !1485 (merged). It was reported on the GStreamer Matrix room that GStreamer.framework would not either load or, once its RPATH is manually inserted, it would refuse to forward any of the reexported dylibs.

This is because of two reasons:

  • the framework is generated as <cerbero dist folder>/lib/GStreamer, then repacked (post having been relocated and merged as a normal lib)
  • the framework entrypoint is already relocatable, so once OSXRelocator touches it, its relocatable, working dylib ID is replaced with a "correct" (for a lib) but broken one

This MR works around it by validating the dylib ID and skipping it if it's already relocatable, and adding the relevant RPATHs.

Let me know what you think. I'll refer the user to this MR so that they can check if it works with their test app now.

Merge request reports

Loading