If directadmin with custombuild fail to build or update a service and the error "cannot run C compiled programs" is dropped, here we suggest one of the possible solutions.
You can find an example of the error down below. Here we try and update freetype with the help of custombuild script from Directadmin on a CentOS 6 server:
Updating FreeType Found /usr/local/directadmin/custombuild/freetype-2.9.tar.gz Extracting ... Done. Configuring freetype-2.9... ... ... ... checking whether we are cross compiling... configure: error: in `/usr/local/directadmin/custombuild/freetype-2.9/builds/unix': configure: error: cannot run C compiled programs. If you meant to cross compile, use `--host'. See `config.log' for more details make: *** [setup] Error 1 Done. Making freetype-2.9... Trying to make FreeType... config.mk:25: builds/unix/unix-def.mk: No such file or directory config.mk:26: builds/unix/unix-cc.mk: No such file or directory make: execvp: ./include/freetype/freetype.h: Permission denied make: *** No rule to make target `builds/unix/unix-cc.mk'. Stop. *** The make has failed, would you like to try to make again? (y,n):
Something went wrong and the process stopped.
One of the possible solutions would be to make sure that you've installed all the required packages per this guide: Common pre-install commands. In our particular case we had all the rpm`s installed. But probably some of them got corrupted, so we executed the following command:
yum reinstall wget gcc gcc-c++ flex bison make bind bind-libs bind-utils openssl openssl-devel perl quota libaio \ libcom_err-devel libcurl-devel gd zlib-devel zip unzip libcap-devel cronie bzip2 cyrus-sasl-devel perl-ExtUtils-Embed \ autoconf automake libtool which patch mailx bzip2-devel lsof glibc-headers kernel-devel expat-devel db4-devel
to re-install all of them.
The list of rpm`s contains all the requirements for Directadmin server, but it's probably fine to re-install only: gcc, gcc-c++, make.
That's it.