From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Jul 25 19:10:10 2011 Return-Path: <owner-freebsd-ports-bugs@FreeBSD.ORG> Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D708E1065672 for <freebsd-ports-bugs@hub.freebsd.org>; Mon, 25 Jul 2011 19:10:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B121D8FC1C for <freebsd-ports-bugs@hub.freebsd.org>; Mon, 25 Jul 2011 19:10:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p6PJAAf0095368 for <freebsd-ports-bugs@freefall.freebsd.org>; Mon, 25 Jul 2011 19:10:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p6PJAAsm095367; Mon, 25 Jul 2011 19:10:10 GMT (envelope-from gnats) Resent-Date: Mon, 25 Jul 2011 19:10:10 GMT Resent-Message-Id: <201107251910.p6PJAAsm095367@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Stephen Montgomery-Smith <stephen@FreeBSD.org> Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60A9D106566B for <FreeBSD-gnats-submit@freebsd.org>; Mon, 25 Jul 2011 19:09:54 +0000 (UTC) (envelope-from stephen@wilberforce.math.missouri.edu) Received: from wilberforce.math.missouri.edu (wilberforce.math.missouri.edu [128.206.184.213]) by mx1.freebsd.org (Postfix) with ESMTP id 3C6428FC14 for <FreeBSD-gnats-submit@freebsd.org>; Mon, 25 Jul 2011 19:09:53 +0000 (UTC) Received: from wilberforce.math.missouri.edu (localhost [127.0.0.1]) by wilberforce.math.missouri.edu (8.14.4/8.14.4) with ESMTP id p6PJ9rqW061754 for <FreeBSD-gnats-submit@freebsd.org>; Mon, 25 Jul 2011 14:09:53 -0500 (CDT) (envelope-from stephen@wilberforce.math.missouri.edu) Received: (from stephen@localhost) by wilberforce.math.missouri.edu (8.14.4/8.14.4/Submit) id p6PJ9rJ0061753; Mon, 25 Jul 2011 14:09:53 -0500 (CDT) (envelope-from stephen) Message-Id: <201107251909.p6PJ9rJ0061753@wilberforce.math.missouri.edu> Date: Mon, 25 Jul 2011 14:09:53 -0500 (CDT) From: Stephen Montgomery-Smith <stephen@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/159189: math/taucs: problems with shared library X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Stephen Montgomery-Smith <stephen@FreeBSD.org> List-Id: Ports bug reports <freebsd-ports-bugs.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs>, <mailto:freebsd-ports-bugs-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-ports-bugs> List-Post: <mailto:freebsd-ports-bugs@freebsd.org> List-Help: <mailto:freebsd-ports-bugs-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs>, <mailto:freebsd-ports-bugs-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 25 Jul 2011 19:10:10 -0000 >Number: 159189 >Category: ports >Synopsis: math/taucs: problems with shared library >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jul 25 19:10:10 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Stephen Montgomery-Smith >Release: FreeBSD 8.2-STABLE amd64 >Organization: >Environment: System: FreeBSD wilberforce 8.2-STABLE FreeBSD 8.2-STABLE #0: Sat May 28 09:40:58 CDT 2011 stephen@laptop5.gateway.2wire.net:/usr/obj/usr/src/sys/GENERIC amd64 >Description: math/taucs uses ftime, which is part of libcompat, and on FreeBSD 8.2 is available only as a static library. This can cause problems. >How-To-Repeat: Update ports so that cad/gmsh is at version 2.5.0. (I only committed this a few minutes ago.) cd /usr/ports/cad/gmsh make -DWITH_TAUCS >Fix: Use gettimeofday instead of ftime. diff -urN /usr/ports/math/taucs/Makefile taucs/Makefile --- /usr/ports/math/taucs/Makefile 2011-07-25 00:38:22.000000000 +0000 +++ taucs/Makefile 2011-07-25 17:54:53.000000000 +0000 @@ -7,7 +7,7 @@ PORTNAME= taucs PORTVERSION= 2.2 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= math MASTER_SITES= http://www.tau.ac.il/~stoledo/taucs/${PORTVERSION}/ DISTNAME= ${PORTNAME} diff -urN /usr/ports/math/taucs/files/patch-config+FreeBSD.mk taucs/files/patch-config+FreeBSD.mk --- /usr/ports/math/taucs/files/patch-config+FreeBSD.mk 2007-01-09 05:52:07.000000000 +0000 +++ taucs/files/patch-config+FreeBSD.mk 2011-07-25 18:19:59.000000000 +0000 @@ -1,5 +1,5 @@ ---- config/FreeBSD.mk.orig Fri Aug 29 00:13:38 2003 -+++ config/FreeBSD.mk Tue Jan 9 14:18:49 2007 +--- config/FreeBSD.mk.orig 2003-08-28 15:13:38.000000000 +0000 ++++ config/FreeBSD.mk 2011-07-25 18:19:03.000000000 +0000 @@ -8,16 +8,16 @@ PATHSEP=/ DEFFLG=-D @@ -23,7 +23,7 @@ LOUTFLG = $(COUTFLG) AR = ar cr -@@ -26,12 +26,12 @@ +@@ -26,13 +26,13 @@ RANLIB = ranlib RM = rm -rf @@ -36,7 +36,10 @@ +LIBMETIS = -lmetis -LIBF77 = -lg2c +-#compat is required for ftime() +-LIBC = -lm -lcompat +LIBF77 = - #compat is required for ftime() - LIBC = -lm -lcompat ++ ++LIBC = -lm + ######################################################### diff -urN /usr/ports/math/taucs/files/patch-src-taucs_timer.c taucs/files/patch-src-taucs_timer.c --- /usr/ports/math/taucs/files/patch-src-taucs_timer.c 1970-01-01 00:00:00.000000000 +0000 +++ taucs/files/patch-src-taucs_timer.c 2011-07-25 18:12:30.000000000 +0000 @@ -0,0 +1,160 @@ +--- src/taucs_timer.c.orig 2003-09-01 10:28:54.000000000 +0000 ++++ src/taucs_timer.c 2011-07-25 18:12:00.000000000 +0000 +@@ -168,9 +168,9 @@ + static int first_time = 1; + + if (first_time) { +- struct timeb T; ++ struct timeval T; + static time_t start_time, time_diff; +- static time_t start_mill, mill_diff; ++ static time_t start_micro, micro_diff; + int rc; + double dt; + /*uint32 hi0, lo0, hi1, lo1;*/ +@@ -178,19 +178,19 @@ + + first_time = 0; + +- rc = ftime( &T ); ++ rc = gettimeofday( &T,NULL ); + rdtsc(&hi0,&lo0); +- start_time = T.time; +- start_mill = T.millitm; ++ start_time = T.tv_sec; ++ start_micro = T.tv_usec; + + sleep(1); + +- rc = ftime( &T ); ++ rc = gettimeofday( &T,NULL ); + rdtsc(&hi1,&lo1); +- time_diff = T.time - start_time; +- mill_diff = T.millitm - start_mill; ++ time_diff = T.tv_sec - start_time; ++ micro_diff = T.tv_usec - start_micro; + +- dt = (1e9) * ((double) time_diff) + (1e6) * ((double) mill_diff); ++ dt = (1e9) * ((double) time_diff) + (1e3) * ((double) micro_diff); + + hir = (hi1 - hi0); + lor = (lo1 - lo0); +@@ -249,32 +249,32 @@ + + double taucs_wtime() + { +- struct timeb T; ++ struct timeval T; + /*static int first_time = 1;*/ + /* static time_t start_time, time_diff; +- static time_t start_mill, mill_diff; ++ static time_t start_micro, micro_diff; + */ + + static time_t time_diff; +- static time_t mill_diff; ++ static time_t micro_diff; + /*int rc;*/ + double dt; + +- (void) ftime( &T ); ++ (void) gettimeofday( &T,NULL ); + /* + if (first_time) { + first_time = 0; +- start_time = T.time; +- start_mill = T.millitm; ++ start_time = T.tv_sec; ++ start_micro = T.tv_usec; + } + +- time_diff = T.time - start_time; +- mill_diff = T.millitm - start_mill; ++ time_diff = T.tv_sec - start_time; ++ micro_diff = T.tv_usec - start_micro; + */ +- time_diff = T.time; +- mill_diff = T.millitm; ++ time_diff = T.tv_sec; ++ micro_diff = T.tv_usec; + +- dt = ((double) time_diff) + (1e-3) * ((double) mill_diff); ++ dt = ((double) time_diff) + (1e-6) * ((double) micro_diff); + + return dt; + } +@@ -316,17 +316,17 @@ + struct timeb T; + static int first_time = 1; + static time_t start_time, time_diff; +- static time_t start_mill, mill_diff; ++ static time_t start_micro, micro_diff; + /*int rc;*/ + double dt,cpu_t; + static double last_cpu_t; + +- (void) ftime( &T ); ++ (void) gettimeofday( &T,NULL ); + + if (first_time) { + first_time = 0; +- start_time = T.time; +- start_mill = T.millitm; ++ start_time = T.tv_sec; ++ start_micro = T.tv_usec; + getrusage(RUSAGE_SELF,&a); + + last_cpu_t = (a.ru_utime).tv_sec+(a.ru_stime).tv_sec+ +@@ -337,13 +337,13 @@ + } + else + { +- time_diff = T.time - start_time; +- mill_diff = T.millitm - start_mill; ++ time_diff = T.tv_sec - start_time; ++ micro_diff = T.tv_usec - start_micro; + +- dt = ((double) time_diff) + ((double) mill_diff)/1000.; ++ dt = ((double) time_diff) + ((double) micro_diff)/1000000.; + +- start_time = T.time; +- start_mill = T.millitm; ++ start_time = T.tv_sec; ++ start_micro = T.tv_usec; + + getrusage(RUSAGE_SELF,&a); + +@@ -363,17 +363,17 @@ + struct timeb T; + static int first_time = 1; + static time_t start_time, time_diff; +- static time_t start_mill, mill_diff; ++ static time_t start_micro, micro_diff; + /*int rc;*/ + double dt,cpu_t; + static double start_cpu_t; + +- (void) ftime( &T ); ++ (void) gettimeofday( &T,NULL ); + + if (first_time) { + first_time = 0; +- start_time = T.time; +- start_mill = T.millitm; ++ start_time = T.tv_sec; ++ start_micro = T.tv_usec; + getrusage(RUSAGE_SELF,&a); + + start_cpu_t = (a.ru_utime).tv_sec+(a.ru_stime).tv_sec+ +@@ -385,9 +385,9 @@ + else + { + time_diff = T.time - start_time; +- mill_diff = T.millitm - start_mill; ++ micro_diff = T.tv_usec - start_micro; + +- dt = ((double) time_diff) + ((double) mill_diff)/1000.; ++ dt = ((double) time_diff) + ((double) micro_diff)/1000000.; + + getrusage(RUSAGE_SELF,&a); + >Release-Note: >Audit-Trail: >Unformatted: