FAQ » History » Version 9

« Previous - Version 9/12 (diff) - Next » - Current version
J. Moringen, 12/15/2011 03:45 PM
explain server=auto in question regarding tcp-based transport


FAQ

[C++, Python] I compiled and installed successfully, but communication does not work

Starting with version 0.5, RSB uses a transport that implements communication within a single process by default. In other words, network communcation is disbabled by default.

This can be changed in three ways:

  1. Globally for all RSB programs running under the UNIX user
    Create or modify a RSB configuration file ~/.config/rsb.conf to contain the following lines:
    [transport.spread]
    enabled = 1
    [transport.inprocess]
    enabled = 0
    

    Lines 3 and 4 can be omitted to enable both transports in parallel.
  2. Locally for the current directory
    Create a RSB configuration file $(pwd)/rsb.conf with the same contents as described above.
  3. For the current shell
    Set and export environment variables as follows
    $ export RSB_TRANSPORT_SPREAD_ENABLED=1
    $ export RSB_TRANSPORT_INPROCESS_ENABLED=1
    

[C++] I compiled and installed successfully, but RSB binaries/libraries produce linker errors at runtime

The C++ implementation of RSB is built without fixed rpath by default. As a result, installed RSB binaries and libraries do not contain information regarding the location of their dependencies. This potentially causes runtime linking to fail because the dependencies cannot be located.

There are two possible solutions:

  1. Building and installing RSB with fixed rpath
    This can be achieved by configuring RSB with
      cmake -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE
      

    This CMake standard mechanism instructs CMake to set the RPATH of installed libraries and executables to the values used for building them. Normally the RPATH is stripped at installation time.
  2. Use of the LD_LIBRARY_PATH variable
    When the value of LD_LIBRARY_PATH contains the directory/directories into which RSB (and its dependencies) have been installed, these dependencies can be located at runtime. LD_LIBRARY_PATH can be set, for example, like this
      $export LD_LIBRARY_PATH=$prefix/lib
      

    where $prefix is the prefix directory into which RSB and its dependencies have been installed.

    This workaround is not permanent and has to be repeated for each new shell that should be able to execute RSB binaries or RSB-based programs.

[C++,Common Lisp] How can I use the TCP-based transport?

Note that the TCP-based transport is experimental and currently only available in the C++ and Common Lisp implementations

The TCP-based transport can be activated locally or globally by placing the following content in $HOME/rsb.conf or $(pwd)/.config/rsb.conf respectively.

[transport.inprocess]
enabled = 0

[transport.spread]
enabled = 0

[transport.socket]
enabled = 1
host    = HOSTNAME
port    = 4444
server  = auto  

HOSTNAME can be localhost (if all processes are going to run on the same node), a host name of an IP address.

The above configuration uses server = auto which causes the initial process to create the specified server and subsequent processes to connect to that server.