From dev-return-25721-apmail-couchdb-dev-archive=couchdb.apache.org@couchdb.apache.org Wed Mar 13 08:04:14 2013 Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 19DD2ED1F for ; Wed, 13 Mar 2013 08:04:14 +0000 (UTC) Received: (qmail 70062 invoked by uid 500); 13 Mar 2013 08:04:13 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 69991 invoked by uid 500); 13 Mar 2013 08:04:13 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 69960 invoked by uid 99); 13 Mar 2013 08:04:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Mar 2013 08:04:13 +0000 Date: Wed, 13 Mar 2013 08:04:13 +0000 (UTC) From: "Dave Cottlehuber (JIRA)" To: dev@couchdb.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (COUCHDB-1699) C/C++ compiler detection MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COUCHDB-1699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dave Cottlehuber updated COUCHDB-1699: -------------------------------------- Description: Friend of mine was trying to build couchdb today and ran into a problem. [[[ checking jsapi.h usability... no checking jsapi.h presence... no checking for jsapi.h... no checking js/jsapi.h usability... no checking js/jsapi.h presence... no checking for js/jsapi.h... no configure.jm: error: Could not find the jsapi header. Are the Mozilla SpiderMonkey headers installed? ]]] But he clearly had Mozilla Spidermonkey installed: [[[ # locate jsapi.h /usr/include/jsapi.h /usr/include/js/jsapi.h /usr/include/xulrunner-sdk-1.9.2/jsapi.h ]]] He was stumped and asked me to take a look. I looked at the config.log and found: [[[ configure.jm:16700: checking jsapi.h usability configure.jm:16717: g++ -c -DXP_UNIX -I/usr/include/xulrunner-sdk-1.9.2 -I/usr/include/xulrunner-sdk-1.9.2/js -I/usr/include/xulrunner-sdk-1.9.2/mozjs -I/opt/local/include -I/usr/local/include -I/usr/include conftest.cpp >&5 ./configure.jm: line 16718: g++: command not found ]]] You're using AC_PROG_CXX in your configure.ac to find a C++ compiler. Unfortunately due to a bug (or misfeature) of autoconf if AC_PROG_CXX follows AC_PROG_CC then it won't fail if no C++ compiler is found. See: http://lists.gnu.org/archive/html/bug-autoconf/2010-05/msg00001.html Fortunately, it's relatively easy to work around this. You can simply test that the ac_ct_CXX shell variable is set after running AC_PROG_CXX. I've attached a patch that does so. Running configure on a system without a C++ compiler now results in the following: [[[ checking for g++... no checking for c++... no checking for gpp... no checking for aCC... no checking for CC... no checking for cxx... no checking for cc++... no checking for cl.exe... no checking for FCC... no checking for KCC... no checking for RCC... no checking for xlC_r... no checking for xlC... no checking whether we are using the GNU C++ compiler... no checking whether g++ accepts -g... no checking dependency style of g++... none checking that we found a C++ compiler... no configure: error: A C++ compiler is required. ]]] I'm not subscribed to your dev list so if you'd like to respond to me please CC me. Also my ASF username is breser an ICLA is already on file for me. added to master, should go to 1.3.x before closing. was: Friend of mine was trying to build couchdb today and ran into a problem. [[[ checking jsapi.h usability... no checking jsapi.h presence... no checking for jsapi.h... no checking js/jsapi.h usability... no checking js/jsapi.h presence... no checking for js/jsapi.h... no configure.jm: error: Could not find the jsapi header. Are the Mozilla SpiderMonkey headers installed? ]]] But he clearly had Mozilla Spidermonkey installed: [[[ # locate jsapi.h /usr/include/jsapi.h /usr/include/js/jsapi.h /usr/include/xulrunner-sdk-1.9.2/jsapi.h ]]] He was stumped and asked me to take a look. I looked at the config.log and found: [[[ configure.jm:16700: checking jsapi.h usability configure.jm:16717: g++ -c -DXP_UNIX -I/usr/include/xulrunner-sdk-1.9.2 -I/usr/include/xulrunner-sdk-1.9.2/js -I/usr/include/xulrunner-sdk-1.9.2/mozjs -I/opt/local/include -I/usr/local/include -I/usr/include conftest.cpp >&5 ./configure.jm: line 16718: g++: command not found ]]] You're using AC_PROG_CXX in your configure.ac to find a C++ compiler. Unfortunately due to a bug (or misfeature) of autoconf if AC_PROG_CXX follows AC_PROG_CC then it won't fail if no C++ compiler is found. See: http://lists.gnu.org/archive/html/bug-autoconf/2010-05/msg00001.html Fortunately, it's relatively easy to work around this. You can simply test that the ac_ct_CXX shell variable is set after running AC_PROG_CXX. I've attached a patch that does so. Running configure on a system without a C++ compiler now results in the following: [[[ checking for g++... no checking for c++... no checking for gpp... no checking for aCC... no checking for CC... no checking for cxx... no checking for cc++... no checking for cl.exe... no checking for FCC... no checking for KCC... no checking for RCC... no checking for xlC_r... no checking for xlC... no checking whether we are using the GNU C++ compiler... no checking whether g++ accepts -g... no checking dependency style of g++... none checking that we found a C++ compiler... no configure: error: A C++ compiler is required. ]]] I'm not subscribed to your dev list so if you'd like to respond to me please CC me. Also my ASF username is breser an ICLA is already on file for me. > C/C++ compiler detection > ------------------------ > > Key: COUCHDB-1699 > URL: https://issues.apache.org/jira/browse/COUCHDB-1699 > Project: CouchDB > Issue Type: Bug > Components: Build System > Reporter: Ben Reser > Assignee: Dave Cottlehuber > Attachments: couchdb-c++-configure.patch.txt > > > Friend of mine was trying to build couchdb today and ran into a problem. > [[[ > checking jsapi.h usability... no > checking jsapi.h presence... no > checking for jsapi.h... no > checking js/jsapi.h usability... no > checking js/jsapi.h presence... no > checking for js/jsapi.h... no > configure.jm: error: Could not find the jsapi header. > Are the Mozilla SpiderMonkey headers installed? > ]]] > But he clearly had Mozilla Spidermonkey installed: > [[[ > # locate jsapi.h > /usr/include/jsapi.h > /usr/include/js/jsapi.h > /usr/include/xulrunner-sdk-1.9.2/jsapi.h > ]]] > He was stumped and asked me to take a look. I looked at the > config.log and found: > [[[ > configure.jm:16700: checking jsapi.h usability > configure.jm:16717: g++ -c -DXP_UNIX > -I/usr/include/xulrunner-sdk-1.9.2 > -I/usr/include/xulrunner-sdk-1.9.2/js > -I/usr/include/xulrunner-sdk-1.9.2/mozjs -I/opt/local/include > -I/usr/local/include -I/usr/include conftest.cpp >&5 > ./configure.jm: line 16718: g++: command not found > ]]] > You're using AC_PROG_CXX in your configure.ac to find a C++ compiler. > Unfortunately due to a bug (or misfeature) of autoconf if AC_PROG_CXX > follows AC_PROG_CC then it won't fail if no C++ compiler is found. > See: > http://lists.gnu.org/archive/html/bug-autoconf/2010-05/msg00001.html > Fortunately, it's relatively easy to work around this. You can simply > test that the ac_ct_CXX shell variable is set after running > AC_PROG_CXX. I've attached a patch that does so. > Running configure on a system without a C++ compiler now results in > the following: > [[[ > checking for g++... no > checking for c++... no > checking for gpp... no > checking for aCC... no > checking for CC... no > checking for cxx... no > checking for cc++... no > checking for cl.exe... no > checking for FCC... no > checking for KCC... no > checking for RCC... no > checking for xlC_r... no > checking for xlC... no > checking whether we are using the GNU C++ compiler... no > checking whether g++ accepts -g... no > checking dependency style of g++... none > checking that we found a C++ compiler... no > configure: error: A C++ compiler is required. > ]]] > I'm not subscribed to your dev list so if you'd like to respond to me please CC me. Also my ASF username is breser an ICLA is already on file for me. > added to master, should go to 1.3.x before closing. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira