Project

General

Profile

Patching and Building Customized 3rd Party Libraries

This documents the process for patching and building customized 3rd party libraries for FWD v4.0.0.

To see the details for:

FWD depends upon a range of third party software. Some of that third party software has been modified, fixed or otherwise customized for the needs of FWD. For most of the common development tasks a FWD developer will have no need to make modifications to these third party projects. However, there are times when the ability to debug into or modify such projects is important. This chapter describes the setup process for each of the customized projects upon which FWD is dependent.

The modified version of the H2 project is already built. It gets downloaded automatically as a dependency when FWD is built. For that projects, the setup described in this chapter is not necessary to have a working FWD development environment. It is only necessary if modifications are needed to the 3rd party software or if it is necessary to use a debugger or other tools (e.g. a profiler) to step through or otherwise analyze that software.

The patching of NCURSES is necessary on the FWD build system and on the FWD client systems.

NCURSES

On Linux and UNIX, the native terminal support in the libp2j.so library depends on a customers version of NCURSES. The full details on this can be found in Patching NCURSES.

TERMINFO

On Linux and UNIX, the native terminal support depends upon NCURSES which in turn is configured by the TERMINFO database. This defines the specifics of how each terminal type handles particular control characters/escape sequences. This step is only needed if you choose to run the FWD client with the native (console) driver.

Please see Patching TERMINFO for the details.

Foreign Function Interface

On Windows, the Foreign Function Interface (libffi) project does not provide a Windows binary for download. As a convenience, the FWD project has created and does provide the 32-bit and 64-bit pre-built libffi6.dll archives.

Please see Building and Installing libffi on Windows for details on building libffi from source code.

H2

The H2 database (see www.h2database.com) is used in embedded mode for temporary table support and for internal runtime housekeeping. Also, the H2 database can be used for permanent databases, either in embedded or TCP mode, but is not recommended for production use. It is recommended to limit H2 usage to testing or development purposes.

A modified version of the H2 database is currently used by the FWD project. It is based on H2 version 1.4.200.

Obtaining the Source Code

In the latest FWD versions, we use a custom fork of the 1.4.200 H2 version. We refer to this as the FWD-H2 project. This sub-section is kept for reference.

1. Download sources from:

2. Download the patch from the download area: h2_database_1.4.200_fwd_6.patch

Build

1. Make sure JAVA_HOME environment variable is set. If not, you can specify path to Java home directory using export command. E.g.:

export JAVA_HOME=/usr/lib/jvm/default-java

2. Go inside FWD-H2 project
  • FWD-H2 branch
    cd <name-of-the-fwd-h2-branch>/
    
  • FWD-H2 trunk
    cd trunk/
    

3. Build FWD-H2:

chmod +x build.sh
./build.sh jar

4. Execute tests (optional):
  • FWD-H2 memory tests
    ./build.sh testMemory
  • FWD-H2 persistent tests
    ./build.sh testPersistent
  • FWD-H2 server tests
    ./build.sh testServer
  • FWD-H2 all FWD tests (memory + persistent + server)
    ./build.sh testFWD
    

Post-Build

The rebuilt H2 jar file must be properly renamed and copied to $P2J. The FWD build script allows the use of local jar dependencies. The idea is to put the desired jars into the project directory named local-repo following the maven repository structure.

mkdir -p $P2J/local-repo/com/goldencode/fwd-h2/1.4.200-6
cp bin/h2-1.4.200.jar $P2J/local-repo/com/goldencode/fwd-h2/1.4.200-6/fwd-h2-1.4.200-6.jar

Then completely rebuild FWD once the new version of H2 is copied in.

Jetty

FWD uses Jetty embedded server version 9.3.8. If you want to debug Jetty-related functionality you may discover that it is a problem to find sources for this version. As a temporary workaround, it is possible to upgrade to version 9.3.28. It seems that FWD works fine with this version and the sources can be found here: https://www.eclipse.org/jetty/previousversions.html


© 2004-2017 Golden Code Development Corporation. ALL RIGHTS RESERVED.