pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/42530: emulators/tme build failure on NetBSD-current 64bit time_t
>Number: 42530
>Category: pkg
>Synopsis: emulators/tme build failure on NetBSD-current 64bit time_t
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Dec 27 09:35:00 +0000 2009
>Originator: Izumi Tsutsui
>Release: NetBSD 5.99.22
>Organization:
>Environment:
System: NetBSD 5.99.22 updated around 20091213
Architecture: i386
Machine: i386
>Description:
emulators/tme build fails on NetBSD-current due to printf format warnings
after 64bit time_t changes:
---
:
libtool: compile: cc -DHAVE_CONFIG_H -I. -I.. -D_TME_IMPL \
-I/work/pkgsrc/emulators/tme/work.i386/.buildlink/include \
-I/work/pkgsrc/emulators/tme/work.i386/.x11-buildlink/include \
-DTME_NO_LOG -DTME_NO_DEBUG_LOCKS -DTME_NO_AUDIT_ATOMICS -DNDEBUG -O2 \
-Wundef -Wall -Werror -MT am9513.lo -MD -MP -MF .deps/am9513.Tpo -c am9513.c \
-fPIC -DPIC -o .libs/am9513.o
cc1: warnings being treated as errors
am9513.c: In function '_tme_am9513_th_timer':
am9513.c:484: warning: format '%ld' expects type 'long int', but argument 4 has
type 'time_t'
gmake[3]: *** [am9513.lo] Error 1
gmake[3]: Leaving directory `/work/pkgsrc/emulators/tme/work.i386/tme-0.6/ic'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/work/pkgsrc/emulators/tme/work.i386/tme-0.6/ic'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/work/pkgsrc/emulators/tme/work.i386/tme-0.6'
gmake: *** [all] Error 2
*** Error code 2
Stop.
---
>How-To-Repeat:
cd pkgsrc/emulators/tme
make update
>Fix:
The following workaround (use %ldd with (long long) cast) just works.
(but not checked on other OSes than NetBSD)
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/emulators/tme/distinfo,v
retrieving revision 1.9
diff -u -r1.9 distinfo
--- distinfo 7 Sep 2007 14:11:51 -0000 1.9
+++ distinfo 27 Dec 2009 09:23:09 -0000
@@ -3,3 +3,4 @@
SHA1 (tme-0.6.tar.gz) = bd5556eb2ae4a6999f46099166370491ee633a8b
RMD160 (tme-0.6.tar.gz) = b730faac06280c55c9355e375caf4f4b26365f50
Size (tme-0.6.tar.gz) = 1700273 bytes
+SHA1 (patch-aa) = 9ade811eac6eb3fae18a0857b278e01b635cf0b1
--- /dev/null 2009-12-27 18:03:10.000000000 +0900
+++ patches/patch-aa 2009-12-27 16:35:53.000000000 +0900
@@ -0,0 +1,64 @@
+$NetBSD$
+
+--- ic/am9513.c 2006-09-30 21:43:36.000000000 +0900
++++ ic/am9513.c
+@@ -117,7 +117,7 @@ struct tme_am9513 {
+ #define tme_am9513_counter_cntr tme_am9513_counter_regs[3]
+ unsigned int tme_am9513_counter_flags;
+ #ifdef TME_AM9513_TRACK_INT_RATE
+- unsigned long tme_am9513_counter_int_sample;
++ time_t tme_am9513_counter_int_sample;
+ struct timeval tme_am9513_counter_int_sample_time;
+ #endif /* TME_AM9513_TRACK_INT_RATE */
+ } tme_am9513_counters[5];
+@@ -484,9 +484,9 @@ _tme_am9513_th_timer(struct tme_am9513 *
+ tme_log(TME_AM9513_LOG_HANDLE(am9513),
+ 0, TME_OK,
+ (TME_AM9513_LOG_HANDLE(am9513),
+- "timer %d interrupt rate: %ld/sec",
++ "timer %d interrupt rate: %lld/sec",
+ counter_i,
+- (counter->tme_am9513_counter_int_sample
++ (long long)(counter->tme_am9513_counter_int_sample
+ / counter->tme_am9513_counter_int_sample_time.tv_sec)));
+ }
+
+--- ic/isil7170.c 2006-09-30 21:43:36.000000000 +0900
++++ ic/isil7170.c
+@@ -151,7 +151,7 @@ struct tme_isil7170 {
+
+ /* the number of distinct interrupts that have been delivered during
+ this sample: */
+- unsigned long tme_isil7170_int_sample;
++ time_t tme_isil7170_int_sample;
+ #endif /* TME_ISIL7170_TRACK_INT_RATE */
+ };
+
+@@ -337,8 +337,8 @@ _tme_isil7170_th_timer(struct tme_isil71
+ tme_log(TME_ISIL7170_LOG_HANDLE(isil7170),
+ 0, TME_OK,
+ (TME_ISIL7170_LOG_HANDLE(isil7170),
+- "timer interrupt rate: %ld/sec",
+- (isil7170->tme_isil7170_int_sample
++ "timer interrupt rate: %lld/sec",
++ (long long)(isil7170->tme_isil7170_int_sample
+ / (TME_ISIL7170_TRACK_INT_RATE
+ + now.tv_sec
+ - isil7170->tme_isil7170_int_sample_time.tv_sec))));
+
+--- machine/sun4/sun4-timer.c 2007-01-30 12:07:11.000000000 +0900
++++ machine/sun4/sun4-timer.c
+@@ -167,11 +167,11 @@ _tme_sun4_timer_update(struct tme_sun4_t
+ tme_log(TME_SUN4_LOG_HANDLE(timer->tme_sun4_timer_sun4),
+ 0, TME_OK,
+ (TME_SUN4_LOG_HANDLE(timer->tme_sun4_timer_sun4),
+- "level %d timer interrupt rate: %ld/sec",
++ "level %d timer interrupt rate: %lld/sec",
+ (timer == &timer->tme_sun4_timer_sun4->tme_sun4_timers[0]
+ ? 10
+ : 14),
+- (timer->tme_sun4_timer_track_ints
++ ((long long)timer->tme_sun4_timer_track_ints
+ / (now->tv_sec
+ - (timer->tme_sun4_timer_track_sample.tv_sec
+ - TME_SUN4_TIMER_TRACK_INT_RATE)))));
Home |
Main Index |
Thread Index |
Old Index