[Qbs] Rule to create library symlinks on macos

Maximilian Hrabowski hrabowski at bee360.com
Sat Jul 13 12:21:25 CEST 2024


Hi all,

i use qbs on macos to combine arm64 and x86_64 library builds into one universal library.  My application compiles and links, but cannot start because the install names/lib names used when linking the app are not correct – or – basically they are correct but when combining the builds using lipo, no corresponding symlinks are created. So there is a symlink missing thus the app fails to load the library at start up.

E.g.


  *   Library file name of prebuild binaries is “libfmt.11.0.0.dylib”, there are symlinks “libfmt.dylib” and “libfmt.11.dylib” in the original single arch builds
  *   Qbs created the universal lib “libfmt.11.0.0.dylib” and a symlink “libfmt.dylib” but NO symlink “libfmt.11.dylib”
  *   The app is linked using the intall-name “libfmt.11.dylib”


  *   App cannot start because “libfmt11.dylib” cannot be found

I could now manually create the missing link on deployment, but…

Is there is a way to explicitly create the missing symlink with qbs?

I created a bug report to illustrate the problem: https://bugreports.qt.io/browse/QBS-1797

Cheers,
Maxim

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20240713/8ee23618/attachment.htm>


More information about the Qbs mailing list