Re: [Scsirastools-developers] scsirastools-1.6.3
Brought to you by:
arcress
From: Daniel S. <ma...@my...> - 2011-06-13 19:04:21
|
Andy Cress napsal(a): > Dan, > > The resolution for the compile error is to add this line in sgsubmon.h, near the top: > #define ushort unsigned short > Thanks it helps. But I must use -D_POSIX_C_SOURCE=200112L, to sgsubmon.c add on the top #define _BSD_SOURCE. > About the alignment on SPARC, can you identify where it crashed? Now it looks that on stable it works with this modification OK. But on old stable system it crashes. But I can't identify where because gdb crashed too :-(. It looks like there is some missaligned structure. I only strace. fstat64(0, {st_mode=S_IFREG|0644, st_size=806, ...}) = 4 fstat64(0, {st_mode=S_IFREG|0644, st_size=806, ...}) = 0 mmap(0xf7fc6000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4 read(806, "TZif", 4096) = 4 close(0) = -134455296 munmap(0, 8192) = 3 fstat64(0, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 mmap(0xf7fc6000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x1 fstat64(0, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), ...}) = 0 mmap(0xf7fc4000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x1 write(1, "\n", 1) = 1 sgdefects utility v1.63 for SCSI disks write(55, " sgdefects utilit"..., 55) = 1 ****************************************** write(57, " ******************"..., 57) = 1 Log file /var/log/sgdefects.log is open write(40, "Log file /var/log/sgdefects.log "..., 40) = 1 Num Name [bus:ch:id:lun] Type Vendor Device_Model FW Serial# Size write(74, "\nNum Name [bus:ch:id:lun] Type V"..., 74) = 103872 stat64(umovestr: Input/output error 0x2, {st_mode=S_IFCHR|01200750, st_rdev=makedev(4158962875, 2144305148), ...}) = 103888 stat64(umovestr: Input/output error 0x2, {st_mode=S_IFCHR|01200750, st_rdev=makedev(4158962875, 2144305148), ...}) = -6767412 open(umovestr: Input/output error 0x4, O_RDWR|O_NONBLOCK) = 4 ioctl(0, 0x5382, 0xff98bbfc) = 4 ioctl(0, 0x5386, 0xff98bc0c) = 4 ioctl(0, 0x2203, 0xff98bc08) = 4 ioctl(0, 0x2276, 0xff98bbdc) = 4 fcntl64(16386, F_GETFL) = 0x4 (flags O_RDONLY|0x4) fcntl64(0, F_SETFL, O_RDWR) = 4 fcntl64(2, F_GETFL) = 0x4 (flags O_RDONLY|0x4) fcntl64(0, F_SETFL, O_RDWR) = 4 write(42, "\0\0\0\0\0\0\0\204\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 42) = 4 read(132, "\0\0\0\204", 132) = 4 write(46, "\0\0\0\204\0\0\0,\0\0\4\322\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 46) = 4 read(44, <unfinished ...> --- SIGBUS (Bus error) @ 0 (0) --- +++ killed by SIGBUS +++ > > Andy > > -----Original Message----- > From: Daniel Smolik [mailto:ma...@my...] > Sent: Monday, June 13, 2011 1:40 PM > To: scs...@li... > Subject: [Scsirastools-developers] scsirastools-1.6.3 > > Hi all, > I can't compile on any my box. On my i386 with squeeze and SPARC with squeeze failed with the same output. > On SPARC with debian etch compile OK . But sgdefect crash with SIGBUS. On SPARC this mean access to unaligned address. > > Dan > > > > > > sgdskfl.c:1089: warning: implicit declaration of function ‘sync’ > gcc -D_POSIX_C_SOURCE=200112L -Wall -o sgdskfl sgdskfl.o sgsub.o sgerr.o sgcommon.o > if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I ../intl -DLOCALEDIR=\"/usr/share/locale\" -DDATA_DIR=\"/usr/share/scsirastools\" > -D_POSIX_C_SOURCE=200112L -Wall -MT sgmode.o -MD -MP -MF ".deps/sgmode.Tpo" -c -o sgmode.o sgmode.c; \ > then mv -f ".deps/sgmode.Tpo" ".deps/sgmode.Po"; else rm -f ".deps/sgmode.Tpo"; exit 1; fi > sgmode.c: In function ‘beforemd’: > sgmode.c:1020: warning: pointer targets in assignment differ in signedness > gcc -D_POSIX_C_SOURCE=200112L -Wall -o sgmode sgmode.o sgsub.o sgerr.o sgcommon.o > if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I ../intl -DLOCALEDIR=\"/usr/share/locale\" -DDATA_DIR=\"/usr/share/scsirastools\" > -D_POSIX_C_SOURCE=200112L -Wall -MT sgraidmon.o -MD -MP -MF ".deps/sgraidmon.Tpo" -c -o sgraidmon.o sgraidmon.c; \ > then mv -f ".deps/sgraidmon.Tpo" ".deps/sgraidmon.Po"; else rm -f ".deps/sgraidmon.Tpo"; exit 1; fi > In file included from sgraidmon.c:148: > sgsubmon.h:117: error: expected specifier-qualifier-list before ‘ushort’ > sgraidmon.c: In function ‘device_there’: > sgraidmon.c:589: warning: pointer targets in passing argument 1 of ‘open’ differ in signedness > /usr/include/fcntl.h:73: note: expected ‘const char *’ but argument is of type ‘unsigned char *’ > sgraidmon.c: In function ‘check_proc’: > sgraidmon.c:730: error: ‘SLOT_LIST’ has no member named ‘ins’ > sgraidmon.c:764: error: ‘SLOT_LIST’ has no member named ‘stat’ > sgraidmon.c:782: error: ‘SLOT_LIST’ has no member named ‘ins’ > sgraidmon.c:805: error: ‘ushort’ undeclared (first use in this function) > sgraidmon.c:805: error: (Each undeclared identifier is reported only once > sgraidmon.c:805: error: for each function it appears in.) > sgraidmon.c:805: error: expected ‘;’ before ‘tmpins’ > sgraidmon.c:826: error: ‘SLOT_LIST’ has no member named ‘stat’ > sgraidmon.c:829: error: ‘SLOT_LIST’ has no member named ‘stat’ > sgraidmon.c:831: error: ‘SLOT_LIST’ has no member named ‘stat’ > sgraidmon.c:833: error: ‘SLOT_LIST’ has no member named ‘stat’ > sgraidmon.c:839: error: ‘tmpins’ undeclared (first use in this function) > sgraidmon.c:847: error: ‘SLOT_LIST’ has no member named ‘ins’ > sgraidmon.c:849: error: ‘SLOT_LIST’ has no member named ‘ins’ > sgraidmon.c: In function ‘scandev’: > sgraidmon.c:939: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness > /usr/include/string.h:127: note: expected ‘char * __restrict__’ but argument is of type ‘unsigned char *’ > sgraidmon.c:979: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness > /usr/include/string.h:127: note: expected ‘char * __restrict__’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1051: warning: pointer targets in passing argument 1 of ‘fillstr’ differ in signedness > sgsubmon.h:130: note: expected ‘char *’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1084: warning: pointer targets in passing argument 1 of ‘fillstr’ differ in signedness > sgsubmon.h:130: note: expected ‘char *’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1085: warning: pointer targets in passing argument 1 of ‘fillstr’ differ in signedness > sgsubmon.h:130: note: expected ‘char *’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1086: warning: pointer targets in passing argument 1 of ‘fillstr’ differ in signedness > sgsubmon.h:130: note: expected ‘char *’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1090: warning: pointer targets in passing argument 1 of ‘strncmp’ differ in signedness > /usr/include/string.h:145: note: expected ‘const char *’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1096: warning: pointer targets in passing argument 1 of ‘strncpy’ differ in signedness > /usr/include/string.h:130: note: expected ‘char * __restrict__’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1096: warning: pointer targets in passing argument 2 of ‘strncpy’ differ in signedness > /usr/include/string.h:130: note: expected ‘const char * __restrict__’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1100: warning: pointer targets in passing argument 1 of ‘strncpy’ differ in signedness > /usr/include/string.h:130: note: expected ‘char * __restrict__’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1100: warning: pointer targets in passing argument 2 of ‘strncpy’ differ in signedness > /usr/include/string.h:130: note: expected ‘const char * __restrict__’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1115: warning: pointer targets in passing argument 1 of ‘getmd’ differ in signedness > sgraidmon.c:291: note: expected ‘char *’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1117: warning: pointer targets in passing argument 1 of ‘mdstat’ differ in signedness > sgraidmon.c:449: note: expected ‘char *’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1139: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness > /usr/include/string.h:127: note: expected ‘char * __restrict__’ but argument is of type ‘unsigned char *’ > sgraidmon.c: In function ‘do_insert’: > sgraidmon.c:1213: warning: pointer targets in passing argument 1 of ‘strcmp’ differ in signedness > /usr/include/string.h:142: note: expected ‘const char *’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1213: warning: pointer targets in passing argument 2 of ‘strcmp’ differ in signedness > /usr/include/string.h:142: note: expected ‘const char *’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1264: warning: pointer targets in passing argument 1 of ‘getmd’ differ in signedness > sgraidmon.c:291: note: expected ‘char *’ but argument is of type ‘unsigned char *’ > sgraidmon.c: In function ‘do_remove’: > sgraidmon.c:1340: warning: pointer targets in passing argument 1 of ‘getmd’ differ in signedness > sgraidmon.c:291: note: expected ‘char *’ but argument is of type ‘unsigned char *’ > sgraidmon.c: In function ‘check_devstatus’: > sgraidmon.c:1388: warning: pointer targets in passing argument 1 of ‘strcmp’ differ in signedness > /usr/include/string.h:142: note: expected ‘const char *’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1388: warning: pointer targets in passing argument 2 of ‘strcmp’ differ in signedness > /usr/include/string.h:142: note: expected ‘const char *’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1439: warning: pointer targets in passing argument 1 of ‘strcmp’ differ in signedness > /usr/include/string.h:142: note: expected ‘const char *’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1439: warning: pointer targets in passing argument 2 of ‘strcmp’ differ in signedness > /usr/include/string.h:142: note: expected ‘const char *’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1440: warning: pointer targets in passing argument 1 of ‘strcmp’ differ in signedness > /usr/include/string.h:142: note: expected ‘const char *’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1440: warning: pointer targets in passing argument 2 of ‘strcmp’ differ in signedness > /usr/include/string.h:142: note: expected ‘const char *’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1457: warning: pointer targets in passing argument 1 of ‘strcmp’ differ in signedness > /usr/include/string.h:142: note: expected ‘const char *’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1457: warning: pointer targets in passing argument 2 of ‘strcmp’ differ in signedness > /usr/include/string.h:142: note: expected ‘const char *’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1459: warning: pointer targets in passing argument 1 of ‘strcmp’ differ in signedness > /usr/include/string.h:142: note: expected ‘const char *’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1459: warning: pointer targets in passing argument 2 of ‘strcmp’ differ in signedness > /usr/include/string.h:142: note: expected ‘const char *’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1475: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness > /usr/include/string.h:127: note: expected ‘char * __restrict__’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1475: warning: pointer targets in passing argument 2 of ‘strcpy’ differ in signedness > /usr/include/string.h:127: note: expected ‘const char * __restrict__’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1476: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness > /usr/include/string.h:127: note: expected ‘char * __restrict__’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1476: warning: pointer targets in passing argument 2 of ‘strcpy’ differ in signedness > /usr/include/string.h:127: note: expected ‘const char * __restrict__’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1477: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness > /usr/include/string.h:127: note: expected ‘char * __restrict__’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1477: warning: pointer targets in passing argument 2 of ‘strcpy’ differ in signedness > /usr/include/string.h:127: note: expected ‘const char * __restrict__’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1478: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness > /usr/include/string.h:127: note: expected ‘char * __restrict__’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1478: warning: pointer targets in passing argument 2 of ‘strcpy’ differ in signedness > /usr/include/string.h:127: note: expected ‘const char * __restrict__’ but argument is of type ‘unsigned char *’ > sgraidmon.c: In function ‘main’: > sgraidmon.c:1694: warning: pointer targets in assignment differ in signedness > sgraidmon.c:1696: warning: pointer targets in assignment differ in signedness > sgraidmon.c:1698: warning: pointer targets in assignment differ in signedness > sgraidmon.c:1700: warning: pointer targets in assignment differ in signedness > sgraidmon.c:1703: warning: pointer targets in assignment differ in signedness > sgraidmon.c:1776: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness > /usr/include/string.h:127: note: expected ‘char * __restrict__’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1776: warning: pointer targets in passing argument 2 of ‘strcpy’ differ in signedness > /usr/include/string.h:127: note: expected ‘const char * __restrict__’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1777: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness > /usr/include/string.h:127: note: expected ‘char * __restrict__’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1777: warning: pointer targets in passing argument 2 of ‘strcpy’ differ in signedness > /usr/include/string.h:127: note: expected ‘const char * __restrict__’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1778: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness > /usr/include/string.h:127: note: expected ‘char * __restrict__’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1778: warning: pointer targets in passing argument 2 of ‘strcpy’ differ in signedness > /usr/include/string.h:127: note: expected ‘const char * __restrict__’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1779: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness > /usr/include/string.h:127: note: expected ‘char * __restrict__’ but argument is of type ‘unsigned char *’ > sgraidmon.c:1779: warning: pointer targets in passing argument 2 of ‘strcpy’ differ in signedness > /usr/include/string.h:127: note: expected ‘const char * __restrict__’ but argument is of type ‘unsigned char *’ > make[2]: *** [sgraidmon.o] Error 1 > make[2]: Leaving directory `/tmp/scsirastools-1.6.3/src' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/tmp/scsirastools-1.6.3' > make: *** [all] Error 2 > marvin@marvin:/tmp/scsirastools-1.6.3$ > -- Mydatex s r.o. http://www.mydatex.cz email: sm...@my... mob: 604200362 tel: 226210085 |