From nobody@FreeBSD.org  Sat Feb  2 09:04:05 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	by hub.freebsd.org (Postfix) with ESMTP id BF527D27
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  2 Feb 2013 09:04:05 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id AF7EF715
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  2 Feb 2013 09:04:05 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r12945R5044322
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 2 Feb 2013 09:04:05 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id r129453N044321;
	Sat, 2 Feb 2013 09:04:05 GMT
	(envelope-from nobody)
Message-Id: <201302020904.r129453N044321@red.freebsd.org>
Date: Sat, 2 Feb 2013 09:04:05 GMT
From: "O. Hartmann" <ohartman@zedat.fu-berlin.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: /usr/obj/usr/src/tmp/usr/lib/libc++.so: undefined reference to `std::bad_alloc::~bad_alloc()'
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         175778
>Category:       kern
>Synopsis:       /usr/obj/usr/src/tmp/usr/lib/libc++.so: undefined reference to `std::bad_alloc::~bad_alloc()'
>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:   Sat Feb 02 09:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     O. Hartmann
>Release:        FreeBSD 10-CURRENT/amd64
>Organization:
FU Berlin
>Environment:
>Description:
Compiling world with option

-stdlib=libc++ -std=c++11

or even only

-stdlib=libc++

fails building world with the below shown error message.

Obviously, libc++ is broken.

Avoiding the option -stdlib=libc++

makes buildworld run cleanly thriugh everything.


[...]
===> libexec/atf/atf-check (all)
c++ -O2 -pipe -O3 -march=native -DHAVE_CONFIG_H -O3 -march=native -pipe -I/usr/src/libexec/atf/atf-check/../../../contrib/atf -Qunused-arguments -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wpointer-arith -Wno-uninitialized -Wno-empty-body -Wno-string-plus-int -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-conversion -stdlib=libc++ -std=c++11 -c /usr/src/libexec/atf/atf-check/../../../contrib/atf/atf-sh/atf-check.cpp
c++ -O2 -pipe -O3 -march=native -DHAVE_CONFIG_H -O3 -march=native -pipe -I/usr/src/libexec/atf/atf-check/../../../contrib/atf -Qunused-arguments -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wpointer-arith -Wno-uninitialized -Wno-empty-body -Wno-string-plus-int -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-conversion -stdlib=libc++ -std=c++11  -L/usr/obj/usr/src/libexec/atf/atf-check/../../../lib/atf/libatf-c++ -L/usr/obj/usr/src/libexec/atf/atf-check/../../../lib/atf/libatf-c -o atf-check atf-check.o -latf-c++ -latf-c
/usr/obj/usr/src/tmp/usr/lib/libc++.so: undefined reference to `std::bad_alloc::~bad_alloc()'
/usr/obj/usr/src/libexec/atf/atf-check/../../../lib/atf/libatf-c++/libatf-c++.so: undefined reference to `std::bad_alloc::bad_alloc()'
/usr/obj/usr/src/libexec/atf/atf-check/../../../lib/atf/libatf-c++/libatf-c++.so: undefined reference to `std::bad_alloc::~bad_alloc()'
/usr/obj/usr/src/tmp/usr/lib/libc++.so: undefined reference to `std::bad_alloc::bad_alloc()'
c++: error: linker command failed with exit code 1 (use -v to see invocation)
*** [atf-check] Error code 1

Stop in /usr/src/libexec/atf/atf-check.
*** [all] Error code 1

Stop in /usr/src/libexec/atf.
*** [all] Error code 1

Stop in /usr/src/libexec.
*** [libexec.all__D] Error code 1

Stop in /usr/src.
*** [everything] Error code 1

Stop in /usr/src.
*** [buildworld] Error code 1

Stop in /usr/src.

>How-To-Repeat:
Build world with CXXFLAGS+= -stdlib=libc++ and WITH_LIBCPLUSPLUS=YES set in /etc/src.conf or /etc/make.conf
>Fix:
Avoid the build with -stdlib=libc++

>Release-Note:
>Audit-Trail:
>Unformatted:
