From owner-freebsd-bugs@FreeBSD.ORG Mon Sep 12 21:20:14 2005 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5F0B816A41F for ; Mon, 12 Sep 2005 21:20:14 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7553143D48 for ; Mon, 12 Sep 2005 21:20:13 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j8CLKDPI008055 for ; Mon, 12 Sep 2005 21:20:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j8CLKDvk008054; Mon, 12 Sep 2005 21:20:13 GMT (envelope-from gnats) Resent-Date: Mon, 12 Sep 2005 21:20:13 GMT Resent-Message-Id: <200509122120.j8CLKDvk008054@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Christopher Sean Morrison Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E338816A41F for ; Mon, 12 Sep 2005 21:12:15 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id B278B43D48 for ; Mon, 12 Sep 2005 21:12:15 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j8CLCFdd083018 for ; Mon, 12 Sep 2005 21:12:15 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j8CLCFZT083017; Mon, 12 Sep 2005 21:12:15 GMT (envelope-from nobody) Message-Id: <200509122112.j8CLCFZT083017@www.freebsd.org> Date: Mon, 12 Sep 2005 21:12:15 GMT From: Christopher Sean Morrison To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: misc/86029: undefined reference to `_thread_dump_info' X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Sep 2005 21:20:14 -0000 >Number: 86029 >Category: misc >Synopsis: undefined reference to `_thread_dump_info' >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Sep 12 21:20:13 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Christopher Sean Morrison >Release: 5.4-RELEASE-p6 >Organization: BRL-CAD Lead Developer >Environment: FreeBSD *.*.*.* 5.4-RELEASE-p6 FreeBSD 5.4-RELEASE-p6 #0: Wed Sep 7 17:41:09 EST 2005 *@*.*.*.*:/usr/src/sys/amd64/compile/SMP amd64 >Description: Compiling code that uses the _thread_dump_info() call that should be in c_r fails with an unresolved symbol reference. The symbol does show up in an nm of libc_r but c_r is apparently not used when -pthread is passed to the compiler/linker. This same compilation on an identically configured ia32 freebsd install does not exhibit this same problem. The code in question is being compiled through libtool which also presumes (as has been documented in the past, yes?) that -pthread takes care of providing -lc_r. The script specifically tests for -lc_r ldflags and removes them when using -pthread. >How-To-Repeat: Compile and link against code that uses _thread_dump_info() using -pthread without manually adding -lc_r. >Fix: Manually compiling outside of libtool and adding -lc_r seems to fix the problem. Similarly, tricking the libtool script by passing a cflag instead of an ldflag works: make CFLAGS=-Wl,-lc_r >Release-Note: >Audit-Trail: >Unformatted: