eos icon indicating copy to clipboard operation
eos copied to clipboard

Error compiling LLVM and clang with EXPERIMENTAL WASM support.

Open AlanChen04 opened this issue 8 years ago • 7 comments

Hello: I from https://github.com/EOSIO/eos to obtain the latest source code to the local, and then according to the automatic compilation command execution, as a result of the error, is this where I lack of configuration?

System: ubuntu 17.10. Compilation mode: automatic compilation.

git clone https://github.com/eosio/eos --recursive cd eos ./eosio_build.sh

Here is my compile log and error message: ARCHITECTURE Linux

OS name: Ubuntu OS Version: 17.10 CPU speed: 2712Mhz CPU cores: 4 Physical Memory: Mgb Disk install: /dev/sda1 Disk space total: 49G Disk space available: 38G

Checking for installed dependencies.

Package clang-4.0 found. Package lldb-4.0 found. Package libclang-4.0-dev found. Package cmake found. Package make found. Package libbz2-dev found. Package libssl-dev found. Package libgmp3-dev found. Package autotools-dev found. Package build-essential found. Package libbz2-dev found. Package libicu-dev found. Package python-dev found. Package autoconf found. Package libtool found. Package curl found. Package mongodb found.

No required dpkg dependencies to install.

Checking for boost libraries Boost 1.66 found at /home/alan/opt/boost_1_66_0

Checking for MongoDB C++ driver. Mongo C++ driver found at /usr/local/lib/libmongocxx.so.

Checking for secp256k1-zkp secp256k1 found

Checking for LLVM with WASM support. Installing LLVM & WASM -- The C compiler identification is GNU 7.2.0 -- The CXX compiler identification is GNU 7.2.0 -- The ASM compiler identification is GNU -- Found assembler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for dirent.h -- Looking for dirent.h - found -- Looking for dlfcn.h -- Looking for dlfcn.h - found -- Looking for errno.h -- Looking for errno.h - found -- Looking for execinfo.h -- Looking for execinfo.h - found -- Looking for fcntl.h -- Looking for fcntl.h - found -- Looking for inttypes.h -- Looking for inttypes.h - found -- Looking for link.h -- Looking for link.h - found -- Looking for malloc.h -- Looking for malloc.h - found -- Looking for malloc/malloc.h -- Looking for malloc/malloc.h - not found -- Looking for ndir.h -- Looking for ndir.h - not found -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for signal.h -- Looking for signal.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for sys/dir.h -- Looking for sys/dir.h - found -- Looking for sys/ioctl.h -- Looking for sys/ioctl.h - found -- Looking for sys/mman.h -- Looking for sys/mman.h - found -- Looking for sys/ndir.h -- Looking for sys/ndir.h - not found -- Looking for sys/param.h -- Looking for sys/param.h - found -- Looking for sys/resource.h -- Looking for sys/resource.h - found -- Looking for sys/stat.h -- Looking for sys/stat.h - found -- Looking for sys/time.h -- Looking for sys/time.h - found -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for sys/uio.h -- Looking for sys/uio.h - found -- Looking for termios.h -- Looking for termios.h - found -- Looking for unistd.h -- Looking for unistd.h - found -- Looking for valgrind/valgrind.h -- Looking for valgrind/valgrind.h - not found -- Looking for zlib.h -- Looking for zlib.h - found -- Looking for fenv.h -- Looking for fenv.h - found -- Looking for FE_ALL_EXCEPT -- Looking for FE_ALL_EXCEPT - found -- Looking for FE_INEXACT -- Looking for FE_INEXACT - found -- Looking for mach/mach.h -- Looking for mach/mach.h - not found -- Looking for histedit.h -- Looking for histedit.h - not found -- Looking for CrashReporterClient.h -- Looking for CrashReporterClient.h - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Looking for pthread_getspecific in pthread -- Looking for pthread_getspecific in pthread - found -- Looking for pthread_rwlock_init in pthread -- Looking for pthread_rwlock_init in pthread - found -- Looking for pthread_mutex_lock in pthread -- Looking for pthread_mutex_lock in pthread - found -- Looking for dlopen in dl -- Looking for dlopen in dl - found -- Looking for clock_gettime in rt -- Looking for clock_gettime in rt - found -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Looking for compress2 in z -- Looking for compress2 in z - found -- Looking for setupterm in tinfo -- Looking for setupterm in tinfo - found -- Looking for xar_open in xar -- Looking for xar_open in xar - not found -- Looking for arc4random -- Looking for arc4random - not found -- Looking for backtrace -- Looking for backtrace - found -- Looking for _Unwind_Backtrace -- Looking for _Unwind_Backtrace - found -- Looking for getpagesize -- Looking for getpagesize - found -- Looking for sysconf -- Looking for sysconf - found -- Looking for getrusage -- Looking for getrusage - found -- Looking for setrlimit -- Looking for setrlimit - found -- Looking for isatty -- Looking for isatty - found -- Looking for futimens -- Looking for futimens - found -- Looking for futimes -- Looking for futimes - found -- Looking for posix_fallocate -- Looking for posix_fallocate - found -- Looking for sigaltstack -- Looking for sigaltstack - found -- Looking for writev -- Looking for writev - found -- Looking for lseek64 -- Looking for lseek64 - found -- Looking for mallctl -- Looking for mallctl - not found -- Looking for mallinfo -- Looking for mallinfo - found -- Looking for malloc_zone_statistics -- Looking for malloc_zone_statistics - not found -- Looking for mkdtemp -- Looking for mkdtemp - found -- Looking for mkstemp -- Looking for mkstemp - found -- Looking for mktemp -- Looking for mktemp - found -- Looking for getcwd -- Looking for getcwd - found -- Looking for gettimeofday -- Looking for gettimeofday - found -- Looking for getrlimit -- Looking for getrlimit - found -- Looking for posix_spawn -- Looking for posix_spawn - found -- Looking for pread -- Looking for pread - found -- Looking for realpath -- Looking for realpath - found -- Looking for sbrk -- Looking for sbrk - found -- Looking for strtoll -- Looking for strtoll - found -- Looking for strerror -- Looking for strerror - found -- Looking for strerror_r -- Looking for strerror_r - found -- Looking for strerror_s -- Looking for strerror_s - not found -- Looking for setenv -- Looking for setenv - found -- Looking for dlopen -- Looking for dlopen - found -- Looking for __GLIBC__ -- Looking for __GLIBC__ - found -- Performing Test HAVE_INT64_T -- Performing Test HAVE_INT64_T - Success -- Performing Test HAVE_UINT64_T -- Performing Test HAVE_UINT64_T - Success -- Performing Test HAVE_U_INT64_T -- Performing Test HAVE_U_INT64_T - Success -- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB -- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB - Success -- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB -- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB - Success -- Performing Test LLVM_HAS_ATOMICS -- Performing Test LLVM_HAS_ATOMICS - Success -- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG -- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG - Success -- Performing Test SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG -- Performing Test SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG - Failed -- Performing Test HAS_MAYBE_UNINITIALIZED -- Performing Test HAS_MAYBE_UNINITIALIZED - Success -- Native target X86 is not selected; lli will not JIT code -- Threads enabled. -- Doxygen disabled. -- Sphinx disabled. -- Go bindings disabled. -- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) -- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) -- OCaml bindings disabled. -- LLVM host triple: x86_64-unknown-linux-gnu -- LLVM default target triple: x86_64-unknown-linux-gnu -- Performing Test C_SUPPORTS_FPIC -- Performing Test C_SUPPORTS_FPIC - Success -- Performing Test CXX_SUPPORTS_FPIC -- Performing Test CXX_SUPPORTS_FPIC - Success -- Building with -fPIC -- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG -- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG - Success -- Performing Test CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG -- Performing Test CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG - Success -- Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG -- Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Failed -- Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG -- Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Failed -- Performing Test C_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG -- Performing Test C_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG - Failed -- Performing Test CXX_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG -- Performing Test CXX_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG - Success -- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP -- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP - Failed -- Performing Test C_SUPPORTS_STRING_CONVERSION_FLAG -- Performing Test C_SUPPORTS_STRING_CONVERSION_FLAG - Failed -- Performing Test CXX_SUPPORTS_STRING_CONVERSION_FLAG -- Performing Test CXX_SUPPORTS_STRING_CONVERSION_FLAG - Failed -- Performing Test C_SUPPORTS_WERROR_DATE_TIME -- Performing Test C_SUPPORTS_WERROR_DATE_TIME - Success -- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME -- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME - Success -- Performing Test CXX_SUPPORTS_CXX11 -- Performing Test CXX_SUPPORTS_CXX11 - Success -- Performing Test C_SUPPORTS_FNO_FUNCTION_SECTIONS -- Performing Test C_SUPPORTS_FNO_FUNCTION_SECTIONS - Success -- Performing Test C_SUPPORTS_FFUNCTION_SECTIONS -- Performing Test C_SUPPORTS_FFUNCTION_SECTIONS - Success -- Performing Test CXX_SUPPORTS_FFUNCTION_SECTIONS -- Performing Test CXX_SUPPORTS_FFUNCTION_SECTIONS - Success -- Performing Test C_SUPPORTS_FDATA_SECTIONS -- Performing Test C_SUPPORTS_FDATA_SECTIONS - Success -- Performing Test CXX_SUPPORTS_FDATA_SECTIONS -- Performing Test CXX_SUPPORTS_FDATA_SECTIONS - Success -- Found PythonInterp: /usr/bin/python2.7 (found version "2.7.14") -- Constructing LLVMBuild project information -- Targeting WebAssembly -- Looking for sys/resource.h -- Looking for sys/resource.h - found -- Clang version: 4.0.1 -- Performing Test CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG -- Performing Test CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG - Failed -- Configuring done -- Generating done

(The intermediate compilation section is omitted here.)

[ 71%] Butilding CXX object tools/cLang/lib/AST/CMakeFiles/clangAST.dir/RecordLayoutBuilder.cpp.o C++: internal compiler error:已杀死(program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-7/README.BgS> for instructions. tools/clang/lib/Sema/CMakeFiles/clangSema.dir/build.make:662: recipe for target tools/clang/lib/Sema/CMakeFiles/clangSema.dir/SemaExpr.cpp.o failed make[2] :*** [tools/clang/lib/Sema/CMakeFiles/clangSema.dir/SemaExpr.cpp.o] Error 4 nake[2] :***正在等待未完成的任务.... [ 71%] Building CXX object tools/clang/lib/AST/CMakeFiles/clangAST.dir/SelectorLocationsKind.cpp.o [ 71%] Building CXX object tools/clang/lib/AST/CMakeFiles/clangAST.dir/Stmt.cpp.o [ 71%] Building CXX object tools/clang/lib/AST/CMakeFiles/clangAST.dir/StmtCXX.cpp.o [ 71%] Building CXX object tools/clang/lib/AST/CMakeFiles/clangAST.dir/StmtIterator.cpp.o [ 71%] Building CXX object tools/clang/lib/AST/CMakeFiles/clangAST.dir/stmt0bjc.cpp.o [ 71%] Building CXX object tools/clang/lib/AST/CMakeFiles/clangAST.dir/Stmt0penMP.cpp.o [ 71%] Building CXX object tools/clang/lib/AST/CMakeFiles/clangAST.dir/StmtPrinter.cpp.o [ 71%] Building CXX object tools/clang/lib/AST/CMakeFiles/clangAST.dir/StmtProfile.cpp.o [ 71%] Building CXX object tools/clang/lib/AST/CMakeFiles/clangAST.dir/StmtViz.cpp.o [ 71%] Building CXX object tools/clang/lib/AST/CMakeFiles/clangAST.dir/TemplateBase.cpp.o [ 71%] Building CXX object tools/clang/lib/AST/CMakeFiles/clangAST.dir/Templatename.cpp.o [ 71%] Building CXX object tools/clang/lib/AST/CMakeFiles/clangAST.dir/Type.cpp.o [ 71%] Building CXX object tools/clang/lib/AST/CMakeFiles/clangAST.dir/TypeLoc.cpp.O [ 71%] Building CXX object tools/clang/lib/AST/CMakeFiles/clangAST.dir/TypePrinter.cpp.o [ 71%] Building CXX object tools/clang/lib/AST/CMakeFiles/clangAST.dir/VTableBuilder.cpp.o [ 71%] Building CXX object tools/clang/lib/AST/CMakeFiles/clangAST.dir/VTTBuilder.cpp.o [ 71%] Linking CXX static library ../../../../lib/libclangAST.a [ 71%] Built target clangAST CMakeFiles/Makefile2 :9181: recipe for target tools/clang/lib/Sema/CMakeFiles/clangSema.dir/all failed make[1]: *** [tools/clang/lib/Sema/CMakeFiles/clangSema.dir/all] Error 2 [ 71%] Linking CXX static library ../../../../../lib/libclangDynamicASTMatchers.a [ 71%] Built target clangDynamicASTMatchers Makefile:151: recipe for target all failed make: *** [all] Error 2 Error compiling LLVM and clang with EXPERIMENTAL WASM support. Exiting now.

thank you!

AlanChen04 avatar Mar 18 '18 16:03 AlanChen04

I am also experiencing this issue on a Dawn 4 fresh install on Ubuntu 17.10 server

tricaricom avatar May 17 '18 01:05 tricaricom

@tricaricom can you send your full output from the eosio_build.sh script?

pacificcode avatar May 17 '18 21:05 pacificcode

Unfortunately I did not save the output.

I tried Ubuntu 16 and was unable to update the packages in order to install Dawn 4. So then I installed Ubuntu 18.04 and got Dawn 4 installed.

tricaricom avatar May 18 '18 00:05 tricaricom

Just ran into this myself. Slightly different point in the build but same resulting error.

Full log available here: https://gist.github.com/aaroncox/3e424f0db42057bb615ed501205deddd

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.2 LTS
Release:	16.04
Codename:	xenial

aaroncox avatar May 18 '18 04:05 aaroncox

@aaroncox if you haven't already removed the directory /tmp/llvm-compiler try the following. cd /tmp/llvm-compiler/llvm/build make -j4 install

Please let me know the outcome.

pacificcode avatar May 18 '18 17:05 pacificcode

@pacificcode going into /tmp/llvm-compiler/llvm/build and running make -j4 install succeeded without any errors.

From that point, with llvm being build within the /tmp folder, I went back to the EOS directory and ran ./eosio_build.sh and the build successfully completed without any errors.

[100%] Built target nodeos


	 _______  _______  _______ _________ _______
	(  ____ \(  ___  )(  ____ \\__   __/(  ___  )
	| (    \/| (   ) || (    \/   ) (   | (   ) |
	| (__    | |   | || (_____    | |   | |   | |
	|  __)   | |   | |(_____  )   | |   | |   | |
	| (      | |   | |      ) |   | |   | |   | |
	| (____/\| (___) |/\____) |___) (___| (___) |
	(_______/(_______)\_______)\_______/(_______)

	EOSIO has been successfully built. 00:02:18

	To verify your installation run the following commands:

	export PATH=${HOME}/opt/mongodb/bin:$PATH
	/home/aaron/opt/mongodb/bin/mongod -f /home/aaron/opt/mongodb/mongod.conf &
	cd /home/aaron/eos/build; make test

	For more information:
	EOSIO website: https://eos.io
	EOSIO Telegram channel @ https://t.me/EOSProject
	EOSIO resources: https://eos.io/resources/
	EOSIO wiki: https://github.com/EOSIO/eos/wiki

aaroncox avatar May 18 '18 18:05 aaroncox

@aaroncox Great! Thank you for your quick response. You can remove the llvm directory now (its installed in $HOME/opt/wasm rm -rf /tmp/llvm-compiler

pacificcode avatar May 18 '18 19:05 pacificcode