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

link failed in mac os. #99

Closed
philsong opened this issue Jul 27, 2017 · 11 comments
Closed

link failed in mac os. #99

philsong opened this issue Jul 27, 2017 · 11 comments

Comments

@philsong
Copy link

I am writing a article about how to compile eos in mac os.
http://www.jianshu.com/p/f26ee4cf1d4a

but i still meet a issue in below:
could some one help me? thanks.

[ 55%] Built target WASM
[ 58%] Built target WAST
[ 59%] Linking CXX executable wavm
Undefined symbols for architecture x86_64:
"typeinfo for llvm::Instruction", referenced from:
typeinfo for llvm::SelectInst in libRuntime.a(LLVMEmitIR.cpp.o)
"typeinfo for llvm::RuntimeDyld::MemoryManager", referenced from:
typeinfo for llvm::MCJITMemoryManager in libRuntime.a(LLVMJIT.cpp.o)
"typeinfo for llvm::raw_ostream", referenced from:
typeinfo for llvm::raw_pwrite_stream in libRuntime.a(LLVMJIT.cpp.o)
"typeinfo for llvm::MemoryBuffer", referenced from:
typeinfo for llvm::ObjectMemoryBuffer in libRuntime.a(LLVMJIT.cpp.o)
"typeinfo for llvm::ErrorInfoBase", referenced from:
typeinfo for llvm::ErrorInfo<llvm::ErrorList, llvm::ErrorInfoBase> in libRuntime.a(LLVMJIT.cpp.o)
"typeinfo for llvm::JITSymbolResolver", referenced from:
typeinfo for LLVMJIT::NullResolver in libRuntime.a(LLVMJIT.cpp.o)
"typeinfo for llvm::RTDyldMemoryManager", referenced from:
typeinfo for LLVMJIT::UnitMemoryManager in libRuntime.a(LLVMJIT.cpp.o)
"typeinfo for llvm::CmpInst", referenced from:
typeinfo for llvm::FCmpInst in libRuntime.a(LLVMEmitIR.cpp.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libraries/wasm-jit/Source/Programs/wavm] Error 1
make[1]: *** [libraries/wasm-jit/Source/Programs/CMakeFiles/wavm.dir/all] Error 2
make: *** [all] Error 2

@philsong philsong changed the title link failed in maxos. link failed in mac os. Jul 27, 2017
@nathanielhourt
Copy link
Contributor

Have you tried with llvm from homebrew rather than installing it manually?

@philsong
Copy link
Author

new issue:
In file included from /Users/phil/work/X-work/eos/libraries/chain/include/eos/chain/types.hpp:41:
/Users/phil/work/X-work/eos/libraries/fc/include/fc/static_variant.hpp:388:34: error: class template partial specialization is not more specialized than the primary template
[-Winvalid-partial-specialization]
template<typename... T> struct get_typename<T...> { static const char* name() { return typeid(static_variant<T...>).name(); } };
^
/Users/phil/work/X-work/eos/libraries/fc/include/fc/reflect/typename.hpp:18:30: note: template is declared here
template class get_typename{};
^
In file included from /Users/phil/work/X-work/eos/libraries/chain/chain_controller.cpp:33:
/Users/phil/work/X-work/eos/libraries/chain/include/eos/chain/producer_object.hpp:52:2: warning: using ordered_non_unique is not deterministic [-W#warnings]
#warning using ordered_non_unique is not deterministic
^
/Users/phil/work/X-work/eos/libraries/chain/chain_controller.cpp:340:2: warning: TODO: Populate generated blocks with generated transactions [-W#warnings]
#warning TODO: Populate generated blocks with generated transactions
^
/Users/phil/work/X-work/eos/libraries/chain/chain_controller.cpp:447:2: warning: TODO: Process generated transaction [-W#warnings]
#warning TODO: Process generated transaction
^
/Users/phil/work/X-work/eos/libraries/chain/chain_controller.cpp:446:26: warning: unused variable 'trx' [-Wunused-variable]
for(const auto& trx : thread.generated_input ) {
^
/Users/phil/work/X-work/eos/libraries/chain/chain_controller.cpp:429:13: warning: unused variable 'next_block_num' [-Wunused-variable]
uint32_t next_block_num = next_block.block_num();
^
/Users/phil/work/X-work/eos/libraries/chain/chain_controller.cpp:495:2: warning: TODO: Use a real chain_id here (where is this stored? Do we still need it?) [-W#warnings]
#warning TODO: Use a real chain_id here (where is this stored? Do we still need it?)
^
/Users/phil/work/X-work/eos/libraries/chain/chain_controller.cpp:1137:30: warning: unused variable 'outputs' [-Wunused-variable]
const vector& outputs = vo["output"].get_array();
^
7 warnings and 1 error generated.
make[2]: *** [libraries/chain/CMakeFiles/eos_chain.dir/chain_controller.cpp.o] Error 1
make[1]: *** [libraries/chain/CMakeFiles/eos_chain.dir/all] Error 2
make: *** [all] Error 2

@hh3755
Copy link

hh3755 commented Jul 29, 2017

Same problem here,I install the llvm manually instead of using brew install llvm

with the following cmake command:

export WASM_LLVM_CONFIG=~/develop/eos/environment/wasm-compiler/llvm/bin/llvm-config
## using manually installed llvm
export LLVM_DIR=~/develop/eos/environment/llvm/clang-llvm-4.0.0-x86_64-apple-darwin/lib/cmake/llvm
cmake -DOPENSSL_ROOT_DIR=/usr/local/Cellar/openssl/1.0.2l -DOPENSSL_LIBRARIES=/usr/local/Cellar/openssl/1.0.2l/lib ..

if i didn't use the manually install llvm,I got the following error when cmake:

- Configuring ChainBase on OS X

CMake Error at libraries/wasm-jit/Source/Runtime/CMakeLists.txt:26 (find_package):

Could not find a package configuration file provided by "LLVM" (requested

version 4.0) with any of the following names:

LLVMConfig.cmake

llvm-config.cmake

Add the installation prefix of "LLVM" to CMAKE_PREFIX_PATH or set

"LLVM_DIR" to a directory containing one of the above files.  If "LLVM"

provides a separate development package or SDK, be sure it has been

installed.

-- Configuring incomplete, errors occurred!

and then cmake succeed, but when make -j4,I will got another error,any help will be appreciated,thanks.

[ 70%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/network/url.cpp.o
[ 70%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/compress/smaz.cpp.o
[ 70%] Linking CXX executable Test
[ 71%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/compress/zlib.cpp.o
[ 71%] Linking CXX static library libfc.a
[ 72%] Building CXX object libraries/wasm-jit/Source/Programs/CMakeFiles/Disassemble.dir/Disassemble.cpp.o
Undefined symbols for architecture x86_64:
Undefined symbols for architecture x86_64:
  "typeinfo for llvm::Instruction", referenced from:
  "typeinfo for llvm::Instruction", referenced from:
      typeinfo for llvm::SelectInst in libRuntime.a(LLVMEmitIR.cpp.o)
      typeinfo for llvm::SelectInst in libRuntime.a(LLVMEmitIR.cpp.o)
  "typeinfo for llvm::RuntimeDyld::MemoryManager", referenced from:
  "typeinfo for llvm::RuntimeDyld::MemoryManager", referenced from:
      typeinfo for llvm::MCJITMemoryManager in libRuntime.a(LLVMJIT.cpp.o)
      typeinfo for llvm::MCJITMemoryManager in libRuntime.a(LLVMJIT.cpp.o)
  "typeinfo for llvm::raw_ostream", referenced from:
  "typeinfo for llvm::raw_ostream", referenced from:
      typeinfo for llvm::raw_pwrite_stream in libRuntime.a(LLVMJIT.cpp.o)
      typeinfo for llvm::raw_pwrite_stream in libRuntime.a(LLVMJIT.cpp.o)
  "typeinfo for llvm::MemoryBuffer", referenced from:
  "typeinfo for llvm::MemoryBuffer", referenced from:
      typeinfo for llvm::ObjectMemoryBuffer in libRuntime.a(LLVMJIT.cpp.o)
      typeinfo for llvm::ObjectMemoryBuffer in libRuntime.a(LLVMJIT.cpp.o)
  "typeinfo for llvm::ErrorInfoBase", referenced from:
      typeinfo for llvm::ErrorInfo<llvm::ErrorList, llvm::ErrorInfoBase> in libRuntime.a(LLVMJIT.cpp.o)
  "typeinfo for llvm::ErrorInfoBase", referenced from:
      typeinfo for llvm::ErrorInfo<llvm::ErrorList, llvm::ErrorInfoBase> in libRuntime.a(LLVMJIT.cpp.o)
  "typeinfo for llvm::JITSymbolResolver", referenced from:
  "typeinfo for llvm::JITSymbolResolver", referenced from:
      typeinfo for LLVMJIT::NullResolver in libRuntime.a(LLVMJIT.cpp.o)
      typeinfo for LLVMJIT::NullResolver in libRuntime.a(LLVMJIT.cpp.o)
  "typeinfo for llvm::RTDyldMemoryManager", referenced from:
      typeinfo for LLVMJIT::UnitMemoryManager in libRuntime.a(LLVMJIT.cpp.o)
  "typeinfo for llvm::RTDyldMemoryManager", referenced from:
      typeinfo for LLVMJIT::UnitMemoryManager in libRuntime.a(LLVMJIT.cpp.o)
  "typeinfo for llvm::CmpInst", referenced from:
  "typeinfo for llvm::CmpInst", referenced from:
      typeinfo for llvm::FCmpInst in libRuntime.a(LLVMEmitIR.cpp.o)
      typeinfo for llvm::FCmpInst in libRuntime.a(LLVMEmitIR.cpp.o)
ld: symbol(s) not found for architecture x86_64
ld: symbol(s) not found for architecture x86_64
clangclang: : error: errorlinker command failed with exit code 1 (use -v to see invocation): linker command failed with exit code 1 (use -v to see invocation)

make[2]: *** [libraries/wasm-jit/Source/Programs/Test] Error 1make[2]: *** [libraries/wasm-jit/Source/Programs/wavm] Error 1

make[1]: *** [libraries/wasm-jit/Source/Programs/CMakeFiles/Test.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [libraries/wasm-jit/Source/Programs/CMakeFiles/wavm.dir/all] Error 2
[ 72%] Linking CXX executable Disassemble
[ 72%] Built target Disassemble
[ 72%] Built target fc
make: *** [all] Error 2

@skenan
Copy link

skenan commented Jul 29, 2017

@hh3755 Which Xcode version do you use? I am not sure if it's related with the XCode. When I tried to compile, I have many problems. And upgrade the Xcode >=8.3.3 solve that.

@philsong
Copy link
Author

philsong commented Jul 30, 2017

resolved:
see my update:
http://www.jianshu.com/p/f26ee4cf1d4a

the core change:

echo "export WASM_LLVM_CONFIG=~/wasm-compiler/llvm/build/bin/llvm-config" >> ~/.zshrc

echo "export LLVM_DIR=/usr/local/Cellar/llvm/4.0.1/lib/cmake/llvm" >> ~/.zshrc

@hh3755
Copy link

hh3755 commented Jul 30, 2017

@skenan I'm using brew, not install xcode directly. And @philsong 's method worked.

After using:

brew install llvm

brew install the version of llvm@4.0.1 for me,changed the coresponding LLVM_DIR ,run the cmd like following:

export WASM_LLVM_CONFIG=~/develop/eos/environment/wasm-compiler/llvm/bin/llvm-config
export LLVM_DIR=/usr/local/Cellar/llvm/4.0.1/lib/cmake/llvm
cmake -DOPENSSL_ROOT_DIR=/usr/local/Cellar/openssl/1.0.2l -DOPENSSL_LIBRARIES=/usr/local/Cellar/openssl/1.0.2l/lib ..

Then everything went ok. Thanks everybody.

@skenan skenan mentioned this issue Jul 31, 2017
@jin-cheng-li
Copy link

cmake .. error when build eos

-- The C compiler identification is AppleClang 8.1.0.8020042
-- The CXX compiler identification is AppleClang 8.1.0.8020042
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/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: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using custom FindBoost.cmake
-- Boost version: 1.64.0
-- Found the following Boost libraries:
-- thread
-- date_time
-- system
-- filesystem
-- program_options
-- signals
-- serialization
-- chrono
-- unit_test_framework
-- context
-- locale
-- Using custom FindBoost.cmake
-- Boost version: 1.64.0
-- Found the following Boost libraries:
-- coroutine
-- Configuring Eos on OS X
-- Using WASM clang => /Users/lijincheng/wasm-compiler/llvm/bin/clang
-- Using WASM llc => /Users/lijincheng/wasm-compiler/llvm/bin/llc
-- Using WASM llvm-link => /Users/lijincheng/wasm-compiler/llvm/bin/llvm-link
-- Found Secp256k1: /usr/local/lib/libsecp256k1.a
CMake Error at /usr/local/Cellar/cmake/3.9.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find GMP (missing: GMP_LIBRARIES GMP_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.9.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:377 (_FPHSA_FAILURE_MESSAGE)
libraries/fc/CMakeModules/FindGMP.cmake:50 (find_package_handle_standard_args)
libraries/fc/CMakeLists.txt:20 (find_package)

@jin-cheng-li
Copy link

solved by: brew install gmp

@nathanielhourt
Copy link
Contributor

This issue has tracked several different errors at this point, I think, and I'm not sure if any of them are still outstanding, so I'm closing it. Open a new issue if some problems persist.

@nathanielhourt nathanielhourt reopened this Aug 1, 2017
@heifner
Copy link
Contributor

heifner commented Sep 12, 2017

This should be closed. Looks like it was reopened on accident. Closing.

@heifner heifner closed this as completed Sep 12, 2017
@facadev
Copy link

facadev commented Dec 24, 2017

Tweaking the environment variables doesn't fix the issue for me.

I tried building LLVM from source, installing llvm (v4 and v5) with brew and modifying relevant environment variables to ensure the build script finds the right LLVM, LLC, clang binaries. Neither works.

ljrprocc pushed a commit to bithacks-tech/myeosio that referenced this issue Jul 4, 2018
rename various EOS_* strings
NorseGaud pushed a commit that referenced this issue Jul 30, 2019
# This is the 1st commit message:

various improvements

# This is the commit message #2:

new hash

# This is the commit message #3:

fix for script path

# This is the commit message #4:

fixes

# This is the commit message #5:

fixes

# This is the commit message #6:

fixes

# This is the commit message #7:

fixes

# This is the commit message #8:

fixes

# This is the commit message #9:

fixes

# This is the commit message #10:

fixes

# This is the commit message #11:

fixes

# This is the commit message #12:

fixes

# This is the commit message #13:

fixes

# This is the commit message #14:

fixes

# This is the commit message #15:

fixes

# This is the commit message #16:

fixes

# This is the commit message #17:

fixes

# This is the commit message #18:

fixes

# This is the commit message #19:

fixes

# This is the commit message #20:

fixes

# This is the commit message #21:

fixes

# This is the commit message #22:

fixes

# This is the commit message #23:

fixes

# This is the commit message #24:

fixes

# This is the commit message #25:

fixes

# This is the commit message #26:

testing

# This is the commit message #27:

testing

# This is the commit message #28:

testing

# This is the commit message #29:

testing

# This is the commit message #30:

testing

# This is the commit message #31:

testing

# This is the commit message #32:

testing

# This is the commit message #33:

testing

# This is the commit message #34:

testing

# This is the commit message #35:

testing

# This is the commit message #36:

testing

# This is the commit message #37:

testing

# This is the commit message #38:

testing

# This is the commit message #39:

testing

# This is the commit message #40:

testing

# This is the commit message #41:

testing

# This is the commit message #42:

testing

# This is the commit message #43:

testing

# This is the commit message #44:

fixes

# This is the commit message #45:

fixes

# This is the commit message #46:

fixes

# This is the commit message #47:

fixes

# This is the commit message #48:

fixes

# This is the commit message #49:

fixes

# This is the commit message #50:

fixes

# This is the commit message #51:

fixes

# This is the commit message #52:

fixes

# This is the commit message #53:

fixes

# This is the commit message #54:

fixes

# This is the commit message #55:

fixes

# This is the commit message #56:

fixes

# This is the commit message #57:

fixes

# This is the commit message #58:

fixes

# This is the commit message #59:

fixes

# This is the commit message #60:

fixes

# This is the commit message #61:

fixes

# This is the commit message #62:

fixes

# This is the commit message #63:

fixes

# This is the commit message #64:

fixes

# This is the commit message #65:

fixes

# This is the commit message #66:

fixes

# This is the commit message #67:

fixes

# This is the commit message #68:

fixes

# This is the commit message #69:

fixes

# This is the commit message #70:

fixes

# This is the commit message #71:

fixes

# This is the commit message #72:

fixes

# This is the commit message #73:

fixes

# This is the commit message #74:

fixes

# This is the commit message #75:

fixes

# This is the commit message #76:

fixes

# This is the commit message #77:

fixes

# This is the commit message #78:

fixes

# This is the commit message #79:

more testing

# This is the commit message #80:

testing

# This is the commit message #81:

fixes

# This is the commit message #82:

fixes

# This is the commit message #83:

fixes

# This is the commit message #84:

fixes

# This is the commit message #85:

fixes

# This is the commit message #86:

fixes

# This is the commit message #87:

fixes

# This is the commit message #88:

fixes

# This is the commit message #89:

fixes

# This is the commit message #90:

fixes

# This is the commit message #91:

fixes

# This is the commit message #92:

fixes

# This is the commit message #93:

propagate-environment for buildkite-agent

# This is the commit message #94:

propagate-environment for buildkite-agent

# This is the commit message #95:

propagate-environment for buildkite-agent

# This is the commit message #96:

propagate-environment for buildkite-agent

# This is the commit message #97:

fixes

# This is the commit message #98:

fixes

# This is the commit message #99:

fixes

# This is the commit message #100:

fixes

# This is the commit message #101:

fixes

# This is the commit message #102:

fixes

# This is the commit message #103:

fixes

# This is the commit message #104:

fixes

# This is the commit message #105:

fixes

# This is the commit message #106:

fixes

# This is the commit message #107:

fixes

# This is the commit message #108:

fixes

# This is the commit message #109:

fixes

# This is the commit message #110:

fixes

# This is the commit message #111:

fixes

# This is the commit message #112:

fixes

# This is the commit message #113:

fixes

# This is the commit message #114:

fixes

# This is the commit message #115:

fixes

# This is the commit message #116:

fixes

# This is the commit message #117:

fixes

# This is the commit message #118:

fixes

# This is the commit message #119:

fixes

# This is the commit message #120:

fixes

# This is the commit message #121:

fixes

# This is the commit message #122:

fixes

# This is the commit message #123:

fixes

# This is the commit message #124:

fixes

# This is the commit message #125:

fixes

# This is the commit message #126:

fixes

# This is the commit message #127:

fixes

# This is the commit message #128:

fixes

# This is the commit message #129:

fixes

# This is the commit message #130:

fixes

# This is the commit message #131:

fixes

# This is the commit message #132:

fixes

# This is the commit message #133:

fixes

# This is the commit message #134:

fixes

# This is the commit message #135:

fixes

# This is the commit message #136:

fixes

# This is the commit message #137:

fixes

# This is the commit message #138:

fixes

# This is the commit message #139:

fixes

# This is the commit message #140:

fixes

# This is the commit message #141:

fixes

# This is the commit message #142:

fixes

# This is the commit message #143:

fixes

# This is the commit message #144:

fixes

# This is the commit message #145:

fixes

# This is the commit message #146:

fixes

# This is the commit message #147:

fixes

# This is the commit message #148:

fixes

# This is the commit message #149:

fixes

# This is the commit message #150:

fixes

# This is the commit message #151:

fixes

# This is the commit message #152:

fixes

# This is the commit message #153:

testing

# This is the commit message #154:

fixes

# This is the commit message #155:

fixes

# This is the commit message #156:

fixes

# This is the commit message #157:

fixes

# This is the commit message #158:

fixes

# This is the commit message #159:

fixes

# This is the commit message #160:

fixes

# This is the commit message #161:

fixes

# This is the commit message #162:

fixes

# This is the commit message #163:

fixes

# This is the commit message #164:

fixes

# This is the commit message #165:

fixes

# This is the commit message #166:

fixes

# This is the commit message #167:

fixes

# This is the commit message #168:

fixes

# This is the commit message #169:

fixes

# This is the commit message #170:

fixes

# This is the commit message #171:

fixes

# This is the commit message #172:

fixes

# This is the commit message #173:

fixes

# This is the commit message #174:

fixes

# This is the commit message #175:

fixes

# This is the commit message #176:

fixes

# This is the commit message #177:

fixes

# This is the commit message #178:

fixes

# This is the commit message #179:

fixes

# This is the commit message #180:

fixes

# This is the commit message #181:

fixes

# This is the commit message #182:

fixes

# This is the commit message #183:

fixes

# This is the commit message #184:

fixes

# This is the commit message #185:

fixes

# This is the commit message #186:

fixes
cc32d9 pushed a commit to eos-amsterdam-rnd/wax2.0 that referenced this issue May 22, 2022
…y-2.0

Configurable subjective account decay time - 2.0
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

7 participants