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). Build successful by disabling -Werror in user.mak > 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 > Preliminary pjlib-util-test result as follows: ========================================== root:/home> ./pjlib-util-test-bfin-unknown-uclinux 00:37:50.173 PJLIB (c)2001-2007 Benny Prijono 00:37:50.174 Dumping configurations: 00:37:50.174 PJ_VERSION : 0.8.0-trunk 00:37:50.174 PJ_M_NAME : bfin 00:37:50.174 PJ_HAS_PENTIUM : 0 00:37:50.174 PJ_OS_NAME : bfin-unknown-uclinux 00:37:50.174 PJ_CC_NAME/VER_(1,2,3) : gcc-4.1.1 00:37:50.174 PJ_IS_(BIG/LITTLE)_ENDIAN : little-endian 00:37:50.174 PJ_HAS_INT64 : 1 00:37:50.174 PJ_HAS_FLOATING_POINT : 1 00:37:50.174 PJ_DEBUG : 1 00:37:50.174 PJ_FUNCTIONS_ARE_INLINED : 0 00:37:50.175 PJ_LOG_MAX_LEVEL : 5 00:37:50.175 PJ_LOG_MAX_SIZE : 2000 00:37:50.175 PJ_LOG_USE_STACK_BUFFER : 1 00:37:50.175 PJ_POOL_DEBUG : 0 00:37:50.175 PJ_HAS_POOL_ALT_API : 0 00:37:50.175 PJ_HAS_TCP : 1 00:37:50.175 PJ_MAX_HOSTNAME : 128 00:37:50.175 ioqueue type : select 00:37:50.175 PJ_IOQUEUE_MAX_HANDLES : 256 00:37:50.175 PJ_IOQUEUE_HAS_SAFE_UNREG : 1 00:37:50.175 PJ_HAS_THREADS : 1 00:37:50.176 PJ_LOG_USE_STACK_BUFFER : 1 00:37:50.176 PJ_HAS_SEMAPHORE : 1 00:37:50.176 PJ_HAS_EVENT_OBJ : 1 00:37:50.176 PJ_ENABLE_EXTRA_CHECK : 1 00:37:50.176 PJ_HAS_EXCEPTION_NAMES : 1 00:37:50.176 PJ_MAX_EXCEPTION_ID : 16 00:37:50.176 PJ_EXCEPTION_USE_WIN32_SEH: 0 00:37:50.176 PJ_TIMESTAMP_USE_RDTSC: : 0 00:37:50.176 PJ_OS_HAS_CHECK_STACK : 0 00:37:50.176 PJ_HAS_HIGH_RES_TIMER : 1 00:37:50.176 Running xml_test()... 00:37:50.177 ..success(0) 00:37:50.177 Running encryption_test()... 00:37:50.177 base64 test.. 00:37:50.177 SHA1 test vector 1 from sha1.c.. 00:37:50.519 SHA1 test vector 2 from rfc 3174.. 00:37:50.997 verifying test vectors from rfc 2202.. 00:37:50.998 HMAC-MD5 test vectors from rfc 2202.. 00:37:50.998 HMAC-SHA1 test vectors from rfc 2202.. 00:37:50.998 crc32 test.. 00:37:50.998 ..success(0) 00:37:50.999 Running encryption_benchmark()... 00:37:50.999 feeding 1 Mbytes of data us0:37:51.290 MD5 : 75692 25 8N2UMLyLe /peo)inter access (probably) CURRENT PROCESS: COMM=pjlib-util-test PID=127 TEXT = 0x03240040-0x03261900 DATA = 0x03261904-0x0326dc34 BSS = 0x0326dc34-0x03270954 USER-STACK = 0x0327ff44 return address: 0x03254688; contents of [PC-16...PC+8]: 0003 3038 e300 072a 300f e3ff ffc3 0c00 3038 1003 6000 2006 e3ff f1c0 3210 63f8 X 9317 e801 0000 0538 0010 0000 0568 0c01 RETE: 00000000 RETN: 031f6000 RETX: 03254688 RETS: 03254684 IPEND: 0030 SYSCFG: 0036 SEQSTAT: 00060027 SP: 031f5f24 R0: ffffffff R1: 03269348 R2: 031ef11f R3: 00000001 R4: 00000c04 R5: 031f23d0 R6: 00000000 R7: 00000003 P0: 03269348 P1: 03269348 P2: 00000000 P3: 0326dcc0 P4: 031ec018 P5: 031ef1ec FP: 031ef148 A0.w: 00000000 A0.x: 00000000 A1.w: 00000000 A1.x: 00000000 LB0: 03259711 LT0: 0325970e LC0: 00000000 LB1: 0325037f LT1: 03250376 LC1: 00000003 B0: 0327f9f4 L0: 00000000 M0: fad000be I0: 00000000 B1: b5908007 L1: 00000000 M1: 7d0008a8 I1: 00004000 B2: d4500898 L2: 00000000 M2: 0327faf4 I2: 00000000 B3: ad00408f L3: 00000000 M3: 9f06653e I3: 00000000 USP: 031ef13c ASTAT: 02003004 DCPLB_FAULT_ADDR=00000000 ICPLB_FAULT_ADDR=03254688 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 : <0x03254686> [ pjlib-util-test + 0x14646 ] 4 Target : <0x03254684> [ pjlib-util-test + 0x14644 ] Source : <0x03252a12> [ pjlib-util-test + 0x129d2 ] 5 Target : <0x03252a08> [ pjlib-util-test + 0x129c8 ] Source : <0x03255452> [ pjlib-util-test + 0x15412 ] 6 Target : <0x0325543a> [ pjlib-util-test + 0x153fa ] Source : <0x03255444> [ pjlib-util-test + 0x15404 ] 7 Target : <0x0325543a> [ pjlib-util-test + 0x153fa ] Source : <0x03255444> [ pjlib-util-test + 0x15404 ] 8 Target : <0x0325543a> [ pjlib-util-test + 0x153fa ] Source : <0x03255444> [ pjlib-util-test + 0x15404 ] 9 Target : <0x0325543a> [ pjlib-util-test + 0x153fa ] Source : <0x03255444> [ pjlib-util-test + 0x15404 ] 10 Target : <0x0325543a> [ pjlib-util-test + 0x153fa ] Source : <0x03255444> [ pjlib-util-test + 0x15404 ] 11 Target : <0x0325543a> [ pjlib-util-test + 0x153fa ] Source : <0x03255444> [ pjlib-util-test + 0x15404 ] 12 Target : <0x0325543a> [ pjlib-util-test + 0x153fa ] Source : <0x03255444> [ pjlib-util-test + 0x15404 ] 13 Target : <0x0325543a> [ pjlib-util-test + 0x153fa ] Source : <0x03255444> [ pjlib-util-test + 0x15404 ] 14 Target : <0x0325543a> [ pjlib-util-test + 0x153fa ] Source : <0x03255444> [ pjlib-util-test + 0x15404 ] 15 Target : <0x0325543a> [ pjlib-util-test + 0x153fa ] Source : <0x03255444> [ pjlib-util-test + 0x15404 ] Stack from 031f5f04: 031f23d0 ffa00b64 0012a710 0012a710 0012a710 00000008 00000c04 03257d60 03254688 00000030 00060027 00000000 031f6000 03254688 03254688 03254684 ffffffff 02003004 0325037f 03259711 03250376 0325970e 00000003 00000000 00000000 00000000 00000000 00000000 ad00408f d4500898 b5908007 0327f9f4 00000000 00000000 00000000 00000000 9f06653e 0327faf4 7d0008a8 fad000be 00000000 00000000 00004000 00000000 031ef13c 031ef148 031ef1ec 031ec018 Call Trace: 00:37:51.290 SHA1 : 170680 usec ( 11.453 Mbytes/sec) 00:37:51.290 CRC32: 44307 usec ( 44.083 Mbytes/sec) 00:37:51.290 ..success(0) 00:37:51.290 Running stun_test()... 00:37:51.291 ..success(0) 00:37:51.291 Running resolver_test()... 00:37:51.293 DNS A record parser tests 00:37:51.294 A RR with duplicate CNAME/A 00:37:51.294 CNAME RR with duplicate CNAME/A 00:37:51.294 No query section 00:37:51.294 No answer section 00:37:51.294 Answer doesn't match query 00:37:51.294 CNAME with no matching DNS A RR (1) 00:37:51.294 CNAME with no matching DNS A RR (2) 00:37:51.294 simple successful test ========================================== > > (*) 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 =-