CentOS 5 Make Libpri Error

I have a fresh install of Centos 5 and am trying to install Asterisk 1.4.11 When trying to install Librpri I get the following error:

CC=“gcc” ./mkdep -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC ls *.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o copy_string.o copy_string.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o pri.o pri.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o q921.o q921.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o prisched.o prisched.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o q931.o q931.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o pri_facility.o pri_facility.c
ar rcs libpri.a copy_string.o pri.o q921.o prisched.o q931.o pri_facility.o
ranlib libpri.a
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -o copy_string.lo -c copy_string.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -o pri.lo -c pri.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -o q921.lo -c q921.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -o prisched.lo -c prisched.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -o q931.lo -c q931.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -o pri_facility.lo -c pri_facility.c
gcc -shared -Wl,-hlibpri.so.1.0 -o libpri.so.1.0 copy_string.lo pri.lo q921.lo prisched.lo q931.lo pri_facility.lo
/sbin/ldconfig -n .
ln -sf libpri.so.1.0 libpri.so
ln -sf libpri.so.1.0 libpri.so.1

After running make.

Tried to run make install and got this:

install -m 644 libpri.h /usr/include
install -m 755 libpri.so.1.0 /usr/lib
if [ -x /usr/sbin/sestatus ] && ( /usr/sbin/sestatus | grep “SELinux status:” | grep -q “enabled”); then /sbin/restorecon -v /usr/lib/libpri.so.1.0; fi
( cd /usr/lib ; ln -sf libpri.so.1.0 libpri.so ; ln -sf libpri.so.1.0 libpri.so.1 )
install -m 644 libpri.a /usr/lib
if test $(id -u) = 0; then /sbin/ldconfig -n /usr/lib; fi

Not sure what to do. Any ideas would be appreciated.

Please note that I am a linux newb and this is my first time installing Asterisk.

Thanks.

I got

CentOS release 5 (Final)
kernel-2.6.18-8.el5
kernel-devel-2.6.18-8.el5
bison-2.3-2.1
bison-devel-2.3-2.1
ncurses-5.5-24.20060715
ncurses-devl-5.5-24.20060715
zlib-1.2.3-3
zlib-devel-1.2.3-3
openssl-0.9.8b-8.3.el5
openssl-devel-0.9.8b-8.3.el5
gnutls-devel-1.4.1-2
gcc-4.1.1.52.el5
gcc-c+±4.1.1.52.el5
mysql-5.0.22-2.1.0.1
mysql-server-5.0.22-2.1.0.1
mysql-devel-5.0.22-2.1.0.1

zaptel-1.4.5 - installed successfully
libpri-1.4.1 - same tragic result
asterisk-1.4.11 - installed successfully
asterisk-addons-1.4.2 - installed successfully

I didn’t stop at libpri because I was thinking that it may work. The result, I can call a sip phone using another sip phone. Problem is I could not hear if the other phone is ringing and when the other phone is answered, I could hear clearly the person on the other end. I suspect libpri is behind the error that I encountering. Also, on the CLI, I cannot >reload chan_zap.so. I don’t know if it also attributes to the bad libpri installation.

I had the same errors as bcastilla at libpri. At least now I know that I am not the only one getting this error.

to bcastilla,

Have you tried proceeding with the installation even though libpri’s installation is bad?

I got

CentOS release 5 (Final)
kernel-2.6.18-8.el5
kernel-devel-2.6.18-8.el5
bison-2.3-2.1
bison-devel-2.3-2.1
ncurses-5.5-24.20060715
ncurses-devl-5.5-24.20060715
zlib-1.2.3-3
zlib-devel-1.2.3-3
openssl-0.9.8b-8.3.el5
openssl-devel-0.9.8b-8.3.el5
gnutls-devel-1.4.1-2
gcc-4.1.1.52.el5
gcc-c+±4.1.1.52.el5
mysql-5.0.22-2.1.0.1
mysql-server-5.0.22-2.1.0.1
mysql-devel-5.0.22-2.1.0.1

zaptel-1.4.5 - installed successfully
libpri-1.4.1 - same tragic result
asterisk-1.4.11 - installed successfully
asterisk-addons-1.4.2 - installed successfully

I didn’t stop at libpri because I was thingking that it may work. The result, I can call a sip phone using another sip phone.

Problems:

  1. I cannot hear if the other end is ringing but phone conversation is good when the it is answered.

  2. I cannot do CLI>reload chan_zap.so. States error

The ‘reload’ command is deprecated and will be removed in a future release. Please use ‘module reload’ instead.
– Reloading module ‘chan_zap.so’ (Zapata Telephony)
== Parsing ‘/etc/asterisk/zapata.conf’: Found
[Sep 7 11:20:00] WARNING[6194]: chan_zap.c:11115 process_zap: Ignoring signalling
[Sep 7 11:20:00] ERROR[6194]: chan_zap.c:10466 build_channels: Unable to reconfigure channel ‘2’
[Sep 7 11:20:00] WARNING[6194]: chan_zap.c:11431 reload: Reload of chan_zap.so is unsuccessful!

it is the same with CLI>module reload chan_zap.so

  1. “[me@you libpri]# Make” results as the same error as bcastilla.

I am thinking that 1 and 2 can be blamed to the unsuccessful make of libpri.

to bcastilla,

Have you tried proceeding with the installation? I am curious if you will have the same errors as mine if you proceed with it.

First thing you should do by the looks of it when using Centos 5 is disable SELINUX.

Have a look at /etc/selinux/config.

Set it to the following, and you will have to reboot your box before selinux is disabled.

SELINUX= can take one of these three values:

enforcing - SELinux security policy is enforced.

permissive - SELinux prints warnings instead of enforcing.

disabled - SELinux is fully disabled.

SELINUX=disabled

SELINUXTYPE= type of policy in use. Possible values are:

targeted - Only targeted network daemons are protected.

strict - Full SELinux protection.

SELINUXTYPE=targeted

Then see what happens with the make after that.

Thanks for the reply Brett! Unfortunately it didn’t worked for me. How about you bcastilla?

I saw a post saying that the solution was “the kernel-devel should be installed”. For my case, it doesn’t help coz it is already installed. How about you bcastilla? Have you confirmed your kernel-devel installation? You can do it by:

rpm -qa | grep kernel-devel

It will show you the version of your kernel-devel. If nothing happens, then you must install it using:

yum install kernel-devel

I am gonna try the previous version of libpri. Gonna post back later[/i]

Nah didn’t work. I got the same errors. Help please :cry:

Note:

Instead of disabling the SELinux, try audit2allow.

  1. Inside the syslog, locate the part where SELinux is prohibiting an application to run.
  2. Copy that part to another file.
  3. Use audit2allow on that “another file”. This will generate a pp file.
  4. Use semodule to put that file in kernel.

This will allow SELinux to run the file and in the same time protecting you server.

I have disabled selinux from the very beginning upon installation.

Do I really need librpri?

Thanks

Also, does hardware matter? I am using a Dell Dimesion P4 3.2ghz

Hi guys, I had a bit of a problem with centos 5 so, went back to CentOS 4.5 and isntalled the server version in the selection, no firewalls selinux disabled.

With the Dell Dimm. change the bios setting from SATA to ATA if you have a sata setup and not using SATA.

Hope it helps.

to bcastilla:

hardware shouldn’t be a problem. the only thing is when using zaptel + libpri you have to have a zaptel card. i have been using digium products and having no problems. if you don’t have any zaptel cards, you might as well use zaptel + ztdummy.

have you tried continuing with the installation?

to ladca2003:

IMHO and in a systems administrator’s point of view, you shouldn’t be trading your security with a shortcut to functionality. if you ever get hacked, maybe you’ll change your mind to enable atleast the firewall. i was also tempted to do that when i first encountered selinux but when you get the hang of it, you will probably love it. it is somewhat the counter part of DEP of windows (comparison is always in me because I manage both linux and windows system). try reading en.wikipedia.org/wiki/SELinux . they didn’t made it because they want to annoy you, they just want more secure systems. remember, selinux is configurable so that you could allow apps to run which are blocked by selinux.

currently its been running for more than week now and seems that it can properly operate even with those errors.

bcastilla any news on your box?