NetBSD Problem Report #46278

From www@NetBSD.org  Thu Mar 29 02:13:06 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id B000063C552
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 29 Mar 2012 02:13:05 +0000 (UTC)
Message-Id: <20120329021304.D891E63C4B1@www.NetBSD.org>
Date: Thu, 29 Mar 2012 02:13:04 +0000 (UTC)
From: isaki@pastel-flower.jp
Reply-To: isaki@pastel-flower.jp
To: gnats-bugs@NetBSD.org
Subject: gcc -pg with pthread does not work on 6.0_BETA/i386
X-Send-Pr-Version: www-1.0

>Number:         46278
>Category:       lib
>Synopsis:       gcc -pg with pthread does not work on 6.0_BETA/i386
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 29 02:15:00 +0000 2012
>Last-Modified:  Thu May 24 05:35:05 +0000 2012
>Originator:     Tetsuya Isaki
>Release:        NetBSD 6.0_BETA/i386
>Organization:
>Environment:
NetBSD xxxxxxxxxx 6.0_BETA NetBSD 6.0_BETA (GENERIC) i386
>Description:
Profile with pthread does not output gmon.out on 6.0_BETA/i386.

-----
% uname -srm
NetBSD 6.0_BETA i386
% cat tmp.c
#include <pthread.h>

void *run(void *arg)
{
        pthread_detach(pthread_self());
}

int main(void)
{
        int i;
        pthread_t tid;

        for (i = 0; i < 8; i++) {
                pthread_create(&tid, NULL, &run, NULL);
        }
        pthread_exit(NULL);
}
% gcc -pg -g tmp.c -lpthread
/usr/lib/libc.so.12: warning: warning: this program uses xdr_peername(), which is deprecated and buggy.
/usr/lib/libc.so.12: warning: warning: __findenv is an internal obsolete function.
/usr/lib/libc.so.12: warning: warning: this program uses xdr_mapname(), which is deprecated and buggy.
/usr/lib/libc.so.12: warning: warning: this program uses xdr_domainname(), which is deprecated and buggy.
ld: warning: type and size of dynamic symbol `__stop_link_set_all_categories' are not defined
ld: dynamic variable `__stop_link_set_all_categories' is zero size
ld: warning: type and size of dynamic symbol `__start_link_set_all_categories' are not defined
ld: dynamic variable `__start_link_set_all_categories' is zero size
% ls
a.out tmp.c
% ./a.out
% ls
a.out tmp.c
%
-----

See also
http://mail-index.netbsd.org/netbsd-users/2011/03/06/msg007966.html
and
http://gnats.netbsd.org/39537
>How-To-Repeat:
see avobe.
>Fix:
N/A

>Audit-Trail:
From: Tetsuya Isaki <isaki@pastel-flower.jp>
To: gnats-bugs@NetBSD.org
Cc: lib-bug-people@netbsd.org,	gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org
Subject: Re: lib/46278: gcc -pg with pthread does not work on 6.0_BETA/i386
Date: Thu, 24 May 2012 14:31:58 +0900

 Can anyone take this PR?
 I write some apps using pthread on NetBSD/i386, so I cannot
 get profile since netbsd-5.
 ---
 Tetsuya Isaki <isaki@pastel-flower.jp / isaki@NetBSD.org>

 At Thu, 29 Mar 2012 02:15:01 +0000 (UTC),
 isaki@pastel-flower.jp wrote:
 > 
 > >Number:         46278
 > >Category:       lib
 > >Synopsis:       gcc -pg with pthread does not work on 6.0_BETA/i386
 > >Confidential:   no
 > >Severity:       serious
 > >Priority:       high
 > >Responsible:    lib-bug-people
 > >State:          open
 > >Class:          sw-bug
 > >Submitter-Id:   net
 > >Arrival-Date:   Thu Mar 29 02:15:00 +0000 2012
 > >Originator:     Tetsuya Isaki
 > >Release:        NetBSD 6.0_BETA/i386
 > >Organization:
 > >Environment:
 > NetBSD xxxxxxxxxx 6.0_BETA NetBSD 6.0_BETA (GENERIC) i386
 > >Description:
 > Profile with pthread does not output gmon.out on 6.0_BETA/i386.
 > 
 > -----
 > % uname -srm
 > NetBSD 6.0_BETA i386
 > % cat tmp.c
 > #include <pthread.h>
 > 
 > void *run(void *arg)
 > {
 >         pthread_detach(pthread_self());
 > }
 > 
 > int main(void)
 > {
 >         int i;
 >         pthread_t tid;
 > 
 >         for (i = 0; i < 8; i++) {
 >                 pthread_create(&tid, NULL, &run, NULL);
 >         }
 >         pthread_exit(NULL);
 > }
 > % gcc -pg -g tmp.c -lpthread
 > /usr/lib/libc.so.12: warning: warning: this program uses xdr_peername(), which is deprecated and buggy.
 > /usr/lib/libc.so.12: warning: warning: __findenv is an internal obsolete function.
 > /usr/lib/libc.so.12: warning: warning: this program uses xdr_mapname(), which is deprecated and buggy.
 > /usr/lib/libc.so.12: warning: warning: this program uses xdr_domainname(), which is deprecated and buggy.
 > ld: warning: type and size of dynamic symbol `__stop_link_set_all_categories' are not defined
 > ld: dynamic variable `__stop_link_set_all_categories' is zero size
 > ld: warning: type and size of dynamic symbol `__start_link_set_all_categories' are not defined
 > ld: dynamic variable `__start_link_set_all_categories' is zero size
 > % ls
 > a.out tmp.c
 > % ./a.out
 > % ls
 > a.out tmp.c
 > %
 > -----
 > 
 > See also
 > http://mail-index.netbsd.org/netbsd-users/2011/03/06/msg007966.html
 > and
 > http://gnats.netbsd.org/39537
 > >How-To-Repeat:
 > see avobe.
 > >Fix:
 > N/A
 > 
 > 

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.