strace-4.5.16 fails to build on sparc Reproducible: Always Steps to Reproduce: emerge strace Actual Results: sparc-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -I. -Ilinux/sparc -I./linux/sparc -Ilinux -I./linux -Wall -O3 -mcpu=ultrasparc -MT file.o -MD -MP -MF .deps/file.Tpo -c -o file.o file.c file.c: In function `realprintstat': file.c:922: warning: long unsigned int format, unsigned int arg (arg 2) In file included from file.c:769: file.c: In function `printstatsol': file.c:678: error: incompatible type for argument 1 of `sprinttime' In file included from file.c:770: file.c:678: error: incompatible type for argument 1 of `sprinttime' In file included from file.c:771: file.c:678: error: incompatible type for argument 1 of `sprinttime' make[1]: *** [file.o] Error 1 make[1]: Leaving directory `/home/tmp/portage/dev-util/strace-4.5.16-r1/work/strace-4.5.16' make: *** [all] Error 2 looks like upstream bug - the function sprinttime(time_t) is called with timestruct_t param.
emerge --info please.
Created attachment 140213 [details, diff] Quick fix
Created attachment 140214 [details] emerge --info
Base-system: ?
i dont have any way of actually run time testing this, but the fix is probably: - tprintf("st_atime=%s, ", sprinttime(statbuf.st_atime)); - tprintf("st_mtime=%s, ", sprinttime(statbuf.st_mtime)); - tprintf("st_ctime=%s}", sprinttime(statbuf.st_ctime)); + tprintf("st_atime=%s, ", sprinttime(statbuf.st_atime.tv_sec)); + tprintf("st_mtime=%s, ", sprinttime(statbuf.st_mtime.tv_sec)); + tprintf("st_ctime=%s}", sprinttime(statbuf.st_ctime.tv_sec)); sprinttime() takes a time_t which represents the time (in seconds). the time members of the solstatbuf are the time (in seconds) as well as nanosecond granularity. since sprinttime() doesnt include nanosecond granularity, we dont care about that part of the time. someone needs to find a sparc system running with the personality required and exercise this difference
Applying vapier's patch here I can build dev-util/strace-4.5.16-r1 with -O3.
Created attachment 142508 [details] files/strace-4.5.16-sparc-fix-O3.patch Patch to fix bug 204457 when building with -O3.
Created attachment 142510 [details] emerge-sparc64 emerge --info for the sparc64
Reassigning to base-system as this is a gcc (-O3) issue and there's a patch that seems to work. base-system: it's your call.
it was assigned to sparc because it's up to the sparc team to validate things work
vapier, I've tried the patch locally and it worked. What else do you need from us?
you were supposed to actually commit it :P http://sources.gentoo.org/dev-util/strace/strace-4.5.16-r1.ebuild?r1=1.9&r2=1.10 http://sources.gentoo.org/dev-util/strace/files/strace-4.5.16-sparc-times.patch?rev=1.1