Troubleshooting

Debug mode

The CustomBuild can be executed in the debug mode. This mode triggers the following changes to the way CustomBuild works:

  • Verbose logging is enabled. CustomBuild is a bash script, and in debug mode each script expression is printed out before being executed. This makes it easy to trace and understand what actions are being performed, what variables are being set, and what exact commands are being executed. It can help understand how CustomBuild works or why it behaves differently on a different server.
  • Temporary files are not cleaned up. When a new software component is being installed, it is usually compiled and configured in a temporary directory before being installed to the permanent location on the system. The temporary files are stored in the /usr/local/directadmin/custombuild/tmp directory and get removed when no longer needed. Access to temporary files is valuable when debugging software compilation failures, source patching problems, retrying software reconfiguration, or inspecting the software configuration state.

The debug mode is enabled by passing the --debug argument to any CustomBuild command. Example:

# da build version --debug
++ WORKDIR=/usr/local/directadmin/custombuild
++ OPTIONS_CONF=/usr/local/directadmin/custombuild/options.conf
++ VERSIONS_FILE=/usr/local/directadmin/custombuild/versions.txt
...
++ showVersion
++ echo 2.0.0
2.0.0
++ rc=0
++ doHook version post
++ '[' '!' -z version ']'
++ '[' '!' -z post ']'
++ '[' -d /usr/local/directadmin/custombuild/custom/hooks/version/post ']'
++ '[' 0 -ne 0 ']'
++ '[' 0 -ne 0 ']'

Note: It is important to remember to clean up the /usr/local/directadmin/custombuild/tmp directory manually if debug mode was used when installing new software.

How to run the C++ preprocessor

If you encounter this error message, this would imply that you do not have g++ installed:

checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking how to run the C++ preprocessor... /lib/cpp

*** The make has failed, do you want to try to make again? (y,n):

The gcc-c++ rpm and all its dependencies are required to resolve the issue.

Some dependencies include libstdc++-devel and libstdc++

To install please run the following on CentOS/RHEL/CloudLinux systems:

yum -y install gcc-c++

Debian/Ubuntu:

apt-get -y install g++

libexpat.so: could not read symbols

If you get this error

/usr/lib/libexpat.so: could not read symbols: File in wrong format

Most likely a built-in expat should be used with apache. To do:

Prepare a customized apache config:

cd /usr/local/directadmin/custombuild/
mkdir -p custom/ap2
cp -p configure/ap2/configure.apache custom/ap2/

Open the custom/ap2/configure.apache file and add the option for expat as:

    "--with-expat=builtin" \

Note the \ character - it must be present on all lines except the last one.

Last Updated: