eos icon indicating copy to clipboard operation
eos copied to clipboard

eos build fail

Open ItVen opened this issue 8 years ago • 9 comments

memore@ubuntu:~/eos$ ./eosio_build.sh

Beginning build version: 1.2
2018年 06月 07日 星期四 05:46:26 UTC
User: memore
git head id: 0bff48642f0724e18b9fbc8aee541eb113f90173
Current branch: master

ARCHITECTURE: Linux

OS name: Ubuntu
OS Version: 16.04
CPU speed: 3192.001Mhz
CPU cores: 4
Physical Memory: 10528 Mgb
Disk install: /dev/sda1
Disk space total: 186G
Disk space available: 146G

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 automake found.
Package libbz2-dev found.
Package libssl-dev found.
Package libgmp3-dev found.
Package autotools-dev found.
Package build-essential found.
Package libicu-dev found.
Package python2.7-dev found.
Package python3-dev found.
Package autoconf found.
Package libtool found.
Package curl found.
Package zlib1g-dev found.
Package doxygen found.
Package graphviz found.

No required dpkg dependencies to install.

Checking boost library installation.
Boost found at /home/memore/opt/boost.

Checking MongoDB installation.
MongoDB configuration found at /home/memore/opt/mongodb/mongod.conf.

Checking MongoDB C++ driver installation.
Mongo C++ driver found at /usr/local/lib/libmongocxx-static.a.

Checking secp256k1-zkp installation.
secp256k1 found @ /usr/local/lib.

Checking for LLVM with WASM support.
WASM found at /home/memore/opt/wasm/bin.

ALL dependencies sucessfully found or installed . Installing EOSIO

CMAKE_BUILD_TYPE=Release ENABLE_COVERAGE_TESTING=false DOXYGEN=false

-- Using custom FindBoost.cmake -- Boost version: 1.67.0 -- Found the following Boost libraries: -- thread -- date_time -- filesystem -- system -- program_options -- signals -- serialization -- chrono -- unit_test_framework -- context -- locale -- iostreams -- Configuring EOSIO on Linux -- binaryen building with -std=c++11 -- binaryen building for platform x86-64 -- binaryen building with -Wall -- binaryen building with -Werror -- binaryen building with -Wextra -- binaryen building with -Wno-unused-parameter -- binaryen building with -fno-omit-frame-pointer -- binaryen building with -fPIC -- binaryen building with -O2 -- binaryen building with -UNDEBUG -- Using 'SYS' as CORE symbol name -- Using 'EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV' as public key for 'eosio' account -- Using WASM clang => /home/memore/opt/wasm/bin/clang -- Using WASM llc => /home/memore/opt/wasm/bin/llc -- Using WASM llvm-link => /home/memore/opt/wasm/bin/llvm-link -- Found Secp256k1: /usr/local/lib/libsecp256k1.a -- Configuring fc to build on Unix/Apple -- zlib found -- Configuring Builtins -- Configuring SoftFloat -- Using custom FindBoost.cmake -- Boost version: 1.67.0 -- Found the following Boost libraries: -- thread -- date_time -- filesystem -- system -- chrono -- unit_test_framework -- locale -- Configuring ChainBase on Linux -- Using custom FindBoost.cmake -- Boost version: 1.67.0 -- Found the following Boost libraries: -- thread -- date_time -- filesystem -- system -- chrono -- program_options -- unit_test_framework -- locale -- Configuring AppBase on Linux -- Git commit revision: 0bff4864 -- Git commit revision: 0bff4864 -- Git commit revision: 0bff4864 -- Configuring done -- Generating done -- Build files have been written to: /home/memore/eos/build [ 0%] Built target binaryen [ 0%] Built target asmjs [ 0%] Built target wasm [ 0%] Built target ast [ 0%] Built target cfg [ 1%] Built target support [ 1%] Built target emscripten-optimizer [ 4%] Built target passes [ 5%] Built target builtins [ 6%] Built target Platform [ 6%] Built target chainbase [ 27%] Built target softfloat [ 29%] Built target libc++ [ 29%] Built target eosiolib [ 29%] contract... [ 29%] Built target appbase [ 70%] Built target libc [ 70%] Built target copy_skeleton_contract [ 70%] Built target identity_common [ 70%] Built target identity_interface [ 70%] Built target eosio-s2wasm [ 70%] Built target print_floats [ 70%] Built target Logging [ 70%] Built target IR [ 71%] Built target chainbase_test [ 71%] Built target Runtime [ 71%] Built target WASM [ 71%] Built target Emscripten [ 71%] Built target appbase_example [ 71%] Built target WAST [ 71%] Built target Disassemble [ 72%] Built target wavm [ 73%] Built target Test [ 73%] Built target eosio-wast2wasm [ 74%] Built target eosio.bios [ 74%] Built target simple.token [ 75%] Built target eosio.token [ 75%] Built target eosio.msig [ 75%] Built target multi_index_test [ 76%] Built target identity [ 78%] Built target identity_test [ 78%] Built target stltest [ 79%] Built target exchange [ 79%] Built target test.inline [ 80%] Built target asserter [ 80%] Built target hello [ 80%] Built target infinite [ 81%] Built target test_api [ 82%] Built target proxy [ 82%] Built target test_api_mem [ 82%] Built target test_api_db [ 83%] Built target test_api_multi_index [ 83%] Built target test_ram_limit [ 83%] Built target noop [ 84%] Built target dice [ 84%] Built target tic_tac_toe [ 85%] Built target payloadless [ 86%] Built target eosio.system [ 90%] Built target fc [ 90%] Built target eos_utilities [ 90%] Built target test_cypher_suites [ 90%] Built target test_exchange [ 90%] Built target http_client_plugin [ 92%] Built target eosio_chain [ 93%] Built target abi_generator [ 93%] Built target eosio_testing [ 93%] Built target chain_plugin [ 93%] Built target http_plugin [ 94%] Linking CXX executable eosio-abigen [ 94%] Built target wallet_plugin [ 94%] Built target eosio-launcher Scanning dependencies of target producer_plugin [ 94%] Built target bnet_plugin Scanning dependencies of target chain_api_plugin [ 94%] Building CXX object plugins/producer_plugin/CMakeFiles/producer_plugin.dir/producer_plugin.cpp.o [ 94%] Building CXX object plugins/chain_api_plugin/CMakeFiles/chain_api_plugin.dir/chain_api_plugin.cpp.o [ 94%] Linking CXX executable unit_test /usr/local/lib/libclangTooling.a(CommonOptionsParser.cpp.o): In function clang::tooling::CommonOptionsParser::CommonOptionsParser(int&, char const**, llvm::cl::OptionCategory&, llvm::cl::NumOccurrencesFlag, char const*)': CommonOptionsParser.cpp:(.text._ZN5clang7tooling19CommonOptionsParserC2ERiPPKcRN4llvm2cl14OptionCategoryENS7_18NumOccurrencesFlagES4_+0x198): undefined reference to llvm::cl::ParseCommandLineOptions(int, char const* const*, llvm::StringRef, llvm::raw_ostream*)' /usr/local/lib/libclangTooling.a(CompilationDatabase.cpp.o): In function findCompilationDatabaseFromDirectory(llvm::StringRef, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)': CompilationDatabase.cpp:(.text._ZL36findCompilationDatabaseFromDirectoryN4llvm9StringRefERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x344): undefined reference to llvm::sys::path::parent_path(llvm::StringRef, llvm::sys::path::Style)' ... PPExpressions.cpp:(.text._ZN5clang12Preprocessor27EvaluateDirectiveExpressionERPNS_14IdentifierInfoE+0x18d2): undefined reference to llvm::APInt::compareSigned(llvm::APInt const&) const' /usr/local/lib/libclangLex.a(PPLexerChange.cpp.o): In function clang::Preprocessor::diagnoseMissingHeaderInUmbrellaDir(clang::Module const&)': PPLexerChange.cpp:(.text._ZN5clang12Preprocessor34diagnoseMissingHeaderInUmbrellaDirERKNS_6ModuleE+0x1fe): undefined reference to llvm::sys::path::extension(llvm::StringRef, llvm::sys::path::Style)' PPLexerChange.cpp:(.text._ZN5clang12Preprocessor34diagnoseMissingHeaderInUmbrellaDirERKNS_6ModuleE+0x57c): undefined reference to llvm::sys::path::parent_path(llvm::StringRef, llvm::sys::path::Style)' PPLexerChange.cpp:(.text._ZN5clang12Preprocessor34diagnoseMissingHeaderInUmbrellaDirERKNS_6ModuleE+0x660): undefined reference to llvm::sys::path::filename(llvm::StringRef, llvm::sys::path::Style)' /usr/local/lib/libclangLex.a(PPMacroExpansion.cpp.o): In function clang::Preprocessor::getModuleMacro(clang::Module*, clang::IdentifierInfo*)': PPMacroExpansion.cpp:(.text._ZN5clang12Preprocessor14getModuleMacroEPNS_6ModuleEPNS_14IdentifierInfoE+0x6b): undefined reference to llvm::FoldingSetBase::FindNodeOrInsertPos(llvm::FoldingSetNodeID const&, void*&)' /usr/local/lib/libclangLex.a(PPMacroExpansion.cpp.o): In function clang::Preprocessor::addModuleMacro(clang::Module*, clang::IdentifierInfo*, clang::MacroInfo*, llvm::ArrayRefclang::ModuleMacro*, bool&)': PPMacroExpansion.cpp:(.text._ZN5clang12Preprocessor14addModuleMacroEPNS_6ModuleEPNS_14IdentifierInfoEPNS_9MacroInfoEN4llvm8ArrayRefIPNS_11ModuleMacroEEERb+0x89): undefined reference to llvm::FoldingSetBase::FindNodeOrInsertPos(llvm::FoldingSetNodeID const&, void*&)' PPMacroExpansion.cpp:(.text._ZN5clang12Preprocessor14addModuleMacroEPNS_6ModuleEPNS_14IdentifierInfoEPNS_9MacroInfoEN4llvm8ArrayRefIPNS_11ModuleMacroEEERb+0x10e): undefined reference to llvm::FoldingSetBase::InsertNode(llvm::FoldingSetBase::Node*, void*)' /usr/local/lib/libclangLex.a(Preprocessor.cpp.o): In function clang::Preprocessor::Preprocessor(std::shared_ptr<clang::PreprocessorOptions>, clang::DiagnosticsEngine&, clang::LangOptions&, clang::SourceManager&, clang::MemoryBufferCache&, clang::HeaderSearch&, clang::ModuleLoader&, clang::IdentifierInfoLookup*, bool, clang::TranslationUnitKind)': Preprocessor.cpp:(.text._ZN5clang12PreprocessorC2ESt10shared_ptrINS_19PreprocessorOptionsEERNS_17DiagnosticsEngineERNS_11LangOptionsERNS_13SourceManagerERNS_17MemoryBufferCacheERNS_12HeaderSearchERNS_12ModuleLoaderEPNS_20IdentifierInfoLookupEbNS_19TranslationUnitKindE+0x447): undefined reference to llvm::FoldingSetBase::FoldingSetBase(unsigned int)' /usr/local/lib/libclangLex.a(Preprocessor.cpp.o): In function clang::Preprocessor::~Preprocessor()': Preprocessor.cpp:(.text._ZN5clang12PreprocessorD2Ev+0x36f): undefined reference to llvm::FoldingSetBase::~FoldingSetBase()' /usr/local/lib/libclangLex.a(Preprocessor.cpp.o):(.data.rel.ro._ZTVN4llvm14FoldingSetImplIN5clang11ModuleMacroEEE[_ZTVN4llvm14FoldingSetImplIN5clang11ModuleMacroEEE]+0x10): undefined reference to llvm::FoldingSetBase::anchor()' /usr/local/lib/libclangLex.a(Preprocessor.cpp.o):(.data.rel.ro._ZTVN4llvm10FoldingSetIN5clang11ModuleMacroEEE[_ZTVN4llvm10FoldingSetIN5clang11ModuleMacroEEE]+0x10): undefined reference to llvm::FoldingSetBase::anchor()' CMakeFiles/unit_test.dir/abi_tests.cpp.o:(.rodata._ZTIN5eosio27find_eosio_abi_macro_actionE[_ZTIN5eosio27find_eosio_abi_macro_actionE]+0x10): undefined reference to typeinfo for clang::PreprocessOnlyAction' CMakeFiles/unit_test.dir/abi_tests.cpp.o:(.rodata._ZTIN5eosio27find_eosio_abi_macro_action16callback_handlerE[_ZTIN5eosio27find_eosio_abi_macro_action16callback_handlerE]+0x10): undefined reference to typeinfo for clang::PPCallbacks' CMakeFiles/unit_test.dir/abi_tests.cpp.o:(.rodata._ZTIN5eosio19generate_abi_actionE[_ZTIN5eosio19generate_abi_actionE]+0x10): undefined reference to typeinfo for clang::ASTFrontendAction' CMakeFiles/unit_test.dir/abi_tests.cpp.o:(.rodata._ZTIN5eosio25abi_generator_astconsumerE[_ZTIN5eosio25abi_generator_astconsumerE]+0x10): undefined reference to typeinfo for clang::ASTConsumer' clang: error: linker command failed with exit code 1 (use -v to see invocation) unittests/CMakeFiles/unit_test.dir/build.make:853: recipe for target 'unittests/unit_test' failed make[2]: *** [unittests/unit_test] Error 1 CMakeFiles/Makefile2:6383: recipe for target 'unittests/CMakeFiles/unit_test.dir/all' failed make[1]: *** [unittests/CMakeFiles/unit_test.dir/all] Error 2 [ 94%] Linking CXX static library libchain_api_plugin.a [ 94%] Built target chain_api_plugin [ 94%] Linking CXX static library libproducer_plugin.a [ 94%] Built target producer_plugin Makefile:160: recipe for target 'all' failed make: *** [all] Error 2

>>>>>>>>>>>>>>>>>>>> MAKE building EOSIO has exited with the above error.

ItVen avatar Jun 07 '18 05:06 ItVen

yesterday i can build success,but today it build fail. why?

ItVen avatar Jun 07 '18 06:06 ItVen

make clean and try again

dragonflylxp avatar Jun 07 '18 06:06 dragonflylxp

rm -rf build git pull git submodule update --init --recursive ./eosio_build.sh

gotope avatar Jun 07 '18 06:06 gotope

still return that: clang: error: linker command failed with exit code 1 (use -v to see invocation) unittests/CMakeFiles/unit_test.dir/build.make:853: recipe for target 'unittests/unit_test' failed make[2]: *** [unittests/unit_test] Error 1 CMakeFiles/Makefile2:6383: recipe for target 'unittests/CMakeFiles/unit_test.dir/all' failed make[1]: *** [unittests/CMakeFiles/unit_test.dir/all] Error 2 Makefile:160: recipe for target 'all' failed make: *** [all] Error 2

>>>>>>>>>>>>>>>>>>>> MAKE building EOSIO has exited with the above error.

ItVen avatar Jun 07 '18 06:06 ItVen

@ItVen I am unable to reproduce this. I don't see your compiler information in the CMAKE output you pasted into this issue. Could you run the following commands and paste the FULL output here?

which clang-4.0 | xargs ls -lah which clang++-4.0 | xargs ls -lah llvm-config-4.0 --version --has-rtti

cd /path/to/eos rm -rf build/ git checkout master git pull git submodule update --init --recursive ./eosio_build.sh

pacificcode avatar Jun 07 '18 17:06 pacificcode

the output: memore@ubuntu:~$ which clang-4.0 | xargs ls -lah lrwxrwxrwx 1 root root 25 Aug 3 2017 /usr/bin/clang-4.0 -> ../lib/llvm-4.0/bin/clang memore@ubuntu:~$ which clang++-4.0 | xargs ls -lah lrwxrwxrwx 1 root root 27 Aug 3 2017 /usr/bin/clang++-4.0 -> ../lib/llvm-4.0/bin/clang++ memore@ubuntu:~$ llvm-config-4.0 --version --has-rtti 4.0.0 YES

ItVen avatar Jun 08 '18 00:06 ItVen

is this issue solved?

taokayan avatar Jun 25 '18 07:06 taokayan

@taokayan see my message above from 6/7/18. He didn't complete the commands I requested he execute. Closing this issue.

pacificcode avatar Jun 25 '18 16:06 pacificcode

I had a similar error, and temporarily fixed by this patch:

diff --git a/programs/eosio-abigen/CMakeLists.txt b/programs/eosio-abigen/CMakeLists.txt
index 93df3c8..a2da9f3 100644
--- a/programs/eosio-abigen/CMakeLists.txt
+++ b/programs/eosio-abigen/CMakeLists.txt
@@ -17,8 +17,14 @@ if( GPERFTOOLS_FOUND )
     list( APPEND PLATFORM_SPECIFIC_LIBS tcmalloc )
 endif()
 
-target_link_libraries(eosio-abigen abi_generator)
+execute_process(
+    COMMAND llvm-config-4.0 --ldflags
+    OUTPUT_VARIABLE LLVM_LDFLAGS
+    OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LLVM_LDFLAGS}")
 
+target_link_libraries(eosio-abigen abi_generator)
 
 install( TARGETS
    eosio-abigen
diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt
index 7442b00..649eb0a 100644
--- a/unittests/CMakeLists.txt
+++ b/unittests/CMakeLists.txt
@@ -19,6 +19,13 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/config.hpp.in ${CMAKE_CURRENT
 file(GLOB UNIT_TESTS "*.cpp")
 
 add_executable( unit_test ${UNIT_TESTS} ${WASM_UNIT_TESTS} )
+execute_process(
+    COMMAND llvm-config-4.0 --ldflags
+    OUTPUT_VARIABLE LLVM_LDFLAGS
+    OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LLVM_LDFLAGS}")
+
 target_link_libraries( unit_test eosio_chain chainbase eosio_testing eos_utilities abi_generator fc ${PLATFORM_SPECIFIC_LIBS} )
 
 target_include_directories( unit_test PUBLIC

tunz avatar Jul 20 '18 07:07 tunz