FAQ » History » Version 10

Version 9 (J. Moringen, 12/15/2011 03:45 PM) → Version 10/12 (J. Moringen, 12/19/2011 02:47 PM)

h1. FAQ

{{>toc}}

h2. [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:

# 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:
<pre>
[transport.spread]
enabled = 1
[transport.inprocess]
enabled = 0
</pre>
Lines 3 and 4 can be omitted to enable both transports in parallel.
# Locally for the current directory
Create a RSB configuration file @$(pwd)/rsb.conf@ with the same contents as described above.
# For the current shell
Set and export environment variables as follows
<pre>
$ export RSB_TRANSPORT_SPREAD_ENABLED=1
$ export RSB_TRANSPORT_INPROCESS_ENABLED=0 RSB_TRANSPORT_INPROCESS_ENABLED=1
</pre>

h2. [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":http://en.wikipedia.org/wiki/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:

# Building and installing RSB with fixed rpath
This can be achieved by configuring RSB with
<pre>
cmake -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE
</pre>
This CMake standard mechanism instructs CMake to set the "RPATH":http://en.wikipedia.org/wiki/Rpath of installed libraries and executables to the values used for building them. Normally the RPATH is stripped at installation time.
# 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
<pre>
$export LD_LIBRARY_PATH=$prefix/lib
</pre>
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.*

h2. [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.
<pre>
[transport.inprocess]
enabled = 0

[transport.spread]
enabled = 0

[transport.socket]
enabled = 1
host = HOSTNAME
port = 4444
server = auto
</pre>

@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.