[scl.org] SCL packages and linker paths

Miroslav Suchý msuchy at redhat.com
Tue Jul 28 12:33:08 UTC 2015


Dne 27.7.2015 v 02:11 Noah Kantrowitz napsal(a):
> Hi there. I'm working on some Chef tooling for Python and Ruby to allow swapping runtimes in a modular way. The easiest way to do this is to pass through different paths to a Python binary. For system packages, it uses /usr/bin/python while for SCL it uses /opt/rh/<something/root/usr/bin/python. This means not using the `scl enable` command though, which presents a problem. Most of the environment variables set in the enable files are nice but not required, but LD_LIBRARY_PATH presents an issue. Because the SCL binaries do not have an RPATH in their header, they simply fail to start in most cases, or locate the wrong libraries if there is overlap with system packages. Is there a compelling reason to not bake this RPATH into the SCL binaries directly? This would make it much easier to build tooling that treats the Python and Ruby packages as just another way to install things.

The easiest way is to create wrapper.

I created one for ruby193 SCL:
  http://koji.katello.org/koji/buildinfo?buildID=4636

Where is just one file /usr/bin/ruby193-ruby with content:
#!/bin/bash
COMMAND="ruby $@"
scl enable ruby193 "$COMMAND"

and in program which should use ruby from ruby193 SCL you will just pass
  #!/usr/bin/ruby193-ruby
as shebang on first line.

-- 
Miroslav Suchy, RHCA
Red Hat, Senior Software Engineer, #brno, #devexp, #fedora-buildsys




More information about the SCLorg mailing list