Skip to content

configure fails clang++ required but not found. #6466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bruceiv opened this issue May 14, 2013 · 9 comments
Closed

configure fails clang++ required but not found. #6466

bruceiv opened this issue May 14, 2013 · 9 comments

Comments

@bruceiv
Copy link

bruceiv commented May 14, 2013

I've downloaded rust-0.6, and am attempting to install it on Ubuntu 13.04. Unlike in Issue 1774, I have installed clang (though not g++), and have set my CC and CXX environment variables appropriately, but the configure script fails with the message below:

checking tool compatibility... configure: error: g++|clang++|icc required but not found
configure: error: LLVM

full ,/configure output:

configure: looking for configure programs
configure: found cmp
configure: found mkdir
configure: found printf
configure: found cut
configure: found head
configure: found grep
configure: found xargs
configure: found cp
configure: found find
configure: found uname
configure: found date
configure: found tr
configure: found sed
configure: inspecting environment
configure: recreating config.tmp
configure: 
configure: processing /home/aaron/Downloads/rust-0.6/configure args
configure: 
configure: CFG_PREFIX           := /usr/local 
configure: CFG_LOCAL_RUST_ROOT  := /usr/local 
configure: CFG_LLVM_ROOT        :=  
configure: CFG_BUILD_TRIPLE     := x86_64-unknown-linux-gnu 
configure: CFG_HOST_TRIPLES     := x86_64-unknown-linux-gnu 
configure: CFG_TARGET_TRIPLES   := x86_64-unknown-linux-gnu 
configure: CFG_ANDROID_CROSS_PATH := /opt/ndk_standalone 
configure: CFG_MINGW32_CROSS_PATH :=  
configure: 
configure: validating /home/aaron/Downloads/rust-0.6/configure args
configure: 
configure: 
configure: looking for build programs
configure: 
configure: CFG_PERL             := /usr/bin/perl 
configure: CFG_CURL             := /usr/bin/curl (7.29.0)
configure: CFG_PYTHON           := /usr/bin/python2.7 
configure: CFG_GIT              := /usr/bin/git (1.8.1.2)
configure: git: no git directory. disabling submodules
configure: CFG_CLANG            := /usr/bin/clang++ (3.2-1~exp9ubuntu1)
configure: CFG_GCC              := /usr/bin/gcc (4.7.3-1ubuntu1))
configure: CFG_LD               := /usr/bin/ld (2.23.2)
configure: CFG_VALGRIND         :=  
configure: CFG_PERF             :=  
configure: CFG_ISCC             :=  
configure: CFG_LLNEXTGEN        :=  
configure: CFG_PANDOC           :=  
configure: CFG_PDFLATEX         :=  
configure: CFG_XETEX            :=  
configure: CFG_LUATEX           :=  
configure: CFG_NODE             :=  
configure: CFG_GDB              := /usr/bin/gdb (7.5.91.20130417-cvs-ubuntu)
configure: CFG_PAXCTL           :=  
configure: CFG_ZCAT             := /bin/zcat (1.5)
configure: 
configure: GRSecurity: no
configure: 
configure: 
configure: making directories
configure: 
configure: 
configure: configuring submodules
configure: 
configure: 
configure: looking at LLVM
configure: 
configure: configuring LLVM for x86_64-unknown-linux-gnu
configure: configuring LLVM with:
configure: --enable-targets=x86,x86_64,arm,mips --enable-optimized --disable-docs                    --enable-bindings=none --disable-threads                    --disable-pthreads --build=x86_64-unknown-linux-gnu                         --host=x86_64-unknown-linux-gnu --target=x86_64-unknown-linux-gnu
checking for x86_64-unknown-linux-gnu-clang... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking how to run the C preprocessor... gcc -E
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking type of operating system we're going to host on... Linux
checking type of operating system we're going to target... Linux
checking target architecture... x86_64
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking optimization flags... -O3
checking for BSD-compatible nm... /usr/bin/nm -B
checking for GNU make... make
checking whether ln -s works... yes
checking for cmp... /usr/bin/cmp
checking for cp... /bin/cp
checking for date... /bin/date
checking for find... /usr/bin/find
checking for grep... (cached) /bin/grep
checking for mkdir... /bin/mkdir
checking for mv... /bin/mv
checking for x86_64-unknown-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking for x86_64-unknown-linux-gnu-ar... no
checking for ar... ar
checking for rm... /bin/rm
checking for sed... /bin/sed
checking for tar... /bin/tar
checking for pwd... /bin/pwd
checking for Graphviz... echo Graphviz
checking for dot... echo dot
checking for fdp... echo fdp
checking for neato... echo neato
checking for twopi... echo twopi
checking for circo... echo circo
checking for gv... no
checking for gsview32... no
checking for dotty... echo dotty
checking for xdot.py... echo xdot.py
checking for a BSD-compatible install... /usr/bin/install -c
checking for bzip2... /bin/bzip2
checking for cat... /bin/cat
checking for doxygen... no
checking for groff... /usr/bin/groff
checking for gzip... /bin/gzip
checking for pdfroff... no
checking for zip... /usr/bin/zip
checking for ocamlc... no
checking for ocamlopt... no
checking for ocamldep... no
checking for ocamldoc... no
checking for gas... no
checking for as... /usr/bin/as
checking for linker version... 2.23.2
checking for compiler -Wl,-R<path> option... yes
checking for compiler -Wl,-export-dynamic option... yes
checking for compiler -Wl,--version-script option... yes
checking for an ANSI C-conforming const... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking which extension is used for loadable modules... .so
checking which variable specifies run-time library path... LD_LIBRARY_PATH
checking for the default library search path... /lib /usr/lib /usr/local/lib /lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/mesa-egl /usr/lib/x86_64-linux-gnu/mesa 
checking for objdir... .libs
checking command to parse /usr/bin/nm -B output from  object... ok
checking whether libtool supports -dlopen/-dlpreopen... yes
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen in -ldl... yes
checking for dlerror... yes
checking for _ prefix in compiled symbols... no
checking whether deplibs are loaded by dlopen... yes
checking argz.h usability... yes
checking argz.h presence... yes
checking for argz.h... yes
checking for error_t... yes
checking for argz_append... yes
checking for argz_create_sep... yes
checking for argz_insert... yes
checking for argz_next... yes
checking for argz_stringify... yes
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for memory.h... (cached) yes
checking for stdlib.h... (cached) yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for unistd.h... (cached) yes
checking dl.h usability... no
checking dl.h presence... no
checking for dl.h... no
checking sys/dl.h usability... no
checking sys/dl.h presence... no
checking for sys/dl.h... no
checking dld.h usability... no
checking dld.h presence... no
checking for dld.h... no
checking mach-o/dyld.h usability... no
checking mach-o/dyld.h presence... no
checking for mach-o/dyld.h... no
checking for string.h... (cached) yes
checking for strchr... yes
checking for strrchr... yes
checking for memcpy... yes
checking for memmove... yes
checking for strcmp... yes
checking for closedir... yes
checking for opendir... yes
checking for readdir... yes
checking tool compatibility... configure: error: g++|clang++|icc required but not found
configure: error: LLVM

misc system details:

% whereis clang++
clang++: /usr/bin/clang++ /usr/bin/X11/clang++ /usr/share/man/man1/clang++.1.gz
% clang++ --version
Ubuntu clang version 3.2-1~exp9ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
Target: x86_64-pc-linux-gnu
Thread model: posix
% echo $CC $CXX    
/usr/bin/clang /usr/bin/clang++
@bruceiv
Copy link
Author

bruceiv commented May 14, 2013

For the record, it seems to work once I also install g++ - I still think that there's something broken in the LLVM bit of the configure script, but installing g++ seems to be a viable workaround.

@jbaldwin
Copy link

I just ran into the same issue while building 0.7. Installed clang and made sure it was available but the exact same error message appeared. I installed g++ as @bruceiv suggested and then it worked.

@emberian
Copy link
Member

see also #6310

@mkpankov
Copy link
Contributor

For 0.8, the following works without g++:
./configure --enable-clang

@user454322
Copy link

Same with 0.9 in my Ubuntu 13.04, ./configure --enable-clang did the trick

@darnuria
Copy link
Contributor

With rust 0.10pre :

I got the same on debian whezzy stable.

And moreover --enable-clang did not make the trick...
Whops! I had installed g++-4.7 but not g++ umbrella tool... ><

Work fine with g++ package installed.

@pnkfelix
Copy link
Member

pnkfelix commented May 2, 2014

The LLVM configure script is strange, it has this code:

if test "$GXX" != "yes" && test "$IXX" != "yes"
then
  { { echo "$as_me:$LINENO: error: g++|clang++|icc required but not found" >&5
echo "$as_me: error: g++|clang++|icc required but not found" >&2;}
   { (exit 1); exit 1; }; }
fi

Why is it only checking the variables GXX and IXX? Is one of those implicitly set to yes for clang++ as well? Very odd.

Well, I am hoping that my changes for #13823 will help sidestep some of these issues, but it is not certain.

@frewsxcv
Copy link
Member

frewsxcv commented Feb 2, 2015

Not much has happened since #13823 was merged. This can probably be closed. No news is good news, right?

@steveklabnik
Copy link
Member

Agreed. Please let me know if you can reproduce this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants