Giter VIP home page Giter VIP logo

docker-build-ghc-android's Introduction

#docker-build-ghc-android

This package contains a Dockerfile and associated scripts to build a GHC 8.0.1 cross compiler targeting the ARM architecture. Big thanks go out neuroctye for the original build script and joeyh for additional changes.

You will see some errors in the standard output, some that even look like they might be fatal. Stay strong and wait. It will build to the end. If it doesn't please contact me.

Installation

Please build with at least Docker version 1.6. Check with docker version.

Once you've done that then:

$ make

This will generate the Dockerfile from Dockerfile.in and configuration options in the Makefile, and then run docker build.

Running

You'll want to run the image inside an interactive shell. At the end of the build it will tell you the image ID of the final image.

$ docker run -it bash

Motivation

This build script takes between 1 - 2 hours to run. It installs several packages, some that require patches to make them work with Android. Developing a build script with this many dependencies is a nightmare.

You can only be sure your script really works if you run it on a pristine environment. But when your script breaks after 50 minutes it is just the sort of thing that can make you want to consider changing careers, especially if it happens a few times in a row. Development is made so much easier with quick turn-around times.

The fantastic thing about Docker is that it effectively takes a snapshot of the entire file system after each Dockerfile command allowing you to return to that known state and try again.

Docker is great because:

  1. It helped me. This script was developed much more quickly than it otherwise would have been. Because of how Docker works I had the confidence that it would build from a pristine environment once I had successfully built it the first time.

  2. It will help you. This script will inevitably succumb to bitrot. It may fail but when it does you will not have to go all the way back to the beginning. You can make a change to one of the many mini-scripts in the user-scripts/ directory and try again from the point of failure.

More information

For more information read Sean Seefried's blog post.

docker-build-ghc-android's People

Contributors

iphydf avatar joranvar avatar seanparsons avatar

Watchers

 avatar  avatar  avatar

Forkers

joranvar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.