There are many common compiling issues that users often run into. Here are some of the more common problems, and how to resolve them.
First, let's take a look at some of the errors you may encounter when compiling Asterisk.
If you receive the following error while attempting to compile Asterisk, you must install the gcc compiler and its dependencies:
checking whether the C compiler (gcc ) works... no configure: error: installation or configuration problem: C compiler cannot create executables. make: *** [editline/libedit.a] Error 1
The following packages are required for gcc :
gcc
glibc-kernheaders
cpp
binutils
glibc-headers
glibc- devel
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 .
The following error may be encountered if the bison parser, which is required for parsing expressions in the extensions.conf file, is not found:
bison ast_expr.y -name-prefix=ast_yy -o ast_expr.c make: bison: Command not found make: *** [ast_expr.c] Error 127
The following files are required in order to install Asterisk; they can be installed with the yum install bison command:
bison
m4
The OpenSSL development packages are required by Asterisk within the res_crypto.so module for RSA key checks performed by the IAX2 protocol. If the OpenSSL development packages are not installed, the following error will occur:
/usr/bin/ld: cannot find -lssl collect2: ld returned 1 exit status make: *** [asterisk] Error 1
To install the OpenSSL development library, you'll require the following dependencies:
openssl-devel
e2fsprogs-devel
zlib-devel
krb5-devel
krb5-libs
You can use the yum install openssl-devel command to install these files.
To use the make rpm command, you must have the Red Hat Package Manager (RPM ) development package installed. The following error will be encountered if it is absent:
make[1]: Leaving directory '/usr/src/asterisk-1.0.3' /bin/sh: line 1: rpmbuild: command not found make: *** [_ _rpm] Error 127
You can install the build environment with yum install rpmbuild .
You may also run into errors when compiling Zaptel. Here are some of the most commonly occurring problems, and what to do about them.
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 "C compiler cannot create executables" in the previous section.
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 .
|
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 and are being loaded.
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
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