From owner-freebsd-current@FreeBSD.ORG Sat Jun 16 20:55:19 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B439316A400; Sat, 16 Jun 2007 20:55:19 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.freebsd.org (Postfix) with ESMTP id 95ECA13C447; Sat, 16 Jun 2007 20:55:19 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.1/8.13.8) with ESMTP id l5GKsZeR026996; Sat, 16 Jun 2007 13:54:35 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.1/8.13.8/Submit) id l5GKsZ6Q026995; Sat, 16 Jun 2007 13:54:35 -0700 (PDT) (envelope-from sgk) Date: Sat, 16 Jun 2007 13:54:34 -0700 From: Steve Kargl To: Craig Rodrigues Message-ID: <20070616205434.GA26966@troutmask.apl.washington.edu> References: <20070616203624.GA37899@crodrigues.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070616203624.GA37899@crodrigues.org> User-Agent: Mutt/1.4.2.2i Cc: deischen@freebsd.org, freebsd-current@freebsd.org, davidxu@freebsd.org Subject: Re: Undefined symbol timer_delete()? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jun 2007 20:55:19 -0000 On Sat, Jun 16, 2007 at 04:36:24PM -0400, Craig Rodrigues wrote: > Hi, > > I was in the middle of updating the xfsprogs port > when I got a linker problem related to timer_delete(2). > > I just tried to compile the following program: > > #include > int main(void) { > timer_t timerid; > timer_delete(timerid); > return 0; > } > > and got this linker error: > /var/tmp//ccBspzgp.o(.text+0x18): In function `main': > : undefined reference to `timer_delete' > > According to the timer_delete(2) man page, this symbol should be in libc, > but I can't link to it. > > Any ideas what is going on? > You failed to include the actual command you used to compile your program. So, I'm guessing pilot error. mobile:kargl[203] cat > j.c #include int main(void) { timer_t timerid; timer_delete(timerid); return 0; } mobile:kargl[204] cc -o z j.c /tmp/ccisiugw.o(.text+0x18): In function `main': : undefined reference to `timer_delete' mobile:kargl[205] cc -o z j.c -lrt It appears that the manpage is wrong LIBRARY Standard C Library (libc, -lc) Hint: (cd /usr/src/lib ; find . -name \*.map | xargs grep timer) -- Steve