microsoft / service-fabric

Service Fabric is a distributed systems platform for packaging, deploying, and managing stateless and stateful distributed applications and containers at large scale.
https://docs.microsoft.com/en-us/azure/service-fabric/
MIT License
3.03k stars 399 forks source link

Why build clang/llvm rather than from debian pkg? #58

Closed drnic closed 6 years ago

drnic commented 6 years ago
Building and installing clang...
Cloning into '/src/prod/tools/linux/third-party/../../../../..//deps/third-party/src/clang'...

Are there special features in your clang/llvm/other third-party deps source? Or can we switch to quickly pulling down the pre-built apt-get install clang-5.0 lldb-5.0 from http://apt.llvm.org/ ?

Perhaps can we move to submodules so to formalize/make explicit the dependency on these git branches? e.g. https://github.com/Microsoft/service-fabric/issues/53

bpm-ms commented 6 years ago

See my comments in #55. If you notice in src/prod/tools/Linux/third-party/clang.sh we actually don't pull from upstream clang. We have some necessary fixes to clang that aren't present in the pre-built packages you get from apt-get.

bpm-ms commented 6 years ago

Building from source -- especially for clang is really annoying, and I think it's a contribution barrier for first timers. Note that you only have to build once so the long build time only affects clean builds. Still really annoying. I've been trying vto figure out a good solution to distribute pre-built binaries with out modifications.. but haven't found a satisfactory solution. I think clang is the only one that really takes a long time to build, and we are working on getting our patch into the upstream, so once that happens this might be less of an issue.

anmolah commented 6 years ago

There is a plan to move to 5.0 which is being worked on. @bpm-ms if there is no issue tracking that on github we can use this one to track that work ?

bpm-ms commented 6 years ago

I do like the idea of moving to submodules to make our dependencies more explicit. I don't think the script is very robust. I'll see if I can think about any serious concerns with that module and open up conversation on your other issue!

drnic commented 6 years ago

Thanks for the answers. I'm sorry - I normally write issues as I think of questions but try to answer them myself before pressing "Create". I saw the branches. Yeah I'm seeing the clang build time issue. I'll have a look at building some intermediate docker images via CI and submit some PRs back so you can build them + host them yourself. I'll close this ticket.

bpm-ms commented 6 years ago

@drnic Not a problem! I am really grateful to see where things are confusing, and where people are having trouble. I often completely miss usability issues because I already know how to use the existing tooling, so it can be difficult to catch these misunderstandings without someone new hitting them and documenting them.

We actually were hosting a docker image prebuilt with clang, but we removed it due to potential licensing issues, in addition to that, some people were expressing concern that it could be hard to contribute fixes / modify the 3rd party dependencies if they were prebuilt into the container. So for example, if you wanted to modify code relating to our integration of the "Babeltrace" dependency, you wouldn't have an easy way to do that.

Before working on the intermediate docker image / CI system, can you open a discussion / issue so we can make sure all the requirements are met? I'd hate to have you put in a bunch of work only to find out we can't use what you did because of a reason that wasn't initially clear (such as licensing issues)