From stdcxx-dev-return-3080-apmail-incubator-stdcxx-dev-archive=incubator.apache.org@incubator.apache.org Thu Mar 29 21:48:48 2007 Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 74158 invoked from network); 29 Mar 2007 21:48:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Mar 2007 21:48:47 -0000 Received: (qmail 26746 invoked by uid 500); 29 Mar 2007 21:48:54 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 26642 invoked by uid 500); 29 Mar 2007 21:48:54 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 26547 invoked by uid 99); 29 Mar 2007 21:48:53 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Mar 2007 14:48:53 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Mar 2007 14:48:45 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 31FCD714066 for ; Thu, 29 Mar 2007 14:48:25 -0700 (PDT) Message-ID: <17581020.1175204905184.JavaMail.jira@brutus> Date: Thu, 29 Mar 2007 14:48:25 -0700 (PDT) From: "Martin Sebor (JIRA)" To: stdcxx-dev@incubator.apache.org Subject: [jira] Created: (STDCXX-377) [HP aCC +nostl] libc headers not in preprocessor search path MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [HP aCC +nostl] libc headers not in preprocessor search path ------------------------------------------------------------ Key: STDCXX-377 URL: https://issues.apache.org/jira/browse/STDCXX-377 Project: C++ Standard Library Issue Type: Bug Components: External Environment: HP aCC +nostl Reporter: Martin Sebor Priority: Critical In order to make it possible to link with third party implementations of the C++ Standard Library (such as stdcxx) the HP aCC +nostl option removes -lstd_v2, the HP aCC C++ standard library from the linker line. See http://www.docs.hp.com/en/7762/5991-4874/options.htm#opt+nostl The option also removes the directories containing the native C++ Standard Library headers from the compiler command line, presumably so as to prevent collisions between them and those provided by third party implementations of the same. However, the option also removes all other -I options from the compiler command line, including /usr/include, making it impossible for the preprocessor to find even libc or system headers. Add -I/usr/include is the only way to deal with it but doing so is typically frowned upon by compiler vendors, including HP. In addition, some of the HP libc headers in /usr/include make heavy use of preprocessor logic to disable the declarations of C functions that C++ replaces with its own, such as memchr() et al, making it even more difficult to use these headers. $ cat t.cpp && aCC -AA +nostl -V t.cpp || aCC -AA +nostl -I/usr/include t.cpp #include int main () { memchr ("", 0, 0); strchr ("", 0); strpbrk ("", ""); strrchr ("", 0); strstr ("", ""); } aCC: HP ANSI C++ B3910B A.03.73 Error 112: "t.cpp", line 1 # Include file not found. #include ^^^^^^^^^ Error 328: "t.cpp", line 5 # Function 'memchr' has not been defined yet; cannot call. memchr ("", 0, 0); ^^^^^^ Error 328: "t.cpp", line 6 # Function 'strchr' has not been defined yet; cannot call. strchr ("", 0); ^^^^^^ Error 328: "t.cpp", line 7 # Function 'strpbrk' has not been defined yet; cannot call. strpbrk ("", ""); ^^^^^^^ Error 328: "t.cpp", line 8 # Function 'strrchr' has not been defined yet; cannot call. strrchr ("", 0); ^^^^^^^ Error 328: "t.cpp", line 9 # Function 'strstr' has not been defined yet; cannot call. strstr ("", ""); ^^^^^^ Error 112: "t.cpp", line 1 # Include file not found. #include ^^^^^^^^^ Error 328: "t.cpp", line 5 # Function 'memchr' has not been defined yet; cannot call. memchr ("", 0, 0); ^^^^^^ Error 328: "t.cpp", line 6 # Function 'strchr' has not been defined yet; cannot call. strchr ("", 0); ^^^^^^ Error 328: "t.cpp", line 7 # Function 'strpbrk' has not been defined yet; cannot call. strpbrk ("", ""); ^^^^^^^ Error 328: "t.cpp", line 8 # Function 'strrchr' has not been defined yet; cannot call. strrchr ("", 0); ^^^^^^^ Error 328: "t.cpp", line 9 # Function 'strstr' has not been defined yet; cannot call. strstr ("", ""); ^^^^^^ -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.