Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Halide on Cent OS 7 #3290

Closed
Siddartha-0724 opened this issue Sep 27, 2018 · 5 comments
Closed

Halide on Cent OS 7 #3290

Siddartha-0724 opened this issue Sep 27, 2018 · 5 comments

Comments

@Siddartha-0724
Copy link

Siddartha-0724 commented Sep 27, 2018

Hello,

I'm trying to build the latest Halide from source on my CentOS 7 (64bit) with the following dependency versions:

gcc: 7.3.0
g++: 7.3.0
clang: 5.0.2 (branches/release_50 342946)
llvm: 5.0.2

This is the error I faced:

bin/libHalide.so: undefined reference to `llvm::TargetRegistry::lookupTarget(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
bin/libHalide.so: undefined reference to `llvm::RTDyldMemoryManager::getSymbolAddressInProcess(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
bin/libHalide.so: undefined reference to `llvm::sys::DynamicLibrary::getPermanentLibrary(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
bin/libHalide.so: undefined reference to `llvm::SectionMemoryManager::finalizeMemory(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
bin/libHalide.so: undefined reference to `llvm::RTDyldMemoryManager::getPointerToNamedFunction(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
collect2: error: ld returned 1 exit status
make: *** [bin/test_internal] Error 1

I saw this similar issue: #1243
But I already have -std=c++11

I also saw this: #2532 and tried -D _GLIBCXX_USE_CXX11_ABI=0, but that in-turn gave me the error mentioned in the issue.

Any ideas on how to proceed??

@Siddartha-0724
Copy link
Author

The issue is solved by adding -D_GLIBCXX_USE_CXX11_ABI=0 in the required location of MAKEFILE.

@GokulNC
Copy link

GokulNC commented Sep 27, 2018

For all those who are facing this issue:

To be precise, we have to append -D_GLIBCXX_USE_CXX11_ABI=0 to the variables LLVM_CXX_FLAGS, CXX_FLAGS and TEST_CXX_FLAGS in the Makefile

@zjgirl
Copy link

zjgirl commented Oct 18, 2018

can you make it clear? Does it right to set like LLVM_CXX_FLAGS += -D_GLIBCXX_USE_CXX11_ABI=0 ?

@zendevil
Copy link

I'm getting the same error after appending to these variables.

@sajid-mohamed
Copy link

The issue is solved by adding -D_GLIBCXX_USE_CXX11_ABI=0 in the required location of MAKEFILE.

Would you be kind enough to specify where is the required location?
I am facing the same error even after appending -D_GLIBCXX_USE_CXX11_ABI=0 to the variables LLVM_CXX_FLAGS, CXX_FLAGS and TEST_CXX_FLAGS in the Makefile

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants