From owner-freebsd-ports Thu Dec 23 8: 0: 6 1999 Delivered-To: freebsd-ports@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id E609414C93 for ; Thu, 23 Dec 1999 08:00:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id IAA86920; Thu, 23 Dec 1999 08:00:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: by hub.freebsd.org (Postfix, from userid 32767) id 1D25015887; Thu, 23 Dec 1999 07:59:04 -0800 (PST) Message-Id: <19991223155904.1D25015887@hub.freebsd.org> Date: Thu, 23 Dec 1999 07:59:04 -0800 (PST) From: vadim@gc.lviv.ua To: freebsd-gnats-submit@freebsd.org X-Send-Pr-Version: www-1.0 Subject: ports/15647: MICO: doesn't compiles and mico-ld links only static Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 15647 >Category: ports >Synopsis: MICO: doesn't compiles and mico-ld links only static >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Dec 23 08:00:01 PST 1999 >Closed-Date: >Last-Modified: >Originator: Vadim Chekan >Release: 3.2-STABLE >Organization: Galitian Contracts >Environment: FreeBSD gate.gc.lviv.ua 3.2-STABLE FreeBSD 3.2-STABLE #0: Sat Dec 4 14:17:05 EE T 1999 vadim@gate.gc.lviv.ua:/usr/src/sys/compile/GATE.3 i386 >Description: When I try to make /usr/ports/devel/mico g++295 -I. -I../../include -O -pipe -ftemplate-depth-42 -fno-exceptions -fex ceptions -O0 -I/usr/local/include/tcl8.0 -I/usr/X11R6/include/X11/qt -c TimeSer vice_help.cc -o TimeService_help.o TimeService_help.cc: In function `TimeT getTimezone()': TimeService_help.cc:63: implicit declaration of function `int ftime(...)' gmake[2]: *** [TimeService_help.o] Error 1 gmake[2]: Leaving directory `/usr/ports/devel/mico/work/mico/coss/time' gmake[1]: *** [subprg] Error 1 gmake[1]: Leaving directory `/usr/ports/devel/mico/work/mico/coss' gmake: *** [system] Error 1 *** Error code 2 Stop. =================== It's because ftime() on FreeBSD isn't supported already. Patch is applied. Second problem: linking simple example I get executable 3.9Mb! remove /usr/local/lib/mico2.3.0.a ldconfig -R mico-ld -o stat account.o main.o -lm -lmico2.3.0 It can't link! It doesn't see libmico.2.3.0.so -> /usr/local/lib/libmico2.3.0.so.1 Ok, ln -s libmico.so /usr/local/lib/libmico2.3.0.so.1 ldconfig -R mico-ld -o dynamic account.o main.o -lm -lmico It links and size of dynamic is 171K I guess linker doesn't see shared lib because of digits in it's name Fix: add link from libmico.so -> libmico2.3.0.so.1 ? >How-To-Repeat: cd /usr/ports/devel/mico make >Fix: man ftime says: This interface is obsoleted by gettimeofday(2) man gettimeofday says: Note: timezone is no longer used; this information is kept outside the kernel. but we need exactly timezone. So use localtime() ftime return timezone offset in minutes, localtime in seconds, so divide it by 60. --- TimeService_help.cc Thu Dec 23 17:30:15 1999 +++ TimeService_help.cc.new Thu Dec 23 14:32:56 1999 @@ -26,7 +26,6 @@ #include "CosTime.h" #include #include -#include // //Helper functions, mainly wrappers around the time function @@ -59,10 +58,10 @@ TimeBase::TimeT getTimezone() { //obtain timezone - timeb timestruct; - ftime(×truct); + time_t timev = time(0); + struct tm *local_tm = localtime(&timev); - TimeBase::TdfT displacementV = timestruct.timezone; + TimeBase::TdfT displacementV = local_tm->tm_gmtoff % 60; return displacementV; } >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message