rambabugithub / doubango

Automatically exported from code.google.com/p/doubango
0 stars 0 forks source link

TinySAK dosent compiles in Centos #93

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
First it gives Below error 
tsk_mutex.c: In function 'tsk_mutex_create':
tsk_mutex.c:75: error: 'PTHREAD_MUTEX_RECURSIVE' undeclared (first use in this 
function)
tsk_mutex.c:75: error: (Each undeclared identifier is reported only once
tsk_mutex.c:75: error: for each function it appears in.)

After Adding manually PTHREAD_MUTEX_RECURSIVE in /usr/include/pthread.h 
its compiles but gives error

make[2]: Entering directory 
`/home/alok/latest_cvs/asterisk_src/add-ons/doubango/tinySAK/test'
libtool --tag=CC --mode=link gcc  -g -O2 -O0 -g3 -DDEBUG   -o testSAK  test.o 
-ltinySAK
libtool: link: gcc -g -O2 -O0 -g3 -DDEBUG -o testSAK test.o  -ltinySAK
/usr/local/lib/libtinySAK.so: undefined reference to `sem_init'
/usr/local/lib/libtinySAK.so: undefined reference to `pthread_mutexattr_settype'
/usr/local/lib/libtinySAK.so: undefined reference to `sem_destroy'
/usr/local/lib/libtinySAK.so: undefined reference to `pthread_mutexattr_destroy'
/usr/local/lib/libtinySAK.so: undefined reference to `pthread_create'
/usr/local/lib/libtinySAK.so: undefined reference to `pthread_mutexattr_init'
/usr/local/lib/libtinySAK.so: undefined reference to `sem_post'
/usr/local/lib/libtinySAK.so: undefined reference to `sem_wait'
/usr/local/lib/libtinySAK.so: undefined reference to `pthread_join'
collect2: ld returned 1 exit status
make[2]: *** [testSAK] Error 1
make[2]: Leaving directory 
`/home/alok/latest_cvs/asterisk_src/add-ons/doubango/tinySAK/test'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory 
`/home/alok/latest_cvs/asterisk_src/add-ons/doubango/tinySAK'
make: *** [all] Error 2

Original issue reported on code.google.com by Alok.Pra...@gmail.com on 19 Jan 2012 at 3:39

GoogleCodeExporter commented 9 years ago
Same things happen in Both doubango 1.0 and doubango 2.0

Original comment by Alok.Pra...@gmail.com on 19 Jan 2012 at 3:40

GoogleCodeExporter commented 9 years ago
Centos is not officially supported.
About the errors: You forgot to link against "pthread". I guess "lintinySAK" is 
static lib.

Original comment by boss...@yahoo.fr on 19 Jan 2012 at 3:47

GoogleCodeExporter commented 9 years ago
Which Linux Flavor Does Doubango officially Supports?

Original comment by Alok.Pra...@gmail.com on 19 Jan 2012 at 3:52

GoogleCodeExporter commented 9 years ago
hi..
I have been trying to build doubango's libraries since a week now.And iam 
totally new to working on linux.My problem is tinySAK is not getting compiled 
properly.Iam getting this error..

root@unameit-desktop:/media/8837f0ef-0feb-4161-87bb-29975626b125/doubango/tinySA
K# make -f droid-makefile 
cc -c   src/tsk_mutex.c -o src/tsk_mutex.o
src/tsk_mutex.c: In function ‘tsk_mutex_create_2’:
src/tsk_mutex.c:86: error: ‘PTHREAD_MUTEX_RECURSIVE’ undeclared (first use 
in this function)
src/tsk_mutex.c:86: error: (Each undeclared identifier is reported only once
src/tsk_mutex.c:86: error: for each function it appears in.)
make: *** [src/tsk_mutex.o] Error 1

Remaining object files for tinySAK is getting created.

pls help.

Thanks

Original comment by havef...@gmail.com on 20 Jan 2012 at 2:56

GoogleCodeExporter commented 9 years ago
for this error Edit /usr/include/pthread.h and 
replace PTHREAD_MUTEX_RECURSIVE_NP with PTHREAD_MUTEX_RECURSIVE

This is step i used to compile for Linux ( not android) might be helpful.
cd doubango/tinySAK
./configure
if you are getting Libtool error remove libtool from doubango/tinySAK
edit Makefile & src/Makefile and replace below line

LIBTOOL = $(SHELL) $(top_builddir)/libtool
with BELOW (assuming you have installed libtool in PC)
LIBTOOL = libtool

Original comment by Alok.Pra...@gmail.com on 20 Jan 2012 at 4:28

GoogleCodeExporter commented 9 years ago
or Can we change the PTHREAD_MUTEX_RECURSIVE in src/tsk_mutex.c to
PTHREAD_MUTEX_RECURSIVE_NP

Original comment by Alok.Pra...@gmail.com on 21 Jan 2012 at 3:27

GoogleCodeExporter commented 9 years ago
Summing Steps if someone want to Compile For PC.

Cd tinysak

Sh autogen.sh
./configure

replace THREAD_MUTEX_RECURSIVE in src/tsk_mutex.c to PTHREAD_MUTEX_RECURSIVE_NP

Edit tinySAK/src/Makefile & tinySAK/test/Makefile  and replace 
LIBTOOL = $(SHELL) $(top_builddir)/libtool with LIBTOOL= libtool

Edit tinySAK/test/Makefile and following
LDFLAGS =-lpthread

Original comment by Alok.Pra...@gmail.com on 21 Jan 2012 at 4:17

GoogleCodeExporter commented 9 years ago
@All
Linux is not officially supported yet.
Supported OSes: Android, iOS (iPhone, iPad, iPod), OSX and Windows (XP, Vista, 
7).

Original comment by boss...@yahoo.fr on 21 Jan 2012 at 9:39