UDX development and compilation environments

To compile the source object files for the UDX code, you must use the nzudxcompile command, which runs only on a Netezza Performance Server system. Netezza Performance Server does not recommend or support the use of other third-party C++ compilers on generic Linux® systems. As a best practice, develop your UDXs and compile them on Netezza Performance Server development system environments first. You can then copy the compiled object files to production Netezza Performance Server systems to register them for use in queries.

The nzudxcompile command might not be practical if you are migrating third-party libraries that use a complex, existing, build system. In these special cases, you might need to use the Netezza Performance Server compiler directly to specify your compilation flags as needed.

To obtain the path to the compiler, use the following command:
nzudxcompile –-print-compiler
Use the compiler and specify compatible flags, which can include some of the following flags:
  • -shared
  • -Wa,--32
  • -fPIC
  • -fexceptions -fsigned-char
  • -Wno-invalid-offsetof

Some of these flags might be valid only for C++ or C libraries. Use the -shared flag only when you are linking the shared library and the –fPIC only when you are creating object files. The –Wa,--32 makes 32-bit object files instead of 64-bit.