Skip to content

Instantly share code, notes, and snippets.

@meatballhat
Created October 5, 2016 01:12
Show Gist options
  • Save meatballhat/24797f3ff3fed73a79c45558c32a7a14 to your computer and use it in GitHub Desktop.
Save meatballhat/24797f3ff3fed73a79c45558c32a7a14 to your computer and use it in GitHub Desktop.
Travis C++ environment discussion

(originally from @cbeck88 on travis-ci/packer-templates#297 (comment))

Hi, I saw a link to here from travis-ci/travis-ci#6300

At the risk of suggesting something without fully understanding it, let me ask a question about travis "community cookbooks" which I saw here: https://github.com/travis-ci/travis-cookbooks/tree/master/community-cookbooks

It appears to me that some languages have extra cookbooks here, like java, php, and I dimly remember ghc (haskell) being here also when I looked at it first, although I don't see that now.

Would it be helpful if there were community-maintained cookbooks for various versions of gcc / clang? The idea would be to follow gcc / clang dev instructions to build from source, and not link to system standard library like e.g. debian packages do, but an independent instance in home directory. Getting a C++11 conforming standard library is one of the biggest ticket items I would say for C++ support.

Some aspects of how travis-ci works that aren't clear to me:

  • Relation between image and the cookbooks -- presumably some cookbooks get pre-installed in the images, and others are meant to run afterwards as part of your build. Is this correct?
  • How are these community-maintained cookbooks invoked in an actual build? Do they get triggered by language: python, language: java, etc.?
  • Is it plausible that a community-maintained cookbook could become part of an image template, or do you only want real debian packages to become part of an image template?
@meatballhat
Copy link
Author

meatballhat commented Oct 5, 2016

Would it be helpful if there were community-maintained cookbooks for various versions of gcc / clang?

Maybe. My strong preference is to import as little as possible into the ./community-cookbooks tree.

If the goal is to have toolchains prefixed at or under $HOME that are not linked to the system stdlib, then I think this may be a reasonable fit for the way we build and "install" things like erlang, python, and php versions into $HOME. I can explain further in an additional file on this gist. Interested in pursuing that?

@cbeck88
Copy link

cbeck88 commented Oct 5, 2016

Yeah, tell me more :D

I should mention though, I believe that right now I don't know enough about chef to create a cookbook for something like gcc -- I have built it from source a few times, also for cross compilers, and I have done things like create homebrew recipes for things. But as I look into it I think I would need to work through a number of chef tutorials and such before beginning a project like that -- chef appears to be much more heavy-duty than homebrew. So while in principle I'm interested in pursuing it, I'm as much interested in feeling out what is involved and what travis-ci team actually would want.

@meatballhat
Copy link
Author

I should have been more clear that I don't expect you to do all the work! 😸. I'll get a file added to this gist that describes the high level components that I think will be needed 🔜

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