[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [creduce-dev] Close to New C-Reduce Release



John Regehr <regehr@cs.utah.edu> writes:

> Current C-Reduce works just fine on OS X but I have three things that we
> should fix:
>
> "configure" fails for me on Ubuntu 14.04, see the relevant part of config.log
> below.  I don't understand why autoconf is invoking g++ when ostensibly
> attempting to check if it can compile/link with LLVM.

tl;dr You need to set CXX at configure time.

The test should use whatever C++ compiler you've specified for building
C-Reduce.  If you haven't specified one, Autoconf's default is g++.

So, for example, from one of my logs today...

$ CXX=/usr/lib/llvm-3.7/bin/clang++ ./configure --with-llvm=/usr/lib/llvm-3.7

In config.log:

configure:15933: checking can compile with and link with LLVM(engine)
configure:15959: /usr/lib/llvm-3.7/bin/clang++ -o conftest -g -O2  -I/usr/lib/l\
lvm-3.7/include  -DNDEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMA\
T_MACROS -D__STDC_LIMIT_MACROS -g -O2 -fomit-frame-pointer -std=c++11 -fvisibil\
ity-inlines-hidden -fno-exceptions -fPIC -ffunction-sections -fdata-sections -W\
cast-qual  conftest.cpp  -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86Code\
Gen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMCodeGen -lLLVMScalarOpts -lLLVMPr\
ofileData -lLLVMInstCombine -lLLVMInstrumentation -lLLVMTransformUtils -lLLVMip\
a -lLLVMX86Desc -lLLVMMCDisassembler -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX8\
6Utils -lLLVMMCJIT -lLLVMExecutionEngine -lLLVMTarget -lLLVMAnalysis -lLLVMRunt\
imeDyld -lLLVMObject -lLLVMMCParser -lLLVMBitReader -lLLVMMC -lLLVMCore -lLLVMS\
upport -L/usr/lib/llvm-3.7/lib  -lz -lpthread -lffi -ledit -ltinfo -ldl -lm  >&\
5

I would tend to believe that the failure you saw is correct behavior for the
test, since the test models how we are going to try to build things later on
(splatting in LLVM's compilation options, etc.).

We could conceivably change the default for CXX.  That isn't guaranteed to work
either, but perhaps it is less likely to fail.  I'll give this some thought,
but it seems to me like something we would want to change after the release,
not before, since the current behavior of CXX is long-standing and "standard"
for Autoconf'ed projects.

Eric.

-- 
-------------------------------------------------------------------------------
Eric Eide <eeide@cs.utah.edu>  .         University of Utah School of Computing
http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX