Home

Traffic Server Software Developers Kit

Appendix C. Troubleshooting Tips

Table of Contents

Unable to Compile Plugins
UNIX Example
HPUX Example
Unable to Load Plugins
Using Debug Tags
Other Useful Internal Debug Tags
Using a Debugger
Debugging Tips
Debugging Memory Leaks

This appendix lists the following troubleshooting tips.

Unable to Compile Plugins

The process for compiling a shared library varies with the platform used, so the Traffic Server API includes makefile templates you can use to create shared libraries on all supported Traffic Server platforms.

UNIX Example

Assuming the sample program is stored in the file hello-world.c, you could use the following commands to building a shared library on Solaris using the GNU C compiler.

gcc -g -Wall -fPIC -o hello-world.o -c hello-world.c
gcc -g -Wall -shared -o hello-world.so hello-world.o

The first command compiles hello-world.c as Position Independent Code (PIC); the second command links the single hello-world.o object file into the hello-world.so shared library.

[Caution] Caution

Make sure that your plugin is not statically linked with system libraries.

HPUX Example

Assuming the sample program is stored in the file hello_world.c, you could use the following commands to build a shared library on HPUX:

cc +z -o hello_world.o -c hello_world.c 
ld -b -o hello_world.so hello_world.o