Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

doesn't build on ubuntu 18.04 #3

Closed
shrouxm opened this issue Aug 18, 2020 · 4 comments
Closed

doesn't build on ubuntu 18.04 #3

shrouxm opened this issue Aug 18, 2020 · 4 comments
Assignees
Labels
bug Something isn't working team/code-intelligence
Milestone

Comments

@shrouxm
Copy link
Contributor

shrouxm commented Aug 18, 2020

after successfully configuring the project, running make yields the following errors

CMakeFiles/lsif-clang.dir/IndexerMain.cpp.o:(.data.rel.ro._ZTIN4llvm2cl15OptionValueCopyINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE[_ZTIN4llvm2cl15OptionValueCopyINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE]+0x10): undefined reference to `typeinfo for llvm::cl::GenericOptionValue'
CMakeFiles/lsif-clang.dir/IndexerMain.cpp.o:(.data.rel.ro+0x10): undefined reference to `typeinfo for clang::tooling::FrontendActionFactory'
../libclangDaemonFork.a(IndexAction.cpp.o):(.data.rel.ro+0x10): undefined reference to `typeinfo for clang::PPCallbacks'
../libclangDaemonFork.a(IndexAction.cpp.o):(.data.rel.ro+0x28): undefined reference to `typeinfo for clang::ASTFrontendAction'
../libclangDaemonFork.a(SourceCode.cpp.o):(.data.rel.ro._ZTIN4llvm13FormatAdapterINS_5ErrorEEE[_ZTIN4llvm13FormatAdapterINS_5ErrorEEE]+0x10): undefined reference to `typeinfo for llvm::detail::format_adapter'
../libclangDaemonFork.a(SourceCode.cpp.o):(.data.rel.ro._ZTIN4llvm6detail23provider_format_adapterIRiEE[_ZTIN4llvm6detail23provider_format_adapterIRiEE]+0x10): undefined reference to `typeinfo for llvm::detail::format_adapter'
../libclangDaemonFork.a(SourceCode.cpp.o):(.data.rel.ro._ZTIN4llvm6detail30stream_operator_format_adapterIN5clang6clangd14OffsetEncodingEEE[_ZTIN4llvm6detail30stream_operator_format_adapterIN5clang6clangd14OffsetEncodingEEE]+0x10): undefined reference to `typeinfo for llvm::detail::format_adapter'
../libclangDaemonFork.a(SourceCode.cpp.o):(.data.rel.ro._ZTIN4llvm6detail23provider_format_adapterIRNS_11SmallStringILj128EEEEE[_ZTIN4llvm6detail23provider_format_adapterIRNS_11SmallStringILj128EEEEE]+0x10): undefined reference to `typeinfo for llvm::detail::format_adapter'
../libclangDaemonFork.a(SourceCode.cpp.o):(.data.rel.ro._ZTIN4llvm6detail23provider_format_adapterINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE[_ZTIN4llvm6detail23provider_format_adapterINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE]+0x10): undefined reference to `typeinfo for llvm::detail::format_adapter'
../libclangDaemonFork.a(SourceCode.cpp.o):(.data.rel.ro._ZTIN4llvm6detail23provider_format_adapterIRNS_9StringRefEEE[_ZTIN4llvm6detail23provider_format_adapterIRNS_9StringRefEEE]+0x10): more undefined references to `typeinfo for llvm::detail::format_adapter' follow
../libclangDaemonFork.a(FuzzyMatch.cpp.o):(.data.rel.ro._ZTIN4llvm13format_objectIJiEEE[_ZTIN4llvm13format_objectIJiEEE]+0x10): undefined reference to `typeinfo for llvm::format_object_base'
../libclangDaemonFork.a(FuzzyMatch.cpp.o):(.data.rel.ro._ZTIN4llvm13format_objectIJicEEE[_ZTIN4llvm13format_objectIJicEEE]+0x10): undefined reference to `typeinfo for llvm::format_object_base'
../libclangDaemonFork.a(Logger.cpp.o):(.data.rel.ro._ZTIN4llvm6detail23provider_format_adapterIcEE[_ZTIN4llvm6detail23provider_format_adapterIcEE]+0x10): undefined reference to `typeinfo for llvm::detail::format_adapter'
../libclangDaemonFork.a(Logger.cpp.o):(.data.rel.ro._ZTIN4llvm6detail23provider_format_adapterIRNSt6chrono10time_pointINS2_3_V212system_clockENS2_8durationIlSt5ratioILl1ELl1000000000EEEEEEEE[_ZTIN4llvm6detail23provider_format_adapterIRNSt6chrono10time_pointINS2_3_V212system_clockENS2_8durationIlSt5ratioILl1ELl1000000000EEEEEEEE]+0x10): undefined reference to `typeinfo for llvm::detail::format_adapter'
../libclangDaemonFork.a(Logger.cpp.o):(.data.rel.ro._ZTIN4llvm6detail30stream_operator_format_adapterIRKNS_19formatv_object_baseEEE[_ZTIN4llvm6detail30stream_operator_format_adapterIRKNS_19formatv_object_baseEEE]+0x10): undefined reference to `typeinfo for llvm::detail::format_adapter'
../libclangDaemonFork.a(URI.cpp.o):(.data.rel.ro._ZTIN4llvm6detail23provider_format_adapterIRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE[_ZTIN4llvm6detail23provider_format_adapterIRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE]+0x10): undefined reference to `typeinfo for llvm::detail::format_adapter'
../libclangDaemonFork.a(CanonicalIncludes.cpp.o):(.data.rel.ro+0x10): undefined reference to `typeinfo for clang::CommentHandler'
../libclangDaemonFork.a(Headers.cpp.o):(.data.rel.ro+0x10): undefined reference to `typeinfo for clang::PPCallbacks'
collect2: error: ld returned 1 exit status
indexer/CMakeFiles/lsif-clang.dir/build.make:146: recipe for target 'bin/lsif-clang' failed
make[2]: *** [bin/lsif-clang] Error 1
CMakeFiles/Makefile2:197: recipe for target 'indexer/CMakeFiles/lsif-clang.dir/all' failed
make[1]: *** [indexer/CMakeFiles/lsif-clang.dir/all] Error 2
Makefile:148: recipe for target 'all' failed
make: *** [all] Error 2

i was unable to reproduce this on a fresh ubuntu 18.04 docker image, waiting on user to provide more environment information

@shrouxm shrouxm added this to the Backlog milestone Aug 18, 2020
@shrouxm shrouxm self-assigned this Aug 18, 2020
@aidaeology aidaeology added the bug Something isn't working label Aug 29, 2020
@aidaeology aidaeology modified the milestones: Backlog, 3.20 Aug 29, 2020
@aidaeology
Copy link

aidaeology commented Sep 24, 2020

@gbrik What is the status of this issue, was this resolved with the 3.20 milestone or does it still need work? If it's resolved and longer a problem then please mark as closed and link the relevant PR. Otherwise please provide a status update here on what the remaining work is to get it resolved.

@shrouxm
Copy link
Contributor Author

shrouxm commented Sep 28, 2020

Remaining work is confirming with @beyang whether this is still an issue and, if so, getting more detailed information about the build environment & steps to determine what is causing the issue.

@beyang
Copy link
Member

beyang commented Sep 29, 2020

I futzed around a lot with my clang installation today and got it to work. I don't have exact repro steps on how I resolved the issue, but it had something to do with the fact that my original clang installation was missing a bunch of header files (including the ones containing the definitions for the undefined references in the stack trace). After uninstalling, manually cleaning a bunch of old directories that apt remove failed to remove, and then reinstalling using the current instructions, the build worked, and I've successfully run lsif-clang on itself.

I will try to replicate inside a clean Ubuntu 18.04 container, but consider me unblocked and thanks for looking into this.

@shrouxm
Copy link
Contributor Author

shrouxm commented Oct 1, 2020

closing for now, we can re-open if this crops up again

@shrouxm shrouxm closed this as completed Oct 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working team/code-intelligence
Projects
None yet
Development

No branches or pull requests

3 participants