This chapter includes instructions to install and setup Genero BDL.
Summary:
See also: Tools and Components, Localization Support, Environment Variables.
Before starting your development with a new version of Genero BDL, we strongly recommend you to read the Upgrade Guide corresponding to the newly installed version. For example, see the 2.3x Upgrade Guide.
The Genero BDL improvements can be found in the New Features section of this documentation.Contact you support channel to get the list of corrected defects in the new Genero BDL version.
Genero BDL is supported on a large brand of operating systems, such as Linux, IBM AIX, HP-UX, SUN Solaris, Mac OS/X and Microsoft Windows.
You must install the Genero BDL software package corresponding to the operating system that you use. For the detailed list of supported operating systems, refer to the relevant Installation Guide or contact your support center.
To connect to a database server, you need the database client software to be installed on the system where you run the Genero BDL programs.
Below is a list of database client software examples:
Database drivers are provided as pre-linked shared libraries. There is no need to link a runner or driver on site, but the database client software must provide a shared library corresponding to the one used to link the driver. The table in the next section lists supported database client software versions and the corresponding shared libraries that must exist on the system.
The database driver to be selected must correspond to the database client type and version. For the list of supported database drivers, see the driver table in the Database Connections section. See also Operating System Specific Notes.
If your Genero application requires runtime system C Extensions to execute, you need a C compiler and linker to build the extension library.
On UNIX platforms, you need a cc compiler on the system where you create the C extension libraries. Some systems may not have a C compiler by default. Make sure you have a C compiler on the system.
On Windows platforms, it is mandatory
to install Microsoft Visual C++ version 7.1 or higher on the system where you create the
C extension libraries. You must install the appropriate Genero BDL package according to the version of
Visual C++ you have installed. For example, when using Visual C++ 8, you must
install the package marked by the w32vc80
operating system
identifier.
If you are using the Java Interface in your application programs, you need to install the latest Java Runtime Environment (JRE).
Search the internet for latest JRE packages available for your platform.
The minimum required JRE version is Java 6.10.
The Genero BDL product is provided in different forms of installation programs, and can also be shipped in a bundle package with other Genero products. Refer to the appropriate Installation Guide for a detailed description of the installation procedure. Do not hesitate to contact your support if you need help.
After installing Genero BDL, you should:
After upgrading Genero BDL to a newer version, follow the next steps:
On HP/UX, the shared library loader cannot load libraries using Thread Local Storage (TLS), like Oracle libclntsh. In order to use shared libraries with TLS, you must use the LD_PRELOAD_ONCE environment variable. For more details, search for "shl_load + Thread Local Storage" on the HP support site.
On HP/UX LP64, the PostgreSQL database driver should be linked with the libxnet library if you want to use networking. You can force the usage of libxnet by setting the LD_PRELOAD_ONCE environment variable to /lib/pa20_64/libxnet.sl.
When using the Java Interface with the SUN Hotspot JVM:
If you get an error when fglcomp or fglrun try to load the libjvm library, use the LD_PRELOAD environment variable:
$ LD_PRELOAD=libjvm.sl
$ export LD_PRELOAD
Note that using LD_PREPLOAD can make other application fail. LD_PRELOAD should only be set for Genero BDL tools. If you need to run other applications in the same environment as Genero BDL programs, you can set the LD_PRELOAD_ONCE or JAVA_PRELOAD_ONCE variable in the shell scripts found in FGLDIR/bin.
The LIBPATH environment variable defines the search path for shared libraries. Make sure LIBPATH contains all required library directories, including the system library path /lib and /usr/lib.
On AIX, shared libraries are usually provided in .a archives containing the shared object(s). For example, the DB2 client library libdb2.a contains both the 32 bit (shr.o) and the 64 bit (shr_64.o) versions of the shared library. Not all products follow this rule: for example Oracle 9.2 provides libclntsh.a with shr.o on 64 bit platforms, and Informix provides both .a archives with static objects and .so shared libraries as on other platforms.
The Genero database drivers are created with the library archives or with the .so shared objects, according to the database type and version. No particular manipulation is needed to use any supported database client libraries on this platform.
On IBM AIX, you can check the library dependencies with the dump command:
$ dump -Hv -X64 dbmora92x.so
In production environments, AIX loads shared libraries into the system shared library segment in order to improve program load time. Once a shared library is loaded, other programs using the same library are just attached to that memory segment. This works fine as long as you don't need to change the shared library (to replace it with a new version for example).
Once a shared library is loaded by the system, you cannot copy the executable file unless you unload the library from the system memory. Thus, you will probably need to unload the Genero shared libraries before installing a new version of the software. This problem occurs when installing in the same directory, but can also happen when installing in a different directory. As shared libraries will have the same name, AIX will not allow to load multiple versions of the same library. Therefore, before installing a new version of Genero, make sure all shared libraries are unloaded from the system memory.
To get the list of shared libraries currently loaded into memory, use the genkld command. The genld command collects the list of all processes and reports the list of loaded objects corresponding to each process. Then, use the slibclean command to unload a shared library from the system shared library segment.
When using a thread-enabled shared library like Oracle's libclntsh, the program using the shared object must be linked with thread support, otherwise you can experience problems (like segmentation fault when the runner program ends). IBM recommends using the xlc_r compiler to link a program with pthread support.
By default, the runtime system provided for AIX platforms is linked with pthread support.
You need Microsoft Visual C++ compiler to create C Extensions. Make sure you have installed the correct Genero package, according to the MSVC version you have installed on your system. MSVC runtime libraries of different VC++ versions are not compatible. Refer to the name of the Genero package to check the VC++ version compatibility.
Microsoft Visual C provides the dumpbin utility.
To check for DLL dependency, you can use the /dependents option:
C:\ dumpbin /dependents mylib.dll
Microsoft (R) COFF/PE Dumper Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file mylib.dll
File Type: EXECUTABLE IMAGE
Image has the following dependencies:
isqlt09a.dll
MSVCR71.dll
KERNEL32.dll
Summary
1000 .data
1000 .rdata
1000 .text
On Windows platforms, the fglrun.exe binary has a predefined C stack size. In some rare cases (for example, if your programs do deep recursion), you may need to change the stack size of fglrun.exe binary to avoid stack overflow. You can change this permanently by patching the EXE file with a Microsoft Visual C++ utility called editbin. By default, the C stack size of fglrun.exe is 1MB.
You can check the stack size by running the dumpbin VC++ utility on fglrun.exe:
C:\ dumpbin /headers %FGLDIR%\bin\fglrun.exe
Search for the line containing "stack reserve" words in the OPTIONAL HEADER VALUES section:
OPTIONAL HEADER VALUES
...
100000 size of stack reserve
Note that the stack size is displayed in hexadecimal value, so 100,000 = 1,048,567 bytes = 1MB.
In order to modify the stack size of fglrun.exe, run the the editbin VC++ utility on fglrun.exe:
C:\ editbin /stack:1000000 %FGLDIR%\bin\fglrun.exe
See Microsoft Visual C++ documentation for more details about these tools.