NetBSD Problem Report #57321

From www@netbsd.org  Mon Apr  3 22:58:17 2023
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id C68B01A9239
	for <gnats-bugs@gnats.NetBSD.org>; Mon,  3 Apr 2023 22:58:16 +0000 (UTC)
Message-Id: <20230403225815.B51261A923A@mollari.NetBSD.org>
Date: Mon,  3 Apr 2023 22:58:15 +0000 (UTC)
From: jspath55@gmail.com
Reply-To: jspath55@gmail.com
To: gnats-bugs@NetBSD.org
Subject: ATF test case usr.bin/cc/t_hello:hello_profile fails on RPI02W/evbarm only
X-Send-Pr-Version: www-1.0

>Number:         57321
>Category:       toolchain
>Synopsis:       ATF test case usr.bin/cc/t_hello:hello_profile fails on RPI02W/evbarm only
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 03 23:00:01 +0000 2023
>Last-Modified:  Tue Apr 04 00:20:01 +0000 2023
>Originator:     Jim Spath
>Release:        10.0_BETA
>Organization:
>Environment:
NetBSD apie 10.0_BETA NetBSD 10.0_BETA (GENERIC) #0: Fri Jan 13 19:15:32 UTC 2023  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/evbarm/compile/GENERIC evbarm

>Description:
Automated test framework test case hello_profile failed on a Raspberry Pi Zero 2W. The other tests passed, and this case passes on other architectures I have tried.

tc-end: 1680560733.140145, hello_profile, failed, atf-check failed; see the output of the test for details
tp-end: 1680560733.159462, usr.bin/cc/t_hello


CC version:

$ cc --version
cc (nb1 20220722) 10.4.0

>How-To-Repeat:
$ atf-run usr.bin/cc/t_hello:hello_profile

Results on failing system:

tp-start: 1680560730.920274, usr.bin/cc/t_hello, 1
tc-start: 1680560730.920346, hello_profile
tc-so:Executing command [ cc -static -o hello -pg test.c ]
tc-se:Fail: incorrect exit status: 1, expected: 0
tc-se:stdout:
tc-se:
tc-se:stderr:
tc-se:ld: /tmp//ccMzpBuD.o: in function `main':
tc-se:test.c:(.text+0xc): undefined reference to `__gnu_mcount_nc'
tc-se:ld: /usr/lib/libc_p.a(initfini.po): in function `_dlauxinfo':
tc-se:initfini.c:(.text+0x4): undefined reference to `__gnu_mcount_nc'
tc-se:ld: /usr/lib/libc_p.a(initfini.po): in function `_libc_init':
tc-se:initfini.c:(.text.startup+0x8): undefined reference to `__gnu_mcount_nc'
tc-se:ld: /usr/lib/libc_p.a(atomic_init_cas.po): in function `__libc_atomic_init':
tc-se:atomic_init_cas.c:(.text.startup+0x4): undefined reference to `__gnu_mcount_nc'
tc-se:ld: /usr/lib/libc_p.a(tls.po): in function `_rtld_tls_allocate':
tc-se:tls.c:(.text+0xc): undefined reference to `__gnu_mcount_nc'
tc-se:ld: /usr/lib/libc_p.a(tls.po):tls.c:(.text+0xcc): more undefined references to `__gnu_mcount_nc' follow
tc-se:
tc-end: 1680560733.140145, hello_profile, failed, atf-check failed; see the output of the test for details
tp-end: 1680560733.159462, usr.bin/cc/t_hello
info: time.end, Mon Apr 3 22:25:33 UTC 2023


Using the cc command line "cc -o testcase_pg -pg  testcase.c" generates errors outside the test framework with the same hello.c code.

$ cc -o testcase_pg -pg  testcase.c
ld: /tmp//ccxyF2mE.o: in function `main':
testcase.c:(.text+0xc): undefined reference to `__gnu_mcount_nc'
ld: /usr/lib/libc_p.a(initfini.po): in function `_dlauxinfo':
initfini.c:(.text+0x4): undefined reference to `__gnu_mcount_nc'
ld: /usr/lib/libc_p.a(initfini.po): in function `_libc_init':
initfini.c:(.text.startup+0x8): undefined reference to `__gnu_mcount_nc'
ld: /usr/lib/libc_p.a(atomic_init_cas.po): in function `__libc_atomic_init':
atomic_init_cas.c:(.text.startup+0x4): undefined reference to `__gnu_mcount_nc'
ld: /usr/lib/libc_p.a(tls.po): in function `_rtld_tls_allocate':
tls.c:(.text+0xc): undefined reference to `__gnu_mcount_nc'
ld: /usr/lib/libc_p.a(tls.po):tls.c:(.text+0xcc): more undefined references to `__gnu_mcount_nc' follow






>Fix:
Unknown.

>Audit-Trail:
From: Jim Spath <jspath55@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: toolchain/57321
Date: Mon, 3 Apr 2023 20:15:47 -0400

 In addition to the reported case, these c++ tests appear related since
 they fail with similar error messages.

     usr.bin/c++/t_call_once:call_once_pic_profile
     usr.bin/c++/t_call_once:call_once_profile
     usr.bin/c++/t_call_once2:call_once2_static
     usr.bin/c++/t_cxxruntime:cxxruntime_pic_profile
     usr.bin/c++/t_cxxruntime:cxxruntime_profile
     usr.bin/c++/t_hello:hello_pic_profile
     usr.bin/c++/t_hello:hello_profile
     usr.bin/c++/t_pthread_once:pthread_once_pic_profile
     usr.bin/c++/t_pthread_once:pthread_once_profile
     usr.bin/c++/t_static_destructor:static_destructor_pic_profile
     usr.bin/c++/t_static_destructor:static_destructor_profile

 The failures were on Pi02W.

 [...]
 tp-start: 1680567184.485467, ./usr.bin/c++/t_static_destructor, 1
 tc-start: 1680567184.485537, static_destructor_profile
 tc-so:Executing command [ c++ -static -pg -o hello test.cpp ]
 tc-se:Fail: incorrect exit status: 1, expected: 0
 tc-se:stdout:
 tc-se:
 tc-se:stderr:
 tc-se:ld: /tmp//cckFfFOi.o: in function `__gthread_trigger()':
 tc-se:test.cpp:(.text+0xc): undefined reference to `__gnu_mcount_nc'
 tc-se:ld: /tmp//cckFfFOi.o: in function `main':
 tc-se:test.cpp:(.text+0x40): undefined reference to `__gnu_mcount_nc'
 tc-se:ld: /tmp//cckFfFOi.o: in function
 `__static_initialization_and_destruction_0(int, int)':
 tc-se:test.cpp:(.text+0x80): undefined reference to `__gnu_mcount_nc'
 tc-se:ld: /tmp//cckFfFOi.o: in function `_GLOBAL__sub_I_main':
 tc-se:test.cpp:(.text+0xe8): undefined reference to `__gnu_mcount_nc'
 tc-se:ld: /tmp//cckFfFOi.o: in function `A::A(int)':
 tc-se:test.cpp:(.text._ZN1AC2Ei[_ZN1AC5Ei]+0x10): undefined reference
 to `__gnu_mcount_nc'
 tc-se:ld: /tmp//cckFfFOi.o:test.cpp:(.text._ZN1AD2Ev[_ZN1AD5Ev]+0x10):
 more undefined references to `__gnu_mcount_nc' follow
 tc-se:
 tc-end: 1680567188.824901, static_destructor_profile, failed,
 atf-check failed; see the output of the test for details
 tp-end: 1680567188.878218, ./usr.bin/c++/t_static_destructor
 info: time.end, Tue Apr 4 00:13:08 UTC 2023

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.