Ubuntu arm and tizen armel build on Docker
Steps to reproduce
./cross/build-rootfs.sh arm
./build.sh --docker ubuntu.16.04 --env-vars "DISABLE_CROSSGEN=1,TARGETPLATFORM=arm,TARGETRID=ubuntu.16.04-arm,CROSS=1,ROOTFS_DIR=/opt/code/cross/rootfs/arm"
Expected behavior
Successful building core-setup
Actual behavior
- Disappears the required arguments
./build.sh --docker ubuntu.16.04 --env-vars "DISABLE_CROSSGEN=1,TARGETPLATFORM=arm,TARGETRID=ubuntu.16.04-arm,CROSS=1,ROOTFS_DIR=/opt/code/cross/rootfs/arm"
->
Argumtens~~~~:--env-vars DISABLE_CROSSGEN=1,TARGETPLATFORM=arm,TARGETRID=-arm,CROSS=1,ROOTFS_DIR=/opt/code/cross/rootfs/arm
- The lack of cross build toolchain (binutils-arm-linux-gnueabihf)
/usr/bin/ld: unrecognised emulation mode: armelf_linux_eabi
/cc @hqueue @hseok-oh @gkhanna79
I used the exisiting Ubuntu Dockerfile for building Ubuntu ARM. If you want to create Dockerfile for Ubuntu ARM in a seperate file, please let me know.
@jyoungyun Although size of each image can be larger than before, I think it would be desirable to have a few docker image for maintanance. Therefore I prefer updating existing Ubuntu image as your PR.
@jyoungyun Are you doing this to enable CI support, as done for https://github.com/dotnet/core-setup/blob/master/netci.groovy#L42?
@gkhanna79 Not determined yet. We are trying to make use of docker for local build as well as for CI and try to evaluate any possible choices when considering clang version and structure of CI.
@hqueue In that case, once your investigations have determined the option you wish to pursue, do let me know as I would like to ensure there is a single place for Docker images that can be used across the board.
@gkhanna79 Sure, I will let you know when investigation is done. And glad to hear that there is a single place for Docker images. We also hope that we can make use of same Docker image across Core-Setup, CoreClr, and CoreFx, if we decided to use Docker.
I mentioned it on one of the PRs from @jyoungyun - for Ubuntu 1404, try chcosta/dotnetcore:ubuntu1404_cross_prereqs_v1 and for 1604, try chcosta/dotnetcore:ubuntu1604_cross_prereqs_v1 docker images.
@gkhanna79 As I know, the release processing of core-setup have used docker image, so I wanna test it whether it works well in docker too. Until now, I have only tested local build, not using docker. Then I was faced a little issue like dotnet/core-setup#1401 and to use the exisiting docker image, we need to install ARM cross toolchain. Even though we may not use this docker image in ARM CI, I think the ARM cross toolchain should be installed for other Linux ARM developers in no matter where the exisiting docker image or the seperated docker image for Linux ARM is.
@gkhanna79 Do we have to make ARM CI core-setup, CoreCLR and CoreFX the exactly same? No matter how I think, in case of core-setup, it is better to use the existing routine. In the case of Ubuntu ARM on the netci.groovy side, it is not necessary modifications if you just add the simple command. If we want to implement it with CoreCLR and CoreFX like ARM CI structure, we have to add extra arm32 ci script and Dockerfile for ARM32, which is the almost same with the existing Dockerfile. I do not know if it needs to be so complicated that it can be implemented simply with existing structures. It would be easy to maintain an ARM CI if that is exactly the same across core-setup, CoreCLR and CoreFX, but it does not seem to fit well with the core-setup routine. This is a temporary patch what I think about it. https://github.com/jyoungyun/core-setup/blob/arm/ci-test/netci.groovy#L42L44. Please give me your opinion.
@jyoungyun In general, consistency is good. However, I agree that simplicity should not be sacrificed in favor of consistency, so I am fine with the general approach you are suggesting.
That said, I would suggest that, instead of updating the DockerFile (e.g. at https://github.com/jyoungyun/core-setup/blob/arm/ci-test/scripts/docker/ubuntu.14.04/Dockerfile), you should consider updating the script to use the same Docker image that we use for Pipeline builds (the names are the ones I mentioned above). This will ensure that we will have a single Docker image to work with and maintain, delivering consistency between CI and official builds. If we are able to do so, then we could consider removing these local repo specific Docker files (which will need to be updated everytime we need to support a new platform).
BTW, as a datapoint, when I brought up official builds of CoreCLR in our pipeline build infrastructure that performed product build in the Docker image, it also required to have the pre-req dependencies (qemu, qemu-debootstrap, etc) to be installed on the machine running Docker. RootFS is still created within the Docker image though.
An alternate approach, if you do not wish to use Docker, is to simply install the pre-reqs on the CI machine, followed by rootfs generation (which you are doing in your patch above) and then simply perform the build. This maybe simpler in terms of not dealing with Docker image since the pre-reqs to be installed would be listed in the netci.groovy.
This will ensure that we will have a single Docker image to work with and maintain, delivering consistency between CI and official builds. If we are able to do so, then we could consider removing these local repo specific Docker files (which will need to be updated everytime we need to support a new platform).
@gkhanna79 I also think it is good idea to maintain a single Docker image for various purpose to maintain consistency. In addition to this, I expect devlopers may improve and test CI /build system easily if they can change configruation of docker image easily, as I already desribed at https://github.com/dotnet/coreclr/issues/9273#issuecomment-277221352. I hope we can achieve two goals together by exploiting docker, i.e. (1) maintain consistency and (2) ease developing and tessting of CI and build system.
CC @dleeapho @MichaelSimons
@gkhanna79 Thank you for kindly explanation. Like @hqueue 's opinion, I want to maintain and test CI/build system easily. In addition to this, I want to be able to manage Docker image easily. So I think we may need some repo for Docker Image to save the DockerFiles. Like the comments you wrote on other issues(https://github.com/dotnet/coreclr/issues/9273#issuecomment-277338398), I understood that there is some repo for DockerFiles. It sounds good to me. :) Please share the repo address.
As I mentioned, @dleeapho and @MichaelSimons own the repo where the Docker files used for pipeline (i.e. official) builds are kept. I am looking to them to describe how we can enable these to be available such that you can contribute to them as well.