From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 404 invoked by alias); 3 Mar 2010 21:19:53 -0000 Received: (qmail 394 invoked by uid 22791); 3 Mar 2010 21:19:52 -0000 X-SWARE-Spam-Status: No, hits=-0.7 required=5.0 tests=AWL,BAYES_05,UNPARSEABLE_RELAY X-Spam-Check-By: sourceware.org Received: from mail.sci.utah.edu (HELO sci.utah.edu) (155.98.58.79) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 03 Mar 2010 21:19:47 +0000 Received: from dummy.name; Wed, 03 Mar 2010 14:19:45 -0700 Reply-To: tfogal@sci.utah.edu From: tom fogal To: gcc-help@gcc.gnu.org Subject: tr1::array with older (apple) gcc's Date: Wed, 03 Mar 2010 21:19:00 -0000 Message-ID: Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2010-03/txt/msg00053.txt.bz2 Hi, We're using tr1::array, but on Apple platforms we're getting an undefined reference to tr1::array::data. The default compiler on these systems is a (modified?) gcc version 4.0.1. I found bug 23081 [1], which implies that data() wasn't implemented until gcc 4.0.2 (argh, so close). Systems we care to support also ship gcc 4.2.1, but it appears they still ship the 4.0.0 headers with it! I get a ridiculous error when using that compiler: In file included from /usr/include/c++/4.0.0/bits/stl_algobase.h:64, from /usr/include/c++/4.0.0/vector:66, from Basics/Appendix.h:43, from Basics/Appendix.cpp:37: /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h:79: error: current namespace 'std' does not enclose strongly used namespace '__gnu_debug_def' Note the directories it finds the includes in; this is from an invocation of "g++-4.2". We've previously encountered some tr1 const correctness issues on this platform as well, but I could hack around that with some dirty casting. Is anyone out there using tr1 on apple platforms? It seems like we must be doing something wrong to hit so many problems. Thanks for any advice, -tom [1] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23081