Closed varungandhi-src closed 2 years ago
The problem with this "just working" is because the current build uses dynamic linking as far as I can tell. One one hand, this has the benefit that it speeds up iteration time. On the other hand, this means we can't just provide a binary directly. We need to somehow force the build to link everything statically.
I tried to get static building to work and gave up fighting the CMake shared library interface linking patterns. That resulted in #78 which simply creates a folder with the binary and all the shared libraries it needs together.
Closing this since the core pain point around being able to use a self-contained package should be resolved by #83.
(Please feel free to flag this again if the existing solution is not good enough.)
My personal definition of done for this issue is:
User can download a release from the releases page and run the tool.
This would enable you to re-write the main "Indexing a C++ repository with LSIF" to not say "get your code to build in this new and arbitrary environment". And instead say the simpler:
- download these tools
- generate a compile_commands.json
- use the tools to generate an index and upload
My personal use cases were done as soon as I put up #78 (eventually merged as https://github.com/sourcegraph/lsif-clang/pull/83)
A good middle ground would be updating both those docs and the docs for the repository to mention this method of building a package so that anyone who wants to can build one.
Closing this now; the docs PR to the main Sourcegraph repo should be merged soon.
Using Docker seems like a heavy-weight solution. It'd be nice to provide a pre-built binary which people can use.
(based on a conversation with a customer)