couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Reser (JIRA)" <>
Subject [jira] [Updated] (COUCHDB-1699) C/C++ compiler detection
Date Tue, 19 Mar 2013 20:11:15 GMT


Ben Reser updated COUCHDB-1699:

    Attachment: couchdb-c++-configure-v2.patch.txt

This patch on top of the old patch should fix the problem.  Using --host and --build avoids
setting ac_ct_CXX so we have to actually build something to find out if we have a working
C++ compiler.  This patch does the extra work of actually trying to build and link a tiny
> C/C++ compiler detection
> ------------------------
>                 Key: COUCHDB-1699
>                 URL:
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Build System
>            Reporter: Ben Reser
>            Assignee: Dave Cottlehuber
>            Priority: Blocker
>             Fix For: 1.3
>         Attachments: couchdb-c++-configure.patch.txt, couchdb-c++-configure-v2.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
> 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:
> [[[
> checking jsapi.h usability
> 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
> ./ line 16718: g++: command not found
> ]]]
> You're using AC_PROG_CXX in your 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:
> 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:

View raw message