maxchuquimia / xcgrapher

Framework-level dependency graph generator for Xcode projects - with support for custom graphing
101 stars 8 forks source link

Library not loaded: @rpath/libXCGrapherPluginSupport.dylib #13

Closed Ewg777 closed 2 years ago

Ewg777 commented 3 years ago

Setup: MacOS 11.6, M1 Steps to reproduce:

brew tap maxchuquimia/scripts
brew install xcgrapher
gem install xcodeproj 
xcgrapher

Output


dyld: Library not loaded: @rpath/libXCGrapherPluginSupport.dylib
  Referenced from: /opt/homebrew/bin/xcgrapher
  Reason: image not found
[1]    4170 abort      xcgrapher
paxos commented 2 years ago

I got it to work by cloning and by following the instructions in the readme (running make). Seems only to affect the brew version.

omarzl commented 2 years ago

This happens because in Apple Silicon computers the Homebrew installation directory changed. You can sort this issue by setting manually the DYLD_LIBRARY_PATH before running xcgrapher:

export DYLD_LIBRARY_PATH="$(brew list xcgrapher | grep 'bin/xcgrapher' | sed 's#/bin/xcgrapher##')/lib"
xcgrapher --project Example.xcodeproj --target Example --pods
maxchuquimia commented 2 years ago

I finally got an M1 two days ago so I can test and resolve this soon, sorry for the delay everyone :)

maxchuquimia commented 2 years ago

Have forced the mapping of @rpath in the makefile (for now...?) and updated the brew formula. It seems to work on both M1s and older machines now 🎉

paxos commented 2 years ago

Thank you!