Skip to content
  • Yuta Saito's avatar
    48644e71
    tool/runruby.rb: remove LD_PRELOAD-like env-var options from runruby.rb · 48644e71
    Yuta Saito authored
    LD_PRELOAD sometimes forces loading libraries into unrelated
    executables. For example, macOS on recent Apple Silicon can execute
    arm64 and arm64e binaries by default, and /usr/bin/clang is built as
    arm64e. If Ruby is built as arm64, and mkmf launched through runruby.rb
    spawns /usr/bin/clang, dynamic loader tries to load libruby (arm64e)
    into clang (arm64). This force-load causes library load failure.
    In theory, we don't need both LD_PRELOAD and LD_LIBRARY_PATH at the same
    time, because executables requiring libruby already have libruby
    dependency, so LD_LIBRARY_PATH is enough for this case.
    48644e71
    tool/runruby.rb: remove LD_PRELOAD-like env-var options from runruby.rb
    Yuta Saito authored
    LD_PRELOAD sometimes forces loading libraries into unrelated
    executables. For example, macOS on recent Apple Silicon can execute
    arm64 and arm64e binaries by default, and /usr/bin/clang is built as
    arm64e. If Ruby is built as arm64, and mkmf launched through runruby.rb
    spawns /usr/bin/clang, dynamic loader tries to load libruby (arm64e)
    into clang (arm64). This force-load causes library load failure.
    In theory, we don't need both LD_PRELOAD and LD_LIBRARY_PATH at the same
    time, because executables requiring libruby already have libruby
    dependency, so LD_LIBRARY_PATH is enough for this case.
Loading