Skip to content

Conversation

@cincodenada
Copy link

@cincodenada cincodenada commented Jul 19, 2019

This isn't a real mergeable PR cause it's not to the master branch and there's still some finishing to do (there's a hardcoded version, for instance), but it serves to show the changes to get building with a Docker build.

The basic overview is that the build now no longer directly builds anything, it just uses Folly's docker build to do so. This means the make dependencies are pretty flimsy (e.g. changing files in the repo won't cause a rebuild), but that seems fine for this use case.

The process in a little more detail:

  1. fbcode_builder/make_docker_context.py to generate the Dockerfile and tar up the local repo, using our modified fbcode_builder_config.py to make it a Release build
  2. docker build that Dockerfile to build Folly
  3. Do a dance to extract the build files from the docker container into our build directory
  4. Spin up our own docker with just FPM in it, and use it to build the package

I ran apt-get remove cdx-folly in my build env and then installed the deb this docker build spits out, and Newzinter built fine. Appserver is a different story with all its static linking, I'm not sure where to start there.

Is this worth the complexity?
Bamboo's old docker can't handle dockerfiles not in the build context
It may have been messing up Bamboo?
This should be fine to maintain directly? We could also copy it out
somewhere
This allows us to run docker-bash after a failed test run
The former because the default is gnu++1z which is good enough and c++17
broke some test, and the latter because it's not supported in the
version of CMake being used and isn't critical
So we at least don't use constantly expanding tmp space
@suspend0
Copy link

Shouldn't this be in openmix2.0/deps/folly?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants