Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

EOS build failure on Ubuntu 16.10 #498

Closed
signitary opened this issue Sep 25, 2017 · 14 comments
Closed

EOS build failure on Ubuntu 16.10 #498

signitary opened this issue Sep 25, 2017 · 14 comments
Assignees
Milestone

Comments

@signitary
Copy link

Hello,

I had to locate the clang-4.0 and lldb-4.0 sources for Yakkety since they were not available from the website. That solved that failure, but now I'm getting the following after all previous dependencies were downloaded and installed:

[ 63%] Building CXX object programs/launcher/CMakeFiles/launcher.dir/main.cpp.o
../Runtime/libRuntime.a(LLVMJIT.cpp.o):(.rodata+0x70): undefined reference to typeinfo for llvm::JITSymbolResolver' ../Runtime/libRuntime.a(LLVMJIT.cpp.o):(.rodata._ZTIN7LLVMJIT17UnitMemoryManagerE[_ZTIN7LLVMJIT17UnitMemoryManagerE]+0x10): undefined reference to typeinfo for llvm::RTDyldMemoryManager'
../Runtime/libRuntime.a(LLVMJIT.cpp.o):(.rodata._ZTIN4llvm18MCJITMemoryManagerE[_ZTIN4llvm18MCJITMemoryManagerE]+0x10): undefined reference to typeinfo for llvm::RuntimeDyld::MemoryManager' ../Runtime/libRuntime.a(LLVMJIT.cpp.o):(.rodata._ZTIN4llvm17raw_pwrite_streamE[_ZTIN4llvm17raw_pwrite_streamE]+0x10): undefined reference to typeinfo for llvm::raw_ostream'
../Runtime/libRuntime.a(LLVMJIT.cpp.o):(.rodata._ZTIN4llvm18ObjectMemoryBufferE[_ZTIN4llvm18ObjectMemoryBufferE]+0x10): undefined reference to typeinfo for llvm::MemoryBuffer' ../Runtime/libRuntime.a(LLVMJIT.cpp.o):(.rodata._ZTIN4llvm9ErrorInfoINS_9ErrorListENS_13ErrorInfoBaseEEE[_ZTIN4llvm9ErrorInfoINS_9ErrorListENS_13ErrorInfoBaseEEE]+0x10): undefined reference to typeinfo for llvm::ErrorInfoBase'
../Runtime/libRuntime.a(LLVMJIT.cpp.o):(.rodata+0x70): undefined reference to typeinfo for llvm::JITSymbolResolver' ../Runtime/libRuntime.a(LLVMJIT.cpp.o):(.rodata._ZTIN7LLVMJIT17UnitMemoryManagerE[_ZTIN7LLVMJIT17UnitMemoryManagerE]+0x10): undefined reference to typeinfo for llvm::RTDyldMemoryManager'
../Runtime/libRuntime.a(LLVMJIT.cpp.o):(.rodata._ZTIN4llvm18MCJITMemoryManagerE[_ZTIN4llvm18MCJITMemoryManagerE]+0x10): undefined reference to typeinfo for llvm::RuntimeDyld::MemoryManager' ../Runtime/libRuntime.a(LLVMJIT.cpp.o):(.rodata._ZTIN4llvm17raw_pwrite_streamE[_ZTIN4llvm17raw_pwrite_streamE]+0x10): undefined reference to typeinfo for llvm::raw_ostream'
../Runtime/libRuntime.a(LLVMJIT.cpp.o):(.rodata._ZTIN4llvm18ObjectMemoryBufferE[_ZTIN4llvm18ObjectMemoryBufferE]+0x10): undefined reference to typeinfo for llvm::MemoryBuffer' ../Runtime/libRuntime.a(LLVMJIT.cpp.o):(.rodata._ZTIN4llvm9ErrorInfoINS_9ErrorListENS_13ErrorInfoBaseEEE[_ZTIN4llvm9ErrorInfoINS_9ErrorListENS_13ErrorInfoBaseEEE]+0x10): undefined reference to typeinfo for llvm::ErrorInfoBase'
../Runtime/libRuntime.a(LLVMEmitIR.cpp.o):(.rodata._ZTIN4llvm10SelectInstE[_ZTIN4llvm10SelectInstE]+0x10): undefined reference to typeinfo for llvm::Instruction' ../Runtime/libRuntime.a(LLVMEmitIR.cpp.o):(.rodata._ZTIN4llvm8FCmpInstE[_ZTIN4llvm8FCmpInstE]+0x10): undefined reference to typeinfo for llvm::CmpInst'
../Runtime/libRuntime.a(LLVMEmitIR.cpp.o):(.rodata._ZTIN4llvm10SelectInstE[_ZTIN4llvm10SelectInstE]+0x10): undefined reference to typeinfo for llvm::Instruction' ../Runtime/libRuntime.a(LLVMEmitIR.cpp.o):(.rodata._ZTIN4llvm8FCmpInstE[_ZTIN4llvm8FCmpInstE]+0x10): undefined reference to typeinfo for llvm::CmpInst'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
libraries/wasm-jit/Source/Programs/CMakeFiles/Test.dir/build.make:128: recipe for target 'libraries/wasm-jit/Source/Programs/Test' failed
make[2]: *** [libraries/wasm-jit/Source/Programs/Test] Error 1
CMakeFiles/Makefile2:1066: recipe for target 'libraries/wasm-jit/Source/Programs/CMakeFiles/Test.dir/all' failed

There were two additional failures of the same type before the build ended. Any help would be greatly appreciated.

@andriantolie
Copy link
Contributor

andriantolie commented Sep 26, 2017

Hi signitary, your problem looks similar to this issue #413

Seems like your llvm doesn't have RTTI enabled, can you check it via:

llvm-config-4.0 --has-rtti 

Did you install llvm via "./build.sh ubuntu full"? The llvm installed via the script should have RTTI enabled. And btw where do you locate clang-4.0 and lldb-4.0 sources for Yakkety?

I'm locating the clang-4.0 and lldb-4.0 from these sources:

deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-4.0 main
deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial-4.0 main

And it's building without problem on a freshly installed ubuntu 16.10

@signitary
Copy link
Author

Yes, I used the build script with the ubuntu and full options. And, yes, my llvm-config-4.0 says I have RTTI enabled. Perhaps I should burn this setup down and start from a fresh install of yakkety or another version of ubuntu?

The sources I used for the llvm-toolchain were the following:
deb http://apt.llvm.org/yakkety/ llvm-toolchain-yakkety-4.0 main
deb-src http://apt.llvm.org/yakkety/ llvm-toolchain-yakkety-4.0 main

@signitary
Copy link
Author

Hi Andriantolie,

One more thing I should probably mention is that I had downloaded the original version of the eos sdk and began from there. I've since reloaded the sdk and restarted the build.sh script several times to try and get through the process. I'm thinking now that it would make the most sense to start with a fresh install of ubuntu. Do you recommend Yakkety? Or should I go with Xenial or Zesty?

@andriantolie
Copy link
Contributor

andriantolie commented Sep 26, 2017

That might be the reason. I don’t think running build script with full options multiple times will replace the old dependency with new dependency (I remembered I saw “can’t copy to non-empty directory error” when I did that). Starting fresh will be much better and I would recommend Xenial/ Zesty coz Yakkety has reached its end of life.

@signitary
Copy link
Author

ok, thanks. I'll do that and will post the results here when finished. Hopefully, it will be good news! :)

@signitary
Copy link
Author

This is the latest error I encountered... Running <./build.sh ubuntu full> on a fresh install of Ubuntu Xenial.

-- Using custom FindBoost.cmake
CMake Error at libraries/fc/CMakeModules/FindBoost.cmake:1129 (message):
Unable to find the requested Boost libraries.

Unable to find the Boost header files. Please set BOOST_ROOT to the root
directory containing Boost or BOOST_INCLUDEDIR to the directory containing
Boost's headers.
Call Stack (most recent call first):
libraries/chainbase/CMakeLists.txt:26 (FIND_PACKAGE)

-- Configuring ChainBase on Linux
-- egenesis: /home/david/eos/genesis.json
-- embed_genesis_args: -t/home/david/eos/libraries/egenesis/egenesis_brief.cpp.tmpl---/home/david/eos/build/libraries/egenesis/egenesis_brief.cpp-t/home/david/eos/libraries/egenesis/egenesis_full.cpp.tmpl---/home/david/eos/build/libraries/egenesis/egenesis_full.cpp--genesis-json/home/david/eos/genesis.json
-- Using custom FindBoost.cmake
CMake Error at libraries/fc/CMakeModules/FindBoost.cmake:1129 (message):
Unable to find the requested Boost libraries.

Unable to find the Boost header files. Please set BOOST_ROOT to the root
directory containing Boost or BOOST_INCLUDEDIR to the directory containing
Boost's headers.
Call Stack (most recent call first):
libraries/appbase/CMakeLists.txt:18 (FIND_PACKAGE)

-- Configuring ChainBase on Linux
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Doxygen not found. Contract documentation will not be generated.
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
/home/david/eos/libraries/appbase/Boost_INCLUDE_DIR
used as include directory in directory /home/david/eos/libraries/appbase
/home/david/eos/libraries/chainbase/Boost_INCLUDE_DIR
used as include directory in directory /home/david/eos/libraries/chainbase
/home/david/eos/libraries/fc/Boost_INCLUDE_DIR
used as include directory in directory /home/david/eos/libraries/fc

-- Configuring incomplete, errors occurred!
See also "/home/david/eos/build/CMakeFiles/CMakeOutput.log".
make: *** No targets specified and no makefile found. Stop.

@signitary
Copy link
Author

The attached file is the CMakeOutput.log from this attempt.
CMakeOutput.log

@andriantolie
Copy link
Contributor

Hi signitary,

I have investigated this issue and realized that Xenial doesn't have curl installed by default. I have made a pull request for this issue here #509

Meanwhile, you can install curl and run again the ./build.sh ubuntu full (running this multiple times this time shouldn't cause any problem since you use the same build.sh)

Or if you don't want to wait for the whole ./build.sh ubuntu full again, you can just jump to build the boost on $HOME/opt/boost_1_64_0 independently and call ./build.sh ubuntu build instead:

sudo apt-get install curl
cd /tmp/
curl -L https://sourceforge.net/projects/boost/files/boost/1.64.0/boost_1_64_0.tar.bz2 > boost_1.64.0.tar.bz2
tar xjf boost_1.64.0.tar.bz2
export BOOST_ROOT=$HOME/opt/boost_1_64_0
cd boost_1_64_0/
./bootstrap.sh "--prefix=$BOOST_ROOT"
./b2 install
rm -rf /tmp/boost_16_4_0/
cd ~/eos
./build.sh ubuntu build

Hope this works for you!

@andriantolie
Copy link
Contributor

Hi signitary,

How's it going? Does everything work fine in your side?

@signitary
Copy link
Author

Hi andriantolie,
Thanks for your suggestions. I haven't had a chance to get back to this yet, but will let you know how the result when I do.
Signitary

@andriantolie
Copy link
Contributor

Thanks!

@ioleksiu
Copy link

ioleksiu commented Oct 1, 2017

@andriantolie thank you!
it solved my problem

@signitary
Copy link
Author

Hi Andriantolie,

Yes, it worked! Thank you!

@andriantolie
Copy link
Contributor

Awesome! I will close this issue then.

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

No branches or pull requests

4 participants