Common Compiling Issues

There are many common compiling issues that users often run into. Here are some of the more common problems, and how to resolve them.

Asterisk

First, let’s take a look at some of the errors you may encounter when running the configure script.

configure: error: no acceptable C compiler found in $PATH

If you receive the following error while attempting to run the configure script, you must install the gcc compiler and its dependencies:

configure: error: no acceptable C compiler found in $PATH

The following packages are required for gcc:

  • gcc

  • cpp

  • glibc-headers

  • glibc-devel

  • glibc-kernheaders

These can be installed manually, by copying the files off of your distribution disks, or through the yum package manager, with the command yum install gcc.

configure: error: C++ preprocessor "/lib/cpp" fails sanity check

The following error will be displayed if no C++ preprocessor is found installed on the system. You must install the gcc-c++ package and its dependencies:

configure: error: C++ preprocessor "/lib/cpp" fails sanity check

The following packages are required for the gcc-c++ preprocessor; installed by running yum install gcc-c++:

  • gcc-c++

  • libstdc++-devel

configure: error: *** termcap support not found

The following error may be encountered during initialization of the configure script if the libtermcap-devel package is not installed:

configure: error: *** termcap support not found

The following file is required in order to compile Asterisk; it can be installed with the yum install libtermcap-devel command:

  • libtermcap-devel

Zaptel

You may also run into errors when compiling Zaptel. Here are some of the most commonly occurring problems, and what to do about them. If your error is not listed below, see the previous section as your error may be covered there.

make: cc: Command not found

You will receive the following error if you attempt to build Zaptel without the gcc compiler installed:

make: cc: Command not found
make: *** [gendigits.o] Error 127

Be sure to install gcc and its dependencies. For more information, see the section called “configure: error: no acceptable C compiler found in $PATH” in the previous section.

FATAL: Module wctdm/fxs/fxo not found

The TDM400P cards require the PCI bus to be version 2.2. If you attempt to load the Zapata telephony drivers with an older version, you may get the following errors:

  • When attempting to load the wctdm driver, you may see this error:

    FATAL: Module wctdm not found
  • When attempting to load the wctdm or wcfxo driver, you may see an error such as this:

    ZT_CHANCONFIG failed on channel 1: No such device or address (6)
    FATAL: Module wctdm not found
    

The only way to resolve these errors is to use a newer motherboard that supports PCI version 2.2:

Tip

You may also encounter these errors if the power has not been attached to the Molex connector found on the TDM400P card.

Unresolved symbol link when loading ztdummy

The ztdummy driver requires that a UHCI USB controller be available on Linux 2.4 kernels (the USB controller is not a requirement on Linux 2.6 kernels, because they are capable of generating the 1 kHz timing reference). There exists a secondary kind of controller, known as OHCI, which is not compatible with the ztdummy driver. If the UHCI USB controller is not accessible on Linux 2.4 kernels, the following error will occur:

/lib/modules/2.4.22/misc/ztdummy.o: /lib/modules/2.4.22/misc/ztdummy.o: unresolved
symbol unlink_td
/lib/modules/2.4.22/misc/ztdummy.o: /lib/modules/2.4.22/misc/ztdummy.o: unresolved
symbol alloc_td
/lib/modules/2.4.22/misc/ztdummy.o: /lib/modules/2.4.22/misc/ztdummy.o: unresolved
symbol delete_desc
/lib/modules/2.4.22/misc/ztdummy.o: /lib/modules/2.4.22/misc/ztdummy.o: unresolved
symbol uhci_devices
/lib/modules/2.4.22/misc/ztdummy.o: /lib/modules/2.4.22/misc/ztdummy.o: unresolved
symbol uhci_interrupt
/lib/modules/2.4.22/misc/ztdummy.o: /lib/modules/2.4.22/misc/ztdummy.o: unresolved
symbol fill_td
/lib/modules/2.4.22/misc/ztdummy.o: /lib/modules/2.4.22/misc/ztdummy.o: unresolved
symbol insert_td_horizontal
/lib/modules/2.4.22/misc/ztdummy.o: insmod /lib/modules/2.4.22/misc/ztdummy.o failed
/lib/modules/2.4.22/misc/ztdummy.o: insmod ztdummy failed

You can verify that you have the correct style of USB controller and its associated drivers with the lsmod command:

# lsmod
Module                  Size  Used by
usb_uhci               26412  0
usbcore                79040  1 [hid usb-uhci]

As you can see in the example above, you are looking to make sure that the usbcore and usb_uhci modules are loaded. If these modules are not loaded, be sure that USB has been activated within your BIOS and that the modules exist.

If the USB drivers are not loaded, you can still check which type of USB controller you have with the dmesg command:

# dmesg | grep -i usb       

To verify that you indeed have a UHCI USB controller, look for the following lines:

uhci_hcd 0000:00:04.2: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
uhci_hcd 0000:00:04.3: new USB bus registered, assigned bus number 2
hub 2-0:1.0: USB hub found

Depmod errors during compilation

If you experience depmod errors during compilation, you more than likely don’t have a symbolic link to your Linux kernel sources. If you don’t have your Linux kernel sources installed, retrieve the sources for your installed kernel, install them, and create a symbolic link against /usr/src/linux-2.4. The following is an example of a depmod error:

depmod: *** Unresolved symbols in /lib/modules/2.4.22/kernel/drivers/block/
loop.o