[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [creduce-dev] Close to New C-Reduce Release
Eric, I was trying to build C-Reduce using g++ and it failed. This
can't be correct behavior. This has always worked in the past.
On 9/22/15 8:55 PM, Eric Eide wrote:
John Regehr <email@example.com> writes:
Current C-Reduce works just fine on OS X but I have three things that we
"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
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 >&\
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.