NetBSD Problem Report #48993

From www@NetBSD.org  Mon Jul 14 19:12:00 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 759BEA654A
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 14 Jul 2014 19:12:00 +0000 (UTC)
Message-Id: <20140714191158.CB8C3A655B@mollari.NetBSD.org>
Date: Mon, 14 Jul 2014 19:11:58 +0000 (UTC)
From: venture37@geeklan.co.uk
Reply-To: venture37@geeklan.co.uk
To: gnats-bugs@NetBSD.org
Subject: Unable to build tools for evbarm on OS X Mavericks
X-Send-Pr-Version: www-1.0

>Number:         48993
>Category:       toolchain
>Synopsis:       Unable to build tools for evbarm on OS X Mavericks
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 14 19:15:00 +0000 2014
>Last-Modified:  Thu Jan 14 05:05:00 +0000 2016
>Originator:     venture37
>Release:        -current
>Organization:
>Environment:
Darwin 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun  3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64
>Description:
Tools build fails on OS X 10.9.4 with Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.3.0
Thread model: posix


#   compile  elftosb/BootImageGenerator.lo
c++ -O -no-cpp-precomp -I/Users/someone/Sandbox/NetBSD/obj/tooldir.Darwin-13.3.0-x86_64/include/compat -I/Users/someone/Sandbox/NetBSD/src/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -I/Users/someone/Sandbox/NetBSD/src/external/bsd/elftosb/dist/common -I/Users/someone/Sandbox/NetBSD/src/external/bsd/elftosb/dist/elftosb2 -DLinux -I/Users/someone/Sandbox/NetBSD/src/external/bsd/elftosb/dist/common -I/Users/someone/Sandbox/NetBSD/src/external/bsd/elftosb/dist/elftosb2 -DLinux -c -o BootImageGenerator.lo.o    /Users/someone/Sandbox/NetBSD/src/external/bsd/elftosb/dist/elftosb2/BootImageGenerator.cpp
In file included from /Users/someone/Sandbox/NetBSD/src/external/bsd/elftosb/dist/elftosb2/BootImageGenerator.cpp:9:
In file included from /Users/someone/Sandbox/NetBSD/src/external/bsd/elftosb/dist/elftosb2/BootImageGenerator.h:10:
In file included from /Users/someone/Sandbox/NetBSD/src/external/bsd/elftosb/dist/common/OutputSection.h:10:
In file included from /Users/someone/Sandbox/NetBSD/src/external/bsd/elftosb/dist/common/Operation.h:10:
In file included from /Users/someone/Sandbox/NetBSD/src/external/bsd/elftosb/dist/common/stdafx.h:14:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iostream:40:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/istream:156:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/ostream:133:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/locale:3679:52: error: use of undeclared identifier 'NL_CAT_LOCALE'
    catalog __cat = (catalog)catopen(__nm.c_str(), NL_CAT_LOCALE);
                                                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/locale:3700:5: error: unknown type name 'nl_catd'
    nl_catd __cat = (nl_catd)__c;
    ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/locale:3700:22: error: use of undeclared identifier 'nl_catd'
    nl_catd __cat = (nl_catd)__c;
                     ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/locale:3716:5: error: unknown type name 'nl_catd'
    nl_catd __cat = (nl_catd)__c;
    ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/locale:3716:22: error: use of undeclared identifier 'nl_catd'
    nl_catd __cat = (nl_catd)__c;
                     ^
In file included from /Users/someone/Sandbox/NetBSD/src/external/bsd/elftosb/dist/elftosb2/BootImageGenerator.cpp:9:
In file included from /Users/someone/Sandbox/NetBSD/src/external/bsd/elftosb/dist/elftosb2/BootImageGenerator.h:10:
In file included from /Users/someone/Sandbox/NetBSD/src/external/bsd/elftosb/dist/common/OutputSection.h:10:
In file included from /Users/someone/Sandbox/NetBSD/src/external/bsd/elftosb/dist/common/Operation.h:12:
In file included from /Users/someone/Sandbox/NetBSD/src/external/bsd/elftosb/dist/common/DataSource.h:12:
/Users/someone/Sandbox/NetBSD/src/external/bsd/elftosb/dist/common/smart_ptr.h:69:4: warning: delete called on 'elftosb::OptionContext' that is abstract but has non-virtual
      destructor [-Wdelete-non-virtual-dtor]
                        delete _p;
                        ^
/Users/someone/Sandbox/NetBSD/src/external/bsd/elftosb/dist/common/OutputSection.h:24:29: note: in instantiation of member function
      'smart_ptr<elftosb::OptionContext>::safe_delete' requested here
        OutputSection() : m_id(0), m_options(0) {}
                                   ^
1 warning and 5 errors generated.

*** Failed target:  BootImageGenerator.lo
*** Failed command: c++ -O -no-cpp-precomp -I/Users/someone/Sandbox/NetBSD/obj/tooldir.Darwin-13.3.0-x86_64/include/compat -I/Users/someone/Sandbox/NetBSD/src/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -I/Users/someone/Sandbox/NetBSD/src/external/bsd/elftosb/dist/common -I/Users/someone/Sandbox/NetBSD/src/external/bsd/elftosb/dist/elftosb2 -DLinux -I/Users/someone/Sandbox/NetBSD/src/external/bsd/elftosb/dist/common -I/Users/someone/Sandbox/NetBSD/src/external/bsd/elftosb/dist/elftosb2 -DLinux -c -o BootImageGenerator.lo.o /Users/someone/Sandbox/NetBSD/src/external/bsd/elftosb/dist/elftosb2/BootImageGenerator.cpp
*** Error code 1

Stop.
nbmake[3]: stopped in /Users/someone/Sandbox/NetBSD/src/tools/elftosb

*** Failed target:  dependall
*** Failed command: cd "/Users/someone/Sandbox/NetBSD/src/tools/elftosb"; /Users/someone/Sandbox/NetBSD/obj/tooldir.Darwin-13.3.0-x86_64/bin/nbmake realall
*** Error code 1

Stop.
nbmake[2]: stopped in /Users/someone/Sandbox/NetBSD/src/tools/elftosb

*** Failed target:  dependall-elftosb
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this=""; real="/Users/someone/Sandbox/NetBSD/src/tools" ;; *) this="${dir}/"; real="/Users/someone/Sandbox/NetBSD/src/tools/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /Users/someone/Sandbox/NetBSD/obj/tooldir.Darwin-13.3.0-x86_64/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget elftosb dependall
*** Error code 1

Stop.
nbmake[1]: stopped in /Users/someone/Sandbox/NetBSD/src/tools

*** Failed target:  build_install
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this=""; real="/Users/someone/Sandbox/NetBSD/src/tools" ;; *) this="${dir}/"; real="/Users/someone/Sandbox/NetBSD/src/tools/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /Users/someone/Sandbox/NetBSD/obj/tooldir.Darwin-13.3.0-x86_64/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget . dependall-config dependall-groff dependall-mandoc dependall-elftosb dependall-mkubootimage
*** Error code 1

Stop.
nbmake: stopped in /Users/someone/Sandbox/NetBSD/src/tools

ERROR: Failed to make build_install in "tools"
*** BUILD ABORTED ***
>How-To-Repeat:
Attempting to build evbarm tools with
 ./build.sh -m evbarm -O /some/path/to/obj -U tools
>Fix:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: toolchain/48993: Unable to build tools for evbarm on OS X Mavericks
Date: Mon, 14 Jul 2014 21:24:10 +0200

 On Mon, Jul 14, 2014 at 07:15:00PM +0000, venture37@geeklan.co.uk wrote:
 > In file included from /Users/someone/Sandbox/NetBSD/src/external/bsd/elftosb/dist/common/stdafx.h:14:
 > In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iostream:40:
 > In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/istream:156:
 > In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/ostream:133:
 > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/locale:3679:52: error: use of undeclared identifier 'NL_CAT_LOCALE'
 >     catalog __cat = (catalog)catopen(__nm.c_str(), NL_CAT_LOCALE);

 Sounds like a bug in the OS X headers. The original include is just

 #include <iostream>

 which is supposed to be idempotent. Is there some preprocessor define getting
 in the way?

 Martin

From: venture37 <venture37@geeklan.co.uk>
To: gnats-bugs@NetBSD.org, toolchain-manager@netbsd.org, 
 gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Cc: 
Subject: Re: toolchain/48993: Unable to build tools for evbarm on OS X Mavericks
Date: Mon, 14 Jul 2014 20:31:55 +0100

 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1

 On 14/07/2014 20:25, Martin Husemann wrote:
 > Sounds like a bug in the OS X headers. The original include is
 > just
 > 
 > #include <iostream>
 > 
 > which is supposed to be idempotent. Is there some preprocessor
 > define getting in the way?
 > 
 > Martin

 Hi Martin,
 In terms of env, there's not much changed out of the box on my behalf,
 I can try using an alternative toolchain later tonight to see if that
 helps.

 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

 iQIcBAEBAgAGBQJTxDAqAAoJENE/+DdOy3tCs9MP/23BqyWzqK24QZlTq+eyNQ+8
 lIkAWlW5gfX28tuaZH9oMAqeInYoexJesJS51QfP/xzXkzKEEnAhfFBfE0VP9lnv
 HCvxokoSorcEOl20NcQT61ZL8t6kcpcmhwrlUr5OFcirzHLl902VtegBrBbdb5k/
 iuMoBU/pc49f/VNCM0LPL9c2P93N5TfpbY7ba0kf2ptJXGSg6jjCpUIOEjJ73Gqd
 YKlous7EEyme5XDsXjfsGjWKLgPpGqX55FDQG1U4nyMo3Qu4S3SfBTSwZ8L/D+Pu
 OibU1tEJCxCbhIYYAQq2udavdYUUpongNR9VmJWelLUsgJjo5z9kqj/5kWicUBrK
 sKfgj9dvQebey+24Mk8OOwVvvVcGzaAeJSskyhqge8QfzV3zbYCh+HiJFc9BYiZq
 b3MsKjPmVy9MieeaMzD8bBCFm2vWv5E+O364eBW/I0tKYpbVvDYJ5gLMdunpgogP
 XtrOeNehcNEaAePyieW0TkfEWI8sUWrWOvmDuk2Tp7Td6vADCYDu2RiOSj6L7hK1
 UHdnBw1ZKiMNVjWCuXl7nSYJujeXYksme9w8qN4Ikkfv0Mb/tg32fGJoaZ6P+HQD
 MS82VnhPJeYYDSlPiSK+TxL85kQZGaLWZD+rUFJO3LKpGbKIu6MYFkICtRzniPEV
 VBNXrXJcXYM8a7CLJ4S5
 =TANH
 -----END PGP SIGNATURE-----

From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: toolchain/48993: Unable to build tools for evbarm on OS X
 Mavericks
Date: Tue, 15 Jul 2014 00:00:05 +0200

 On Mon, Jul 14, 2014 at 07:25:01PM +0000, Martin Husemann wrote:
 >  > In file included from /Users/someone/Sandbox/NetBSD/src/external/bsd/elftosb/dist/common/stdafx.h:14:
 >  > In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iostream:40:
 >  > In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/istream:156:
 >  > In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/ostream:133:
 >  > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/locale:3679:52: error: use of undeclared identifier 'NL_CAT_LOCALE'
 >  >     catalog __cat = (catalog)catopen(__nm.c_str(), NL_CAT_LOCALE);
 >  
 >  Sounds like a bug in the OS X headers. The original include is just
 >  
 >  #include <iostream>
 >  
 >  which is supposed to be idempotent. Is there some preprocessor define getting
 >  in the way?

 The problem is our local override for nl_types.h interferes with the
 platform include from libc++. See the existing hack in
 src/tools/compat/nl_types.h for native builds.

 Joerg

From: Sevan Janiyan <venture37@geeklan.co.uk>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: toolchain/48993: Unable to build tools for evbarm on OS X
 Mavericks
Date: Thu, 14 Jan 2016 05:04:50 +0000

 This does not appear to be an issue on the latest version of OS X, El
 Capitan. I've managed to successfully build the NetBSD tools and built a
 kernel on OS X 10.11.2 and Apple LLVM version 7.0.2 (clang-700.1.81)


 Sevan

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.