The pjlib test result as follows (this is running in the Blackfin-BF537 STAMP) : ---------------------------------------------------------------------------- root:/home> ./pjlib-test-bfin-unknown-uclinux 01:28:45.676 Running errno_test()... 01:28:45.676 ...errno test: check the msg carefully 01:28:45.676 ...msg for rc=EINVAL: 'Invalid argument' 01:28:45.676 ...msg for rc=EINVAL (cut): 'Inval' 01:28:45.677 ...msg for rc=PJ_EBUG: 'BUG DETECTED! (PJ_EBUG)' 01:28:45.677 ...msg for rc=PJ_EBUG, cut at 6 chars: 'BUG D' 01:28:45.677 ..success(0) 01:28:45.677 Running exception_test()... 01:28:45.677 ..success(0) 01:28:45.677 Running rand_test()... 01:28:45.698 ..success(0) 01:28:45.698 Running list_test()... 01:28:45.698 ..success(0) 01:28:45.698 Running pool_test()... 01:28:45.699 ...capacity_test() 01:28:45.699 ...drain_test(4096,4096) 01:28:45.699 ...drain_test(4096,0) 01:28:45.699 ...drain_test(4096,4096) 01:28:45.699 ...drain_test(4096,0) 01:28:45.700 ...pool_buf test 01:28:45.700 ..success(0) 01:28:45.700 Running pool_perf_test()... 01:28:45.702 Benchmarking pool.. 01:28:45.801 ..pool speedup over malloc best=13x, worst=12x 01:28:45.801 ..success(0) 01:28:45.801 Running string_test()... 01:28:45.803 time: stricmp=224, stricmp_alnum=205 (speedup=1.09x) 01:28:45.803 ..success(0) 01:28:45.803 Running rbtree_test()... 01:28:46.046 ..success(0) 01:28:46.046 Running timestamp_test()... 01:28:46.046 ...Testing timestamp (high res time) 01:28:46.046 ....frequency: hiword=0 loword=1000000 01:28:46.047 ...checking if time can run backwards (pls wait).. 01:28:51.710 ....testing simple 1000000 loop 01:28:51.774 ....elapsed: 63853 usec 01:28:51.774 ...testing frequency accuracy (pls wait) 01:29:01.779 ....good. Timestamp is accurate down to nearest usec. 01:29:01.779 ..success(0) 01:29:01.779 Running atomic_test()... 01:29:01.779 ..success(0) 01:29:01.779 Running mutex_test()... 01:29:01.779 ...testing simple mutex 01:29:01.779 ...testing recursive mutex 01:29:01.779 ..success(0) 01:29:01.779 Running timer_test()... 01:29:03.338 ..success(0) 01:29:03.338 Running sleep_test()... 01:29:03.338 ..will write messages every 1 second: 01:29:04.342 ...wake up.. 01:29:05.346 ...wake up.. 01:29:06.350 ...wake up.. 01:29:07.354 ...wake up.. 01:29:08.358 ...wake up.. 01:29:08.358 ..running sleep duration test 01:29:09.870 ..success(0) 01:29:09.870 Running thread_test()... 01:29:09.870 ..simple thread test 01:29:11.374 ..waiting for thread to quit.. 01:29:12.878 ...simple thread test success 01:29:12.878 ..suspended thread test 01:29:14.382 ..waiting for thread to quit.. 01:29:15.886 ...suspended thread test success 01:29:15.886 ..timeslice testing with 4 threads 01:29:21.894 ...info: timeslice diff between lowest & highest=7% 01:29:21.895 ..success(0) 01:29:21.895 Running sock_test()... 01:29:21.897 ...format_test() 01:29:21.897 ....hostname is blackfin 01:29:21.898 ...simple_sock_test() 01:29:21.898 ...udp_test() 01:29:21.901 ...tcp_test() 01:29:21.903 ..success(0) 01:29:21.903 Running sock_perf_test()... 01:29:21.903 ...benchmarking socket (2 sockets, packet=512, single threaded): 01:29:31.194 ....bandwidth UDP = 3611 KB/s 01:29:42.195 ....bandwidth TCP = 2080 KB/s :291 2s:u2p1e6rRvniisgosrl cr_eesto)u.r dp_1U2s:e2r1 7mRondieg.sr0ot mrrepgrisswtiearl oork ti qSeueptesr(v.i.s n s1 2t:h2a1t7 .a.r.ei drsecsee.r.vsi.omelsa ca reet (reeegti 29: e0d o r1 2u:s2e2:2 .S.u.peeirtvrins oirs oonklty. .r e0g:i9s4t.e0r s.,. raglsle iMgMsRcsn, oakntd. .S .st u0pr k: 1r2u:c2t2i3o.n.s.. vfre 03 1E2S:S2:eN Te dPnR .se.. est-bfin PID=140aldiebs-.t TEXT = 0x03280040-0x032a88c0 DATA = 0x032a88c4-0x032b42d4 BSS = 0x032b42d4-0x032be0b4 USER-STACK = 0x032bff50 return address: 0x032a1138; contents of [PC-16...PC+8]: 0010 0000 0c01 e800 0000 3018 1003 6000 203c 5088 0982 63f8 0710 300b 2006 3211 X 9950 0c00 182e 6409 6018 5401 0c00 17f8 RETE: 00000000 RETN: 031ea000 RETX: 032a1138 RETS: 032a018a IPEND: 0030 SYSCFG: 0036 SEQSTAT: 0006002e SP: 031e9f24 R0: 00000003 R1: ffffffff R2: ffffffff R3: ffffffff R4: 032be90c R5: 032bd8fc R6: 032bc87c R7: 032b3fa0 P0: 00000001 P1: 00000013 P2: ffffffff P3: 032b3f78 P4: 032bc70c P5: ffffffff FP: 032bc6e8 A0.w: 00000000 A0.x: 00000000 A1.w: 00000000 A1.x: 00000000 LB0: 032a0e69 LT0: 032a0e66 LC0: 00000000 LB1: 0329365b LT1: 0329365a LC1: 00000000 B0: 032bfa44 L0: 00000000 M0: 00000000 I0: 032ae140 B1: 00000000 L1: 00000000 M1: 00000000 I1: 032bdea8 B2: 00000000 L2: 00000000 M2: 00000000 I2: 00000000 B3: 00000000 L3: 00000000 M3: 00000000 I3: 00000000 USP: 032bc6e8 ASTAT: 02001004 DCPLB_FAULT_ADDR=ffffffff ICPLB_FAULT_ADDR=032a1138 Hardware Trace: 0 Target : <0x000046dc> { _trap_c + 0x0 } Source : <0xffa00b60> { _exception_to_level5 + 0xb4 } 1 Target : <0xffa00aac> { _exception_to_level5 + 0x0 } Source : <0xffa00aaa> { _ex_trap_c + 0x4e } 2 Target : <0xffa00a5c> { _ex_trap_c + 0x0 } Source : <0xffa00c00> { _trap + 0x28 } 3 Target : <0xffa00bd8> { _trap + 0x0 } Source : <0x032a1136> [ pjlib-test-bfin + 0x210f6 ] 4 Target : <0x032a1136> [ pjlib-test-bfin + 0x210f6 ] Source : <0x032a1146> [ pjlib-test-bfin + 0x21106 ] 5 Target : <0x032a1140> [ pjlib-test-bfin + 0x21100 ] Source : <0x032a1134> [ pjlib-test-bfin + 0x210f4 ] 6 Target : <0x032a112a> [ pjlib-test-bfin + 0x210ea ] Source : <0x032a1124> [ pjlib-test-bfin + 0x210e4 ] 7 Target : <0x032a111c> [ pjlib-test-bfin + 0x210dc ] Source : <0x032a0186> [ pjlib-test-bfin + 0x20146 ] 8 Target : <0x032a017a> [ pjlib-test-bfin + 0x2013a ] Source : <0x032a0166> [ pjlib-test-bfin + 0x20126 ] 9 Target : <0x032a0150> [ pjlib-test-bfin + 0x20110 ] Source : <0x032a0120> [ pjlib-test-bfin + 0x200e0 ] 10 Target : <0x032a011c> [ pjlib-test-bfin + 0x200dc ] Source : <0x0329ffde> [ pjlib-test-bfin + 0x1ff9e ] 11 Target : <0x0329ffdc> [ pjlib-test-bfin + 0x1ff9c ] Source : <0x0329ffba> [ pjlib-test-bfin + 0x1ff7a ] 12 Target : <0x0329ffa6> [ pjlib-test-bfin + 0x1ff66 ] Source : <0x0329ffb2> [ pjlib-test-bfin + 0x1ff72 ] 13 Target : <0x0329ffb0> [ pjlib-test-bfin + 0x1ff70 ] Source : <0x0329ffa4> [ pjlib-test-bfin + 0x1ff64 ] 14 Target : <0x0329ff9e> [ pjlib-test-bfin + 0x1ff5e ] Source : <0x0329ff8c> [ pjlib-test-bfin + 0x1ff4c ] 15 Target : <0x0329ff78> [ pjlib-test-bfin + 0x1ff38 ] Source : <0x032a0414> [ pjlib-test-bfin + 0x203d4 ] Stack from 031e9f04: 00000000 ffa00b64 0012a714 0012a714 0012a710 0000001b 00000000 0329eb3a 032a1138 00000030 0006002e 00000000 031ea000 032a1138 032a1138 032a018a 00000003 02001004 0329365b 032a0e69 0329365a 032a0e66 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 032bfa44 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 032bdea8 032ae140 032bc6e8 032bc6e8 ffffffff 032bc70c Call Trace: 01:29:42.203 .....start sendto... 01:29:42.203 ......ok: sendto returned immediate success 01:29:42.203 .....poll... Illegal instruction -------------------------------------------------------------------------- I haven't try setting up a GDB in the host machine to see what's going on under-the-hood. Anyone can decipher the dump? Regards, Darmawan Salihun On Jan 4, 2008 1:41 PM, Benny Prijono <bennylp at pjsip.org> wrote: > Darmawan Salihun wrote: > > Note: (*) I believe that this error had a relation with the data type > > declaration in pjlib. > > The error is actually not as bad as that (well, actually it's a > warning, but it's got treated as error with -Werror). > > It's because the printf() argument doesn't match the format string. > Something like this: > > long lval=0; > printf("%d\n", lval); > > With the printf() above gcc will complain that the format ("%d", an > integer) doesn't exactly match the argument (a long int). The > solution is either to change the format to long int ("%ld"), or to > typecast the variable to int, or to disable -Werror, for now. > > cheers, > -benny > > > > > > (*) I'm building on a Slackware 12 system (kernel 2.6.23.12) > > ----------------------------- > > > > I'm building with the Pjsip svn revision 1656 (01-02-2008) > > > > The configuration script is invoked for cross compiling as follows > > ./configure CC=bfin-uclinux-gcc --host=bfin-uclinux --build=i686-linux LDFLAGS=' > > -Wl,-elf2flt' CFLAGS=-O2 > > > > and then building pjsip with: > > make dep && make clean && make > > > > The error message excerpt: > > -------- > > make[1]: Entering directory > > `/lfs/blackfin_devel/uClinux-dist.R1.1-RC3/user/pjproject/pjnath/build' > > make -f /lfs/blackfin_devel/uClinux-dist.R1.1-RC3/user/pjproject/build/rules.mak > > APP=PJNATH app=pjnath ../lib/libpjnath-bfin-unknown-uclinux.a > > make[2]: Entering directory > > `/lfs/blackfin_devel/uClinux-dist.R1.1-RC3/user/pjproject/pjnath/build' > > mkdir -p output/pjnath-bfin-unknown-uclinux > > bfin-uclinux-gcc -c -Wall -DPJ_AUTOCONF=1 -O2 -Werror > > -Wno-unused-label -I../include -I../../pjlib/include > > -I../../pjlib-util/include \ > > -o output/pjnath-bfin-unknown-uclinux/errno.o \ > > ../src/pjnath/errno.c > > bfin-uclinux-gcc -c -Wall -DPJ_AUTOCONF=1 -O2 -Werror > > -Wno-unused-label -I../include -I../../pjlib/include > > -I../../pjlib-util/include \ > > -o output/pjnath-bfin-unknown-uclinux/ice_session.o \ > > ../src/pjnath/ice_session.c > > cc1: warnings being treated as errors > > ../src/pjnath/ice_session.c: In function 'dump_check': > > ../src/pjnath/ice_session.c:749: warning: format '%d' expects type > > 'int', but argument 4 has type 'long int' > > ../src/pjnath/ice_session.c:749: warning: format '%d' expects type > > 'int', but argument 4 has type 'long int' > > make[2]: *** [output/pjnath-bfin-unknown-uclinux/ice_session.o] Error 1 > > make[2]: Leaving directory > > `/lfs/blackfin_devel/uClinux-dist.R1.1-RC3/user/pjproject/pjnath/build' > > make[1]: *** [pjnath] Error 2 > > make[1]: Leaving directory > > `/lfs/blackfin_devel/uClinux-dist.R1.1-RC3/user/pjproject/pjnath/build' > > make: *** [all] Error 1 > > -------- > > > > > > Anyone have a detailed clue or patch on the matter? > > > > I'm trying to work on the pjlib *hack* at the moment as well ;-) > > > > Regards, > > > > Darmawan Salihun > > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > -- Regards, Darmawan Salihun -------------------------------------------------------------------- -= Human knowledge belongs to the world =-