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

eos build error(Undefined symbols for architecture x86_64) on mac Sierra 10.12.6 #1319

Closed
border opened this issue Feb 6, 2018 · 19 comments
Closed

Comments

@border
Copy link

border commented Feb 6, 2018

build with "./eosio-build.sh darwin"

[ 44%] Building CXX object libraries/wasm-jit/Source/Programs/CMakeFiles/Test.dir/Test.cpp.o
[ 45%] 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-4.0: 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[1]: *** Waiting for unfinished jobs....
[ 46%] Linking CXX executable Test
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-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libraries/wasm-jit/Source/Programs/Test] Error 1
make[1]: *** [libraries/wasm-jit/Source/Programs/CMakeFiles/Test.dir/all] Error 2
~/work/eos(master ✗) uname -an
Darwin kvbianMBP 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
@zhouyasong
Copy link

same problem.Have you solved the problem?

@pacificcode
Copy link
Contributor

Try pulling in the latest code from the repo and building from eosio_build.sh,
also run:
llvm-config --has-rtti
if the result = "NO" then that is the problem. You will need to remove your install of llvm/clang and re-install.

@beeant
Copy link

beeant commented Apr 1, 2018

having the same problem

@hoopslb
Copy link

hoopslb commented May 3, 2018

llvm-config --has-rtti --version
YES
4.0.1

@pacificcode pacificcode self-assigned this May 3, 2018
@pacificcode
Copy link
Contributor

@hoopslb @beeant @zhouyasong This issue is pretty old but not forgotten.
The code base is pretty stable now.
I recommend:
cd /path/to/eos
rm -rf build/
git pull
git submodule update --init --recursive
./eosio_build.sh

Save the output of the script and put it here if you run into any issues.

@schabluk
Copy link

schabluk commented May 7, 2018

Hi, same issue here with recent version. I'm running High Sierra 10.13.4.

ld: warning: ignoring file /usr/local/lib/libintl.dylib, missing required architecture x86_64 in file /usr/local/lib/libintl.dylib (2 slices)
Undefined symbols for architecture x86_64:
  "_libintl_bindtextdomain", referenced from:
      _main in main.cpp.o
  "_libintl_gettext", referenced from:
      eosio::client::localize::localized_with_variant(char const*, fc::variant_object const&) in main.cpp.o
      eosio::client::localize::localized_with_variant(char const*, fc::variant_object const&) in help_text.cpp.o
  "_libintl_setlocale", referenced from:
      _main in main.cpp.o
  "_libintl_textdomain", referenced from:
      _main in main.cpp.o
ld: symbol(s) not found for architecture x86_64
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [programs/cleos/cleos] Error 1
make[1]: *** [programs/cleos/CMakeFiles/cleos.dir/all] Error 2
$ llvm-config --has-rtti --version
YES
4.0.1

@69736c616d
Copy link

++ same problem at macOS High Sierra 10.13.4 (17E202)

[ 74%] Building LLVM bitcode simple.token.cpp.bc
Undefined symbols for architecture x86_64:
"typeinfo for llvm::Instruction", referenced from:
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::SelectInst in libRuntime.a(LLVMEmitIR.cpp.o)
"typeinfo for llvm::MemoryBuffer", referenced from:
typeinfo for llvm::ObjectMemoryBuffer 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::JITSymbolResolver", referenced from:
typeinfo for LLVMJIT::NullResolver 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::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)
"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
ld: symbol(s) not found for architecture x86_64
clangclang: : error: linker command failed with exit code 1 (use -v to see invocation)error:

@pacificcode
Copy link
Contributor

pacificcode commented May 12, 2018

@69736c616d I need to see the full output of the eosio_build.sh script. Can you run the following and post the eosio_build.log file here?
brew remove --force llvm
brew install llvm@4
brew unlink llvm@4 && brew link --force llvm@4
cd /path/to/eos
rm -rf build/
git pull
git submodule update --init --recursive
./eosio_build.sh > eosio_build.log

@69736c616d
Copy link

here it is output of
./eosio_build.sh &2> eosio_build.log
eosio_build.log

eosio_build.log

@pacificcode
Copy link
Contributor

@schabluk your issue is brew not symlinking gettext properly, you can find your solution here:
#2028

@69736c616d one more, can you run the following and paste the output here?
which llvm-config
llvm-config --has-rtti --version
llc --version

@69736c616d
Copy link

69736c616d commented May 13, 2018

#2028 didnt work for me.

which llvm-config : /usr/local/bin/llvm-config

llvm-config --has-rtti --version
YES
4.0.1

llc --version
LLVM (http://llvm.org/):
LLVM version 4.0.1
Optimized build.
Default target: x86_64-apple-darwin17.5.0
Host CPU: sandybridge

Registered Targets:
aarch64 - AArch64 (little endian)
aarch64_be - AArch64 (big endian)
amdgcn - AMD GCN GPUs
arm - ARM
arm64 - ARM64 (little endian)
armeb - ARM (big endian)
bpf - BPF (host endian)
bpfeb - BPF (big endian)
bpfel - BPF (little endian)
hexagon - Hexagon
lanai - Lanai
mips - Mips
mips64 - Mips64 [experimental]
mips64el - Mips64el [experimental]
mipsel - Mipsel
msp430 - MSP430 [experimental]
nvptx - NVIDIA PTX 32-bit
nvptx64 - NVIDIA PTX 64-bit
ppc32 - PowerPC 32
ppc64 - PowerPC 64
ppc64le - PowerPC 64 LE
r600 - AMD GPUs HD2XXX-HD6XXX
riscv32 - 32-bit RISC-V
riscv64 - 64-bit RISC-V
sparc - Sparc
sparcel - Sparc LE
sparcv9 - Sparc V9
systemz - SystemZ
thumb - Thumb
thumbeb - Thumb (big endian)
x86 - 32-bit X86: Pentium-Pro and above
x86-64 - 64-bit X86: EM64T and AMD64
xcore - XCore

@69736c616d
Copy link

no more build error after latest commits.

@pacificcode
Copy link
Contributor

@69736c616d Great!

@prolands
Copy link

I having the same issue on master branch
Undefined symbols for architecture x86_64:
"_libintl_bindtextdomain", referenced from:
_main in main.cpp.o
"_libintl_gettext", referenced from:
eosio::client::localize::localized_with_variant(char const*, fc::variant_object const&) in main.cpp.o
eosio::client::localize::localized_with_variant(char const*, fc::variant_object const&) in help_text.cpp.o
"_libintl_setlocale", referenced from:
_main in main.cpp.o
"_libintl_textdomain", referenced from:
_main in main.cpp.o
ld: symbol(s) not found for architecture x86_64
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [programs/cleos/cleos] Error 1
make[1]: *** [programs/cleos/CMakeFiles/cleos.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 98%] Building CXX object unittests/CMakeFiles/unit_test.dir/multi_index_tests.cpp.o
[ 98%] Building CXX object unittests/CMakeFiles/unit_test.dir/multisig_tests.cpp.o
[ 98%] Building CXX object unittests/CMakeFiles/unit_test.dir/payloadless_tests.cpp.o
[ 98%] Building CXX object unittests/CMakeFiles/unit_test.dir/producer_schedule_tests.cpp.o
[ 98%] Building CXX object unittests/CMakeFiles/unit_test.dir/ram_tests.cpp.o
[ 98%] Building CXX object unittests/CMakeFiles/unit_test.dir/resource_limits_test.cpp.o
[ 98%] Building CXX object unittests/CMakeFiles/unit_test.dir/special_accounts_tests.cpp.o
[ 98%] Building CXX object unittests/CMakeFiles/unit_test.dir/tic_tac_toe_tests.cpp.o
[ 98%] Building CXX object unittests/CMakeFiles/unit_test.dir/wasm_tests.cpp.o
[ 98%] Building CXX object unittests/CMakeFiles/unit_test.dir/whitelist_blacklist_tests.cpp.o
[ 98%] Linking CXX executable unit_test
[ 98%] Built target unit_test
make: *** [all] Error 2

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

@lux1992
Copy link

lux1992 commented Aug 26, 2018

@prolands getting same error on master

@JackDiSalvatore
Copy link

I am on mac and still get this error after trying the above steps. I tried v1.1.2 and v.1.1.6 no luck

@ecavalcanti
Copy link

+1

1 similar comment
@PierreLeduc
Copy link

+1

@thaonguyentien
Copy link

in my mac seirra, reinstalling gettext helped.
brew reinstall gettext brew unlink gettext && brew link gettext --force --overwrite

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