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 Live Datamart. See "StreamBase-Configued 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 Live Datamart Client APIs. In particular, use sb-config to:

-- Return the full paths to the Java commands that this StreamBase and Live Datamart installation is currently configured to use with the Java Client API.
-- Return the path to the JAR files that implement the StreamBase and Live Datamart 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 script.

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 execute 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 "StreamBase-Configued Shells" 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  (Linux, macOS, and Windows)

Returns the path to the java command used by the current StreamBase and Live Datamart installation. By default, this option returns the java command from the embedded JDK bundled with the StreamBase installation; however, if the current environment specifies STREAMBASE_USE_INTERNAL_JDK=false, this option returns $JAVA_HOME/bin/java.

--javac  (Linux, macOS, and Windows)

Returns the path to the javac Java compiler used by the current StreamBase and Live Datamart installation. By default, this option returns the javac command from the StreamBase embedded JDK, but honors the setting of the STREAMBASE_USE_INTERNAL_JDK variable, as above.

--libs  (Linux and macOS only)

Returns the C++ linker flags appropriate for building StreamBase and Live Datamart 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 Live Datamart Java client applications. See the --classpath option above for StreamBase-only development.

--pypath  (Linux and Windows only)

Returns the path to the appropriate version of the StreamBase Python Client library to use to match the default version of Python detected on your system. Use this option when setting the PYTHONPATH environment variable. For example: export PYTHONPATH=`sb-config --pypath`:$PYTHONPATH.

On Linux, the versions of Python supported can be determined from the names of the python* directories under STREAMBASE_HOME/lib64, such as python2.7.

On Windows, this option requires the presence of a Windows Python 2.7 installation from Python.org or ActiveState, with the python.exe command available in the PATH.

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