testtools Patch

Edward Peterlin

1/23/02

Introduction

In the process of building the odk module after applying Daniel Boss' patch, I noticed that the "build -all debug=true" step failed in the testtools module. This patch addresses several problems in this module to get it to successfully build.

The Problem

There were a few problems with this module. First, the d.lst file for the module was not configured to properly deliver the dylib OS X shared libraries. This caused several of the failures of the register commands while building the bridgetest programs within this module.

A bit more distressing, however, was the bridgetest code itself. The code in this directory actually builds two component shared libraries, one for the bridgetest programs themselves as well as a support object cppobj. This is a problem due to how UNO entry points are renamed on OS X. Because the OS X dynamic linker does not support duplicate symbols in a way that is compatible with loading and executing well-known entry points, each UNO component has its entry points prepended with lib(libname). The standard makefiles can support this by inserting this prefix for us. This assumes that each of the entry points in the source of a particular directory is associated with the same component. In bridgetest, however, they are not. When the standard solutions are attempted, it is only possible to get one of the two resulting component libraries to have its entry points successfully renamed.

The solution I took to this problem was to conditionally rename the entry points within the cppobj.cxx source file itself. This is equivalent to a manual insertion of the appropriate prefix for the entry points.

I'm not sure if this problem will occur at other points during the port. If it does, perhaps we can find a better solution than simply littering the code. If this proves to be an isolated case, however, it's easier than trying to extend the build system which will probably be replaced or changed soon anyway :)

The Patch

The patch to the testtools module is available from

To apply the patch:

  1. cd /your/openoffice/root/testtools
  2. patch -p0 < /path/to/downloaded/testtools.012302.diff