allscale / allscale_compiler

The AllScale Compiler providing a high-performance, portable implementation of the AllScale API
5 stars 1 forks source link

Compilation failed #1

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hi All,

I got this issue while compiling on Ubuntu 16.04 following quick-start instructions. I put everything in the script "install_allscale_compiler.sh" (se below), prerequisites were installed beforehand. I cannot find a log file as well, neither inside "allscale_compiler" nor inside "insieme-libs" folder.

#!/bin/bash export INSIEME_LIBS_HOME="$HOME/insieme-libs" git clone --recursive https://github.com/allscale/allscale_compiler cd allscale_compiler cd insieme/scripts/dependencies PREFIX="$INSIEME_LIBS_HOME" ./installer cd ../../.. mkdir build cd build $INSIEME_LIBS_HOME/cmake-latest/bin/cmake -DCMAKE_BUILD_TYPE=RelWithAsserts .. make -j3 $INSIEME_LIBS_HOME/cmake-latest/bin/ctest -j3

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// THE OUTPUT of the script: ..............................

Downloading llvm-3.6.2

--2017-03-24 12:14:01-- http://www.insieme-compiler.org/ext_libs/llvm-3.6.2.src.tar.xz Resolving www.insieme-compiler.org (www.insieme-compiler.org)... 138.232.66.164 Connecting to www.insieme-compiler.org (www.insieme-compiler.org)|138.232.66.164|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 12802380 (12M) [application/x-xz] Saving to: ‘llvm-3.6.2.src.tar.xz’

llvm-3.6.2.src.tar.xz 100%[======================================================================================================================>] 12.21M 1.60MB/s in 7.7s

2017-03-24 12:14:09 (1.59 MB/s) - ‘llvm-3.6.2.src.tar.xz’ saved [12802380/12802380]

llvm-3.6.2.src.tar.xz: OK --2017-03-24 12:14:09-- http://www.insieme-compiler.org/ext_libs/cfe-3.6.2.src.tar.xz Resolving www.insieme-compiler.org (www.insieme-compiler.org)... 138.232.66.164 Connecting to www.insieme-compiler.org (www.insieme-compiler.org)|138.232.66.164|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 8617576 (8.2M) [application/x-xz] Saving to: ‘cfe-3.6.2.src.tar.xz’

cfe-3.6.2.src.tar.xz 100%[======================================================================================================================>] 8.22M 1.58MB/s in 5.2s

2017-03-24 12:14:15 (1.57 MB/s) - ‘cfe-3.6.2.src.tar.xz’ saved [8617576/8617576]

cfe-3.6.2.src.tar.xz: OK

Extracting llvm-3.6.2

/tmp/tmp.2flLdKD2mB/llvm-3.6.2 /tmp/tmp.2flLdKD2mB ~/work/allscale_compiler/insieme/scripts/dependencies

Preparing llvm-3.6.2

patching file configure patching file tools/clang/include/clang/Basic/IdentifierTable.h patching file tools/clang/include/clang/Parse/Parser.h patching file tools/clang/include/clang/Sema/Sema.h patching file tools/clang/lib/Parse/ParsePragma.cpp

Configuring llvm-3.6.2

checking for clang... clang checking for C compiler default output file name... configure: error: C compiler cannot create executables See `config.log' for more details. install_allscale_compiler.sh: line 10: /home/albert/insieme-libs/cmake-latest/bin/cmake: No such file or directory make: *** No targets specified and no makefile found. Stop. install_allscale_compiler.sh: line 12: /home/albert/insieme-libs/cmake-latest/bin/ctest: No such file or directory

philippgs commented 7 years ago

The error suggests that the installation routine of llvm cannot find a valid C compiler. Did you install the build-essential package group as suggested in the quickstart guide? You can look for config.log in /tmp/..., as the installer creates (uniquely-named) working directories there for compiling dependencies before installing them to $PREFIX.

ghost commented 7 years ago

Hi Philipp, Of course I have all the dependencies installed as suggested. In addition, there are llvm/clang-3.8 installed from the regular Ubuntu 16.04 repo. Could it make a mess considering that AllScale tries to build the older version 3.6?

I tried today several combinations, all unsucessfully. One of them sets the environmental variables to avoid any interaction with my local libraries, here is the bash script: $ cat install_allscale_compiler.sh

!/bin/bash

export CPATH= export C_INCLUDE_PATH= export CPLUS_INCLUDE_PATH= export LIBRARY_PATH= export LD_LIBRARY_PATH= export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin export SOFT=

export INSIEME_LIBS_HOME="$HOME/insieme-libs" git clone --recursive https://github.com/allscale/allscale_compiler cd allscale_compiler cd insieme/scripts/dependencies PREFIX="$INSIEME_LIBS_HOME" ./installer cd ../../.. mkdir build cd build $INSIEME_LIBS_HOME/cmake-latest/bin/cmake -DCMAKE_BUILD_TYPE=RelWithAsserts .. make -j3 $INSIEME_LIBS_HOME/cmake-latest/bin/ctest -j3

The script sets pristine environmental variables, otherwise the installer could search my local library folders in ${SOFT}.

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// $ cat config.log This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake.

It was created by LLVM configure 3.6.2, which was generated by GNU Autoconf 2.60. Invocation command line was

$ ./configure --prefix=/home/albert/insieme-libs/llvm-3.6.2 --enable-assert=yes --enable-debug-runtime=no --enable-debug-symbols=no --enable-optimized=yes --enable-shared=yes --enable-bindings=none --with-python=/home/albert/insieme-libs/python-latest/bin/python

---------

Platform.

---------

hostname = kronos uname -m = x86_64 uname -r = 4.4.0-66-generic uname -s = Linux uname -v = #87-Ubuntu SMP Fri Mar 3 15:29:05 UTC 2017

/usr/bin/uname -p = unknown /bin/uname -X = unknown

/bin/arch = unknown /usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown /usr/bin/hostinfo = unknown /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown

PATH: /usr/local/sbin PATH: /usr/local/bin PATH: /usr/sbin PATH: /usr/bin PATH: /sbin PATH: /bin

-----------

Core tests.

-----------

configure:2059: checking for clang configure:2075: found /usr/bin/clang configure:2086: result: clang configure:2122: checking for C compiler version configure:2129: clang --version >&5 clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final) Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin configure:2132: $? = 0 configure:2139: clang -v >&5 clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final) Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/5.4.1 Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/6.2.0 Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8 Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8.5 Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9 Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9.4 Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.1 Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6.2.0 Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.4.1 Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6.2.0 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.5 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.4 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.1 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.2.0 Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.1 Candidate multilib: .;@m64 Candidate multilib: 32;@m32 Candidate multilib: x32;@mx32 Selected multilib: .;@m64 configure:2142: $? = 0 configure:2149: clang -V >&5 clang: error: argument to '-V' is missing (expected 1 value) clang: error: no input files configure:2152: $? = 1 configure:2175: checking for C compiler default output file name configure:2202: clang -O3 -std=c++0x conftest.c >&5 error: invalid argument '-std=c++0x' not allowed with 'C/ObjC' configure:2205: $? = 1 configure: failed program was: / confdefs.h. / #define PACKAGE_NAME "LLVM" #define PACKAGE_TARNAME "llvm" #define PACKAGE_VERSION "3.6.2" #define PACKAGE_STRING "LLVM 3.6.2" #define PACKAGE_BUGREPORT "http://llvm.org/bugs/" #define LLVM_VERSION_MAJOR 3 #define LLVM_VERSION_MINOR 6 #define LLVM_VERSION_PATCH 2 #define LLVM_VERSION_STRING "3.6.2" / end confdefs.h. /
int
main ()
{
;
return 0;
}

configure:2244: error: C compiler cannot create executables See `config.log' for more details.

----------------

Cache variables.

----------------

ac_cv_env_CCC_set= ac_cv_env_CCC_value= ac_cv_env_CC_set= ac_cv_env_CC_value= ac_cv_env_CFLAGS_set=set ac_cv_env_CFLAGS_value='-O3 -std=c++0x' ac_cv_env_CPPFLAGS_set= ac_cv_env_CPPFLAGS_value= ac_cv_env_CPP_set= ac_cv_env_CPP_value= ac_cv_env_CXXFLAGS_set=set ac_cv_env_CXXFLAGS_value='-O3 -std=c++0x' ac_cv_env_CXX_set= ac_cv_env_CXX_value= ac_cv_env_LDFLAGS_set= ac_cv_env_LDFLAGS_value= ac_cv_env_build_alias_set= ac_cv_env_build_alias_value= ac_cv_env_host_alias_set= ac_cv_env_host_alias_value= ac_cv_env_target_alias_set= ac_cv_env_target_alias_value= ac_cv_prog_ac_ct_CC=clang

-----------------

Output variables.

-----------------

ALL_TARGETS='' AR='' ARCH='' BINDINGS_TO_BUILD='' BINPWD='' BINUTILS_INCDIR='' BUILD_CC='' BUILD_CXX='' BUILD_EXEEXT='' BZIP2='' CAT='' CC='clang' CFLAGS='-O3 -std=c++0x' CLANG_PLUGIN_SUPPORT='' CLANG_SRC_ROOT='' CMP='' COVERED_SWITCH_DEFAULT='' CP='' CPP='' CPPFLAGS='' CVSBUILD='' CXX='' CXXFLAGS='-O3 -std=c++0x' DATE='' DEBUG_RUNTIME='' DEBUG_SYMBOLS='' DEFS='' DISABLE_ASSERTIONS='' DOT='' DOXYGEN='' ECHO_C='' ECHO_N='-n' ECHO_T='' EGREP='' ENABLE_CLANG_ARCMT='' ENABLE_CLANG_STATIC_ANALYZER='' ENABLE_CXX1Y='' ENABLE_DOCS='' ENABLE_DOXYGEN='' ENABLE_EMBED_STDCXX='' ENABLE_EXPENSIVE_CHECKS='' ENABLE_LIBCPP='' ENABLE_OPTIMIZED='' ENABLE_PIC='' ENABLE_POLLY='' ENABLE_PROFILING='' ENABLE_PTHREADS='' ENABLE_SHARED='' ENABLE_SPLIT_DWARF='' ENABLE_TERMINFO='' ENABLE_TIMESTAMPS='' ENABLE_VISIBILITY_INLINES_HIDDEN='' ENABLE_WERROR='' EXEEXT='' EXPENSIVE_CHECKS='' EXTRA_LD_OPTIONS='' EXTRA_OPTIONS='' FIND='' GAS='' GO='' GREP='' GROFF='' GZIPBIN='' HAVE_DLOPEN='' HAVE_LIBZ='' HAVE_LINK_VERSION_SCRIPT='' HAVE_OCAMLOPT='' HAVE_OCAML_OUNIT='' HAVE_PTHREAD='' HAVE_TERMINFO='' HOST_ARCH='' HOST_OS='' HUGE_VAL_SANITY='' INSTALL_DATA='' INSTALL_PROGRAM='' INSTALL_SCRIPT='' INTERNAL_PREFIX='' JIT='' KEEP_SYMBOLS='' LDFLAGS='' LIBOBJS='' LIBS='' LIBXML2_INC='' LIBXML2_LIBS='' LINKALL='' LLVM_BINDIR='' LLVM_CONFIGTIME='' LLVM_COPYRIGHT='Copyright (c) 2003-2014 University of Illinois at Urbana-Champaign.' LLVM_CROSS_COMPILING='' LLVM_DATADIR='' LLVM_DOCSDIR='' LLVM_ENABLE_THREADS='' LLVM_ENABLE_ZLIB='' LLVM_ENUM_ASM_PARSERS='' LLVM_ENUM_ASM_PRINTERS='' LLVM_ENUM_DISASSEMBLERS='' LLVM_ENUM_TARGETS='' LLVM_ETCDIR='' LLVM_HAS_POLLY='' LLVM_INCLUDEDIR='' LLVM_INFODIR='' LLVM_MANDIR='' LLVM_NATIVE_ARCH='' LLVM_ON_UNIX='' LLVM_ON_WIN32='' LLVM_PREFIX='' LLVM_VERSION_MAJOR='3' LLVM_VERSION_MINOR='6' LLVM_VERSION_PATCH='2' LLVM_VERSION_SUFFIX='' LN_S='' LTLIBOBJS='' MKDIR='' MMAP_FILE='' MV='' NM='' NOLINKALL='' NO_COMMENT='' NO_MAYBE_UNINITIALIZED='' NO_MISSING_FIELD_INITIALIZERS='' NO_UNINITIALIZED='' NO_VARIADIC_MACROS='' OBJEXT='' OCAMLFIND='' OCAML_LIBDIR='' OPTIMIZE_OPTION='' OS='' PACKAGE_BUGREPORT='http://llvm.org/bugs/' PACKAGE_NAME='LLVM' PACKAGE_STRING='LLVM 3.6.2' PACKAGE_TARNAME='llvm' PACKAGE_VERSION='3.6.2' PATH_SEPARATOR=':' PDFROFF='' PYTHON='' RANLIB='' RDYNAMIC='' RM='' RPATH='' SED='' SHELL='/bin/bash' SHLIBEXT='' TAR='' TARGETS_TO_BUILD='' TARGETS_WITH_JIT='' TARGET_HAS_JIT='' TARGET_OS='' USE_INTEL_JITEVENTS='' USE_OPROFILE='' XML2CONFIG='' ZIP='' ac_ct_CC='clang' ac_ct_CXX='' bindir='${exec_prefix}/bin' build='' build_alias='' build_cpu='' build_os='' build_vendor='' datadir='${datarootdir}' datarootdir='${prefix}/share' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' dvidir='${docdir}' exec_prefix='NONE' host='' host_alias='' host_cpu='' host_os='' host_vendor='' htmldir='${docdir}' ifGNUmake='' includedir='${prefix}/include' infodir='${datarootdir}/info' libdir='${exec_prefix}/lib' libexecdir='${exec_prefix}/libexec' localedir='${datarootdir}/locale' localstatedir='${prefix}/var' mandir='${datarootdir}/man' oldincludedir='/usr/include' pdfdir='${docdir}' prefix='/home/albert/insieme-libs/llvm-3.6.2' program_prefix='NONE' program_transform_name='s,x,x,' psdir='${docdir}' sbindir='${exec_prefix}/sbin' sharedstatedir='${prefix}/com' subdirs='' sysconfdir='${prefix}/etc' target='' target_alias='' target_cpu='' target_os='' target_vendor=''

-----------

confdefs.h.

-----------

define PACKAGE_NAME "LLVM"

define PACKAGE_TARNAME "llvm"

define PACKAGE_VERSION "3.6.2"

define PACKAGE_STRING "LLVM 3.6.2"

define PACKAGE_BUGREPORT "http://llvm.org/bugs/"

define LLVM_VERSION_MAJOR 3

define LLVM_VERSION_MINOR 6

define LLVM_VERSION_PATCH 2

define LLVM_VERSION_STRING "3.6.2"

configure: exit 77

ghost commented 7 years ago

Hi All, I found the reason for compilation failure. Please, pay more attention to feedback. Inspecting the error log I spotted Clang 3.8 - the system-wide installed compiler, whereas AllScale relies on LLVM/Clang 3.6. On my system (Ubuntu 16.04/64) I did: sudo apt-get purge llvm-3.4. llvm-3.5. llvm-3.6. llvm-3.7. sudo apt-get purge clang.* In fact, I removed all LLVMs except version 3.8, which makes system dependecies, and Clang completely. Now I have AllScale-compiler built up correctly. In my understanding, the installer is get confused with the system LLVM/CLang packages.