NetBSD Problem Report #56178

From www@netbsd.org  Sat May 15 14:54:52 2021
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 D2CEB1A928C
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 15 May 2021 14:54:52 +0000 (UTC)
Message-Id: <20210515145451.D83EB1A928D@mollari.NetBSD.org>
Date: Sat, 15 May 2021 14:54:51 +0000 (UTC)
From: jjflxyz@gmail.com
Reply-To: jjflxyz@gmail.com
To: gnats-bugs@NetBSD.org
Subject: gdb fails to link when building with clang
X-Send-Pr-Version: www-1.0

>Number:         56178
>Category:       toolchain
>Synopsis:       gdb fails to link when building with clang
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat May 15 14:55:00 +0000 2021
>Originator:     Miko
>Release:        trunk
>Organization:
>Environment:
Linux zenorus 5.12.4-1-uwu #1 SMP PREEMPT Fri, 14 May 2021 12:29:03 +0000 x86_64 GNU/Linux
>Description:
Relevant error:
--- dependall-gpl3 ---
--- gdb ---
#      link  gdb/gdb
/drive2/obj/tooldir.Linux-5.12.4-1-uwu-x86_64/bin/x86_64--netbsd-clang++    --sysroot=/drive2/obj/destdir.amd64 -Wl,--warn-shared-textrel -Wl,-z,relro   -pie      -o gdb  gdb.o  -Wl,-rpath-link,/drive2/obj/destdir.amd64/lib  -L=/lib -L/drive2/obj/external/gpl3/gdb/lib/libgdb -lgdb -L/drive2/obj/external/gpl3/gdb/lib/libopcodes -lopcodes  -L/drive2/obj/external/gpl3/gdb/lib/libbfd -lbfd  -L/drive2/obj/external/gpl3/gdb/lib/libdecnumber -ldecnumber  -L/drive2/obj/external/gpl3/gdb/lib/libgdbsupport -lgdbsupport  -L/drive2/obj/external/gpl3/gdb/lib/libctf -lctf  -L/drive2/obj/external/gpl3/gdb/lib/libgnulib -lgnulib  -L/drive2/obj/external/gpl3/gdb/lib/libreadline -lreadline  -lterminfo  -L/drive2/obj/external/gpl3/gdb/lib/libiberty -liberty -lexpat -llzma -lz -lcurses -lintl -lm -lkvm -lutil -lpthread    
/drive2/obj/tooldir.Linux-5.12.4-1-uwu-x86_64/bin/x86_64--netbsd-ld: /drive2/obj/external/gpl3/gdb/lib/libgdb/libgdb.a(string_view-selftests.o): in function `std::__1::basic_filebuf<char, std::__1::char_traits<char> >::basic_filebuf()':
string_view-selftests.c:(.text._ZNSt3__113basic_filebufIcNS_11char_traitsIcEEEC2Ev[_ZNSt3__113basic_filebufIcNS_11char_traitsIcEEEC2Ev]+0x56): undefined reference to `std::__1::codecvt<char, char, int>::id'
/drive2/obj/tooldir.Linux-5.12.4-1-uwu-x86_64/bin/x86_64--netbsd-ld: string_view-selftests.c:(.text._ZNSt3__113basic_filebufIcNS_11char_traitsIcEEEC2Ev[_ZNSt3__113basic_filebufIcNS_11char_traitsIcEEEC2Ev]+0x86): undefined reference to `std::__1::codecvt<char, char, int>::id'
/drive2/obj/tooldir.Linux-5.12.4-1-uwu-x86_64/bin/x86_64--netbsd-ld: /drive2/obj/external/gpl3/gdb/lib/libgdb/libgdb.a(string_view-selftests.o): in function `std::__1::basic_filebuf<char, std::__1::char_traits<char> >::imbue(std::__1::locale const&)':
string_view-selftests.c:(.text._ZNSt3__113basic_filebufIcNS_11char_traitsIcEEE5imbueERKNS_6localeE[_ZNSt3__113basic_filebufIcNS_11char_traitsIcEEE5imbueERKNS_6localeE]+0x13): undefined reference to `std::__1::codecvt<char, char, int>::id'
x86_64--netbsd-clang: error: linker command failed with exit code 1 (use -v to see invocation)

>How-To-Repeat:
Build a release using build.sh with llvm enabled.
>Fix:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.