PDA

View Full Version : [F6 + Asterisk 1.4.4] undefined reference to `pthread_



littlebigfred
17th May 2007, 08:26 AM
Hello,

I thought I had all the prerequisites to compile Asterisk 1.4.x under an up-to-date Fedora 6, but it looks like I'm still missing something. I'm trying to compile it on a mini-ITX host with a Via motherboard, hence the i586 limitation.

After running "./configure -build=i586 --host=i586" succesfully, at some point, "make" barfs this:



io.o jitterbuf.o loader.o logger.o manager.o md5.o netsock.o pbx.o plc.o privacy.o rtp.o say.o sched.o sha1.o slinfactory.o srv.o stdtime/localtime.o strcompat.o tdd.o term.o threadstorage.o translate.o udptl.o ulaw.o utils.o editline/libedit.a db1-ast/libdb1.a -> asterisk
asterisk.o: In function `quit_handler':
/tmp/asterisk-1.4.4/main/asterisk.c:1277: undefined reference to `pthread_cancel'
/tmp/asterisk-1.4.4/main/asterisk.c:1304: undefined reference to `pthread_kill'
asterisk.o: In function `console_verboser':
/tmp/asterisk-1.4.4/main/asterisk.c:1356: undefined reference to `pthread_kill'
asterisk.o: In function `listener':
/tmp/asterisk-1.4.4/main/asterisk.c:971: undefined reference to `pthread_testcancel'
asterisk.o: In function `main':
/tmp/asterisk-1.4.4/main/asterisk.c:2824: undefined reference to `pthread_sigmask'

etc.


I ran the following before running configure:


yum install kernel-devel
yum install bison
yum install bison-devel
yum install ncurses
yum install ncurses-devel
yum install zlib
yum install zlib-devel
yum install openssl
yum install openssl-devel
yum install gnutls-devel
yum install gcc
yum install gcc-c++
yum install libtermcap-devel


Any idea what it could be? Wrong kernel version or kernel headers? Something else?

Thank you.

PS : BTW, just about every documentation mentions compiling Zaptel and Libpri. I'm not using any PCI device, and rely on a Linksys 3102 VoIP gateway to handle incoming POTS calls. Do I still need to compile Zaptel or Libpri?

olm
21st November 2007, 05:31 PM
I'm having a similar problem. Zaptel installed without any problems and I even ran ./configure for asterisk and that went fine. But libpri is another story. No matter what I did; I could not get Libpri to install. I have all the required packages, nothing is missing.


[root@stan libpri-1.4.2]# rpm -q kernel kernel-devel bison bison-devel ncurses ncurses-devel zlib zlib-devel openssl openssl-devel gnutls-devel gcc gcc-c++
kernel-2.6.23.1-42.fc8
kernel-2.6.23.1-49.fc8
kernel-devel-2.6.23.1-49.fc8
bison-2.3-4.fc8
bison-devel-2.3-4.fc8
ncurses-5.6-12.20070812.fc8
ncurses-devel-5.6-12.20070812.fc8
zlib-1.2.3-14.fc8
zlib-devel-1.2.3-14.fc8
openssl-0.9.8b-17.fc8
openssl-devel-0.9.8b-17.fc8
gnutls-devel-1.6.3-2.fc8
gcc-4.1.2-33
gcc-c++-4.1.2-33


[root@stan libpri-1.4.2]# make
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
In file included from q931.c:27:
pri_internal.h:263: error: expected declaration specifiers or ‘...’ before ‘size_t’
q931.c: In function ‘receive_calling_party_number’:
q931.c:949: error: too many arguments to function ‘libpri_copy_string’
q931.c: In function ‘transmit_keypad_facility’:
q931.c:1425: error: too many arguments to function ‘libpri_copy_string’
q931.c: In function ‘q931_keypad_facility’:
q931.c:2492: error: too many arguments to function ‘libpri_copy_string’
q931.c: In function ‘pri_release_finaltimeout’:
q931.c:2667: error: too many arguments to function ‘libpri_copy_string’
q931.c: In function ‘q931_setup’:
q931.c:2817: error: too many arguments to function ‘libpri_copy_string’
q931.c:2820: error: too many arguments to function ‘libpri_copy_string’
q931.c:2837: error: too many arguments to function ‘libpri_copy_string’
q931.c:2854: error: too many arguments to function ‘libpri_copy_string’
q931.c:2860: error: too many arguments to function ‘libpri_copy_string’
q931.c: In function ‘q931_receive’:
q931.c:3314: error: too many arguments to function ‘libpri_copy_string’
q931.c:3315: error: too many arguments to function ‘libpri_copy_string’
q931.c:3316: error: too many arguments to function ‘libpri_copy_string’
q931.c:3318: error: too many arguments to function ‘libpri_copy_string’
q931.c:3319: error: too many arguments to function ‘libpri_copy_string’
q931.c:3320: error: too many arguments to function ‘libpri_copy_string’
q931.c:3321: error: too many arguments to function ‘libpri_copy_string’
q931.c:3322: error: too many arguments to function ‘libpri_copy_string’
q931.c:3323: error: too many arguments to function ‘libpri_copy_string’
q931.c:3324: error: too many arguments to function ‘libpri_copy_string’
q931.c:3351: error: too many arguments to function ‘libpri_copy_string’
q931.c:3381: error: too many arguments to function ‘libpri_copy_string’
q931.c:3395: error: too many arguments to function ‘libpri_copy_string’
q931.c:3396: error: too many arguments to function ‘libpri_copy_string’
q931.c:3482: error: too many arguments to function ‘libpri_copy_string’
q931.c:3510: error: too many arguments to function ‘libpri_copy_string’
q931.c:3545: error: too many arguments to function ‘libpri_copy_string’
q931.c:3573: error: too many arguments to function ‘libpri_copy_string’
q931.c:3599: error: too many arguments to function ‘libpri_copy_string’
q931.c:3607: error: too many arguments to function ‘libpri_copy_string’
q931.c:3608: error: too many arguments to function ‘libpri_copy_string’
q931.c: In function ‘pri_internal_clear’:
q931.c:3695: error: too many arguments to function ‘libpri_copy_string’
make: *** [q931.o] Error 1


This system will be remotely administered. So there aren't any additional packages on it. I installesd fedoar8 updated it. Downoaded packages from asterisk and began install. But now I'm stuck.

Any suggestion is appreciated.

olm
21st November 2007, 08:56 PM
Problem Solved by downloading rpm packages from pbone.
Go to http://rpm.pbone.net/ and search for libpri. And choose the one you need from the results.