johnfairh / RubyGateway

Embed Ruby in Swift: load Gems, run scripts, call APIs seamlessly in both directions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dyld: warning, DYLD_ setting caused circular dependency

xareelee opened this issue · comments

I've Installed RubyGateway by Xcode's Swift Package Manager, and just built and run the app (without any additional code). It shows a warning in the debug console:

dyld: warning, DYLD_ setting caused circular dependency in /usr/lib/libruby.2.6.dylib

My shell output:

$ command -v ruby              
/usr/local/opt/ruby/bin/ruby

$ ruby -v               
ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-darwin20]

$ ls /usr/lib/libruby.2.6.dylib                                                                        
ls: /usr/lib/libruby.2.6.dylib: No such file or directory

Not sure what the warning is.


After adding some Swift code and run, it shows:

print("\(Ruby.version)")    // => 2.6.3

My shell ruby seems to be installed by homebrew.

$ brew info ruby
ruby: stable 2.7.2 (bottled), HEAD [keg-only]

You probably need to study this section of the readme.

My guess is that Xcode is using the system Ruby (check /usr/bin/ruby -v) rather than the version you have installed with homebrew.

RubyGateway doesn't set any DYLD_ variables, I don't know what that error message is about.