sb-config

StreamBase Compiler Environment Utility — a tool to set StreamBase working environment and to set client API development flags

SYNOPSIS

sb-config [OPTION]

DESCRIPTION

sb-config is a convenience utility primarily used with its --env option to set the shell environment for using StreamBase and LiveView. See "StreamBase-Configured Shells" in the StreamBase Installation Guide for information on using this option in shell startup files.

The tool is also used to return development values that can be used in environment variables or build-related scripts to configure the command-line environment for use with one of the StreamBase or LiveView Client APIs. In particular, use sb-config to:

-- Return the full paths to the Java commands that this StreamBase and LiveView installation is currently configured to use with the Java Client API.
-- Return the path to the JAR files that implement the StreamBase and LiveView Java Client APIs.
-- Return compiler and linker environment variables configured for compatibility with the C++ Client API for the current StreamBase installation.
-- Return the full path to the StreamBase Python Client API library, for use in PYTHONPATH variables or other Python related scripts.

The options --env, --cflags, and --libs might emit shell lines or fragments that contain double quotes such that any spaces in the emitted line do not break up a variable definition or a command line option. On Linux and macOS, this behavior interacts as expected with the shell eval command and with back quote operators.

This command's other options do not put quotes around emitted paths that contain spaces, because the output of these options is likely to be combined with other members of a PATH, CLASSPATH, or other PATH-like variable. If your StreamBase installation path contains spaces, you might need to make sure your build script or Makefile uses double quotes around the expansion of the sb-config output that you capture in a variable.

OPTIONS

--cflags  (Linux and macOS only)

Returns the C++ compiler flags required for building StreamBase C++ client applications. Use this option in build scripts or in Makefile statements such as SB_CLIENT_CFLAGS=`sb-config --cflags`.

--classpath  (Linux, macOS, and Windows)

Returns the path to the StreamBase client library JAR file that must be added to the classpath when building and running StreamBase Java client applications. See the --live-data-client-classpath option below for LiveView client development.

--cxx  (Linux and macOS only)

Returns the path to the default C++ compiler detected on your system. Use this option in Makefiles in statements such as CXX=`sb-config --cxx`.

--env  (Linux, macOS, and Windows)

Returns, but does not execute, the commands to set environment variables for running StreamBase utilities at the command prompt. With macOS and Linux shells, use the output of sb-config --env with eval or a similar command to run the commands returned. For all platforms, returns a setting for STREAMBASE_HOME and prepends the StreamBase bin directories to the PATH. For macOS and Linux, also returns a setting for MANPATH. See the StreamBase-Configured Shells page in the StreamBase Installation Guide for information on using this option in shell startup files.

--help, -h  (Linux, macOS, and Windows)

Displays a usage message, then exits. Using the sb-config command with no arguments also shows usage.

--java-home  (Linux, macOS, and Windows)

Returns the full absolute path to the directory that contains a system-installed JDK, or StreamBase-bundled JDK, to be used with StreamBase Studio and StreamBase command-line utilities. Whether this option returns the path to a system or bundled JDK depends on the setting, if any, of the STREAMBASE_USE_INTERNAL_JDK environment variable, as follows:

  • fallback — If set to fallback, or not set, this configures Studio to try to locate a system-installed JDK, and to use the Streaming bundled JDK only if an acceptable system JDK is not found.

  • true — Always use the JDK bundled with Streaming. This was the default value of STREAMBASE_USE_INTERNAL_JDK before release 10.4.0.

  • false — Use the JDK specified in the JAVA_HOME environment variable, if set. JAVA_HOME must be set to the full, absolute path to the top-level directory containing your JDK.

    If set to false, but no JAVA_HOME is defined, Streaming searches the system PATH for a JDK. If not found, Streaming looks in standard installation locations for a JDK. If still not found, Studio does not start.

--java  (Linux, macOS, and Windows)

Returns the path to the java command used by the current StreamBase and LiveView installation, using the same rules as for --java-home, above. By default, this option returns the java command from a system-installed JDK.

--javac  (Linux, macOS, and Windows)

Returns the path to the javac Java compiler used by the current StreamBase and LiveView installation, using the same rules as for --java-home, above.

--libs  (Linux and macOS only)

Returns the C++ linker flags appropriate for building StreamBase and LiveView C++ client applications.

--live-data-client-classpath  (Linux, macOS, and Windows)

Returns the path to the LiveView client API JAR files plus the StreamBase client library JAR file that must be added to the class path when building and running LiveView Java client applications. See the --classpath option above for StreamBase-only development.

--pypath  (Linux only)

Returns the path to the StreamBase Python Client library. Use this option when setting the PYTHONPATH environment variable. For example: export PYTHONPATH=`sb-config --pypath`:$PYTHONPATH.

On Linux, the Python client library is installed in the python2.7 directory under $STREAMBASE_HOME/lib64.

--version

Returns version information and exits.

EXAMPLES

The following examples are for use at a macOS or Linux shell prompt, or at the Bash prompt of a UNIX-like environment under Windows such as Cygwin.

The next line sets the CXX environment variable to the path to the compiler used to build the StreamBase libraries and binaries in the current release of StreamBase.

CXX=`sb-config --cxx`

The following line uses the specified compiler ($CXX) to compile MyClientApp.cpp, using the same compiler flags used to build the StreamBase libraries (sb-config --cflags). (The -c and -o are options for the compiler, not for sb-config.)

$CXX MyApplication.cpp `sb-config --cflags` -c -o MyApplication.o

The next line links the object file generated by the above line.

$CXX MyApplication.o `sb-config --libs` -o MyApplication

The next lines show how to compile and run a StreamBase Java client application.

javac -classpath `sb-config --classpath` MyApplication.java

java -classpath `sb-config --classpath`:. MyApplication