From owner-freebsd-stable@FreeBSD.ORG Thu Dec 18 01:54:43 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D94316A4CE for ; Thu, 18 Dec 2003 01:54:43 -0800 (PST) Received: from smtp.atlantis.dp.ua (smtp.atlantis.dp.ua [193.108.46.231]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5A73743D53 for ; Thu, 18 Dec 2003 01:54:40 -0800 (PST) (envelope-from dmitry@atlantis.dp.ua) Received: from smtp.atlantis.dp.ua (smtp.atlantis.dp.ua [193.108.46.231]) by smtp.atlantis.dp.ua (8.12.6p2/8.12.6) with ESMTP id hBI9sTi5043050 for ; Thu, 18 Dec 2003 11:54:29 +0200 (EET) (envelope-from dmitry@atlantis.dp.ua) Date: Thu, 18 Dec 2003 11:54:29 +0200 (EET) From: Dmitry Pryanishnikov To: stable@freebsd.org Message-ID: <20031218114047.W32014@atlantis.atlantis.dp.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: ftime doesn't fetch from libcompat.a using -lcompat X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Dec 2003 09:54:43 -0000 Hello! I've found a very unusual bug. I've tried to build a legacy program which uses ftime(), but I've got unresolved reference to `ftime'. I've created a very simple program that demonstrates a bug: #include #include main() { struct timeb tb; return ftime(&tb); } dmitry@test$ cc -lcompat a.c /tmp/cck3ZpNz.o: In function `main': /tmp/cck3ZpNz.o(.text+0xe): undefined reference to `ftime' dmitry@test$ cc -lcompat -static a.c /tmp/ccbGUAGZ.o: In function `main': /tmp/ccbGUAGZ.o(.text+0xe): undefined reference to `ftime' The most interesting thing here is that I can extract module ftime.o from my /usr/lib/libcompat.a and link against it: dmitry@test$ ar p /usr/lib/libcompat.a ftime.o >ftime.o dmitry@test$ cc a.c ftime.o dmitry@test$ It seems that symbol `ftime' gets somehow "undeclared" in library symbol table. Could this error be fixed? It's present in 4.8-RELEASE and 4.9-RELEASE. I haven't found anything in GNATS about this issue. Sincerely, Dmitry -- Atlantis ISP, System Administrator e-mail: dmitry@atlantis.dp.ua nic-hdl: LYNX-RIPE