Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Failed to build on Arm64 Ubuntu 20.04 #88

Open
bpecsek opened this issue Mar 23, 2021 · 1 comment
Open

Failed to build on Arm64 Ubuntu 20.04 #88

bpecsek opened this issue Mar 23, 2021 · 1 comment

Comments

@bpecsek
Copy link

bpecsek commented Mar 23, 2021

I am trying to build c2ffi on an Arm64 Ubuntu 20.04 running under Parallel Desktop on an M1 MacBook Air

I am getting this error at the linking phase:
[ 7%] Linking CXX executable bin/c2ffi
/usr/bin/ld: CMakeFiles/c2ffi.dir/src/Expr.cpp.o: in function macro_type(clang::CompilerInstance&, clang::Preprocessor&, char const*, clang::MacroInfo const*, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*)': Expr.cpp:(.text+0x54c): undefined reference to clang::NumericLiteralParser::NumericLiteralParser(llvm::StringRef, clang::SourceLocation, clang::SourceManager const&, clang::LangOptions const&, clang::TargetInfo const&, clang::DiagnosticsEngine&)'
/usr/bin/ld: CMakeFiles/c2ffi.dir/src/c2ffi.cpp.o: in function main': c2ffi.cpp:(.text.startup+0x240): undefined reference to clang::SourceManager::createFileID(clang::FileEntry const*, clang::SourceLocation, clang::SrcMgr::CharacteristicKind, int, unsigned int)'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/c2ffi.dir/build.make:270: bin/c2ffi] Error 1
make[1]: *** [CMakeFiles/Makefile2:99: CMakeFiles/c2ffi.dir/all] Error 2
make: *** [Makefile:149: all] Error 2

@bpecsek bpecsek changed the title Failed to buijd on Arm64 Ubuntu 20.04 Failed to build on Arm64 Ubuntu 20.04 Mar 23, 2021
@rpav
Copy link
Owner

rpav commented Mar 24, 2021

Unfortunately I don't have access to the platform or resources necessary to test or fix this.

It's possible linking additional libraries could fix this; however this must be fixed carefully. Ideally one should include additional options from the LLVM package.

PRs should make sure not to break other platforms, and ideally add CI for the desired platform.

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

No branches or pull requests

2 participants