StarQuest Technical Documents

Linux Prerequisites for StarSQL, StarAdmin & StarLicense

Last Update:1 June 2022
Product: StarSQL
Version: 6.2
Article ID: SQV00SQ065

Abstract

When StarSQL and StarLicense are deployed to a different environment than the one in which they were built (e.g. a later distribution of Linux), it is sometimes necessary to install prerequsite packages.

This is especially true for installing 32-bit packages in a 64-bit environment, as the 32-bit runtime libraries are not installed by default in most recent Linux distributions.

The techniques described in this technical document apply to RPM-based Linux distributions such as Red Hat, CentOS, SUSE, and Oracle. Similar techniques are available on Debian & Ubuntu distributions.

These techniques can also be used to identify missing dependencies for 64-bit packages.

Note that the version numbers included in package names may differ.

Solution

StarSQL 6.4x on Red Hat/CentOS 8.x and other recent Linux distributions:

StarSQL 6.4x introduced support for TLS/SSL based on OpenSSL 1.0.2 as included in RHEL/CentOS/Oracle 7.7. If you are using a recent Linux distribution with OpenSSL 1.1.x or 3.0.x, install the compatibility package for OpenSSL 1.0.x:

# yum install compat-openssl10
# yum install compat-openssl10-i686 (for 32-bit)

This is required even if you are not using TLS/SSL communications; failure to install the compatibility package may result in one of these error messages (which are generic and may result from other causes):

SQLState = 08004, [unixODBC][StarSQL][StarSQL CLI Driver]Some connection parameters are missing for Data Source.

SQLState = IM005, [unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_DBC failed

ldd /usr/share/starsql64/lib/libSWTCP32.so will show missing dependencies.

On Red Hat 9.x and compatible distributions, it may be necessary to obtain the RPM package from the 8.x repository and use rpm -i to install it.

libodbcinst.so symbolic link missing from unixODBC 2.3.9 (Red Hat 9)

When using the unixODBC 2.3.9 package supplied with Red Hat 9.x and compatible distributions, you may need to create a symbolic link for /usr/lib64/libodbcinst.so.

The initial error was
SQLState = IM005, [unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_DBC failed

setting the environment variable $_STARSQL64, resulted in the more useful message
symbol lookup error: /usr/share/starsql64/lib/libSWODBC.so: undefined symbol: SQLGetPrivateProfileString
.

Solution:

# cd /usr/lib64
# ls -l libodbcinst.so*
If libodbcinst.so does not exist:
# ln -s libodbcinst.so.2.0.0 libodbcinst.so

StarSQL

StarSQL is available in both 64-bit and 32-bit versions; installing the 32-bit version may be desirable if the ODBC application is also 32-bit. Typically, there are no problems installing the 64-bit version of StarSQL, so this technical document highlights issues installing 32-bit software.

To identify missing packages, locate the StarSQL RPM in the installation directory and run a command like this:

# rpm -i starsql-6.28-1.i386.rpm

This will either install the product or list missing libraries. If the installation succeeds, then all prerequisites are present; however, the installation of StarSQL is incomplete since the post-install procedure was not run; at this point, you should remove the product and reinstall using the setup shell script:

# rpm -e starsql
# ./setup

But in most situations there will be missing libraries, at least for 32-bit. You can ignore libodbc.so.1 and libodbcinst.so.1, since the recommended version of unixODBC is included in the StarSQL distribution.

Other methods of identifying missing libraries are:

  • Run the product - you should receive an error listing the missing libraries
  • Use the ldd command and note which libraries are listed as Not Found.

After determining the name of the missing library, use
# yum provides <library-name>
to determine the name of the installer package that includes the missing library.

The missing libraries can be divided into two groups:

  • Those needed for 32-bit runtime support (C++ runtimes, etc)
  • Those needed for GUI support (QT3, X Windows, etc)

To install the missing 32-bit support, run the following:

# yum install libstdc++.i686 openssl-libs.i686

This will also include the dependencies glibc.i686, libgcc.i686, nss-softokn-freebl. Note that the 32-bit support for openssl-libs (and compat-openssl10-i686 on Red Hat 8 & later) is required for StarSQL 6.4x & later, even if you are not using TLS/SSL communications.

After installing the 32-bit runtimes, running rpm -i starsql-6.28-1.i386.rpm should now display only the dependencies for QT3 and X-Windows (and ODBC), and you should be able to run the non-GUI components of StarSQL.

Note that support for the GUI applications (ODBCConfig and the supplied samples odbctest, DataManager, and DataManagerII) has been deprecated; these applications will be removed from a future version of StarSQL.

To add GUI support, run the following:

Use this command to determine which Linux package contains the missing library libqt-mt.so.3:
# yum provides libqt-mt.so.3

Run this command (using the appropriate package name) to install that package and its dependencies:
# yum install qt3-3.3.8b-30.el6.i686

 

Version-specific instructions for Qt3

On RHEL/CentOS/Oracle 7

# yum install qt3 libpng12 libpn15
(this will also bring in the dependency libmng)

On RHEL/Oracle 8

qt3 and libmng are not present in the v8 repositories, but they can be downloaded from the 7.x repository. Also, libpng.so.3 is present in the v7 RPM, but missing in v8. You can either browse a 7.x repository, run the following on a 7.x system:

# yum install --downloadonly --downloaddir=/tmp qt3 libmng libpgn12

Then transfer the RPM files to the 8.x system and run:

# rpm --nodeps -i qt3-3.3.8b-51.el7.x86_64.rpm libmng-1.0.10-14.el7.x86_64.rpm libpng12-1.2.50-10.el7.x86_64.rpm
# yum install libpng15

If you have a need to run the v8 version of libpng12, extract libpng.so.3 from the v7 RPM rather than installing it.

On Amazon Linux

$ sudo yum install qt3-3.3.8b-51.amzn2.0.2
$ sudo yum install libpng12-1.2.50-10.amzn2.0.2

StarLicense

As of v1.40 (April 2020), StarLicense Server is available as a 64-bit package (recommended). See below for dependencies if you have a reason to install the 32-bit package.

When installing StarLicense on a recent distribution (RHEL 8.x), the following dependency was noted:

libnsl.so.1()(64bit) is needed by starlicense-1.40-1.x86_64

and resolved by doing the following:
# yum provides libnsl.so.1
# yum install libnsl-2.28

32-bit package of StarLicense

To install the 32-bit package, the following considerations apply:

Run the following to install the 32-bit C and C++ runtime libraries:

# yum install libstdc++.i686

This will also include the dependencies glibc.i686, libgcc.i686, nss-softokn-freebl.

You can use the following to verify that dependencies are met (install the product with RPM, remove it, and reinstall with the setup script):

# rpm -i starlicense-1.33-1.i386.rpm
(this will either display missing libraries, or succeed)
# rpm -e starlicense
# ./setup

StarAdmin

When running StarAdmin on a Linux system, you may encounter the following error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-pi-gtk-3452 or swt-pi-gtk in swt.library.path, java.library.path or the jar file

This error message is misleading - libswt-pi-gtk-3452.so is present in the lib subdirectory of the StarAdmin distribution, which is added to LD_LIBRARY_PATH in the staradmin shell script. Use the ldd command to determine if there are any missing dependencies:

$ cd /opt/StarQuest/staradmin/lib
$ ldd libswt-pi-gtk-3452.so
libgtk-x11-2.0.so.0 => not found

Use yum provides to determine the package containing the missing dependency and install it:

$ yum provides libgtk-x11-2.0.so.0
# yum install gtk2-2.24.23-9.el6

 

 


DISCLAIMER

The information in technical documents comes without any warranty or applicability for a specific purpose. The author(s) or distributor(s) will not accept responsibility for any damage incurred directly or indirectly through use of the information contained in these documents. The instructions may need to be modified to be appropriate for the hardware and software that has been installed and configured within a particular organization.  The information in technical documents should be considered only as an example and may include information from various sources, including IBM, Microsoft, and other organizations.