Building on a Mac #15
Comments
Adding
and
but then it fails with:
Trying:
Actually, simply Any ideas how to fix that? |
Using the Dockerfile seems to work: git clone https://github.com/emosenkis/esp-rs
cd esp-rs
docker build . |
I gave the Dockerfile a try, it seemed to be going well and spent ages compiling stuff then eventually failed with:
I can't find |
Probably inside the docker file system. Normally you can get a terminal inside the image with
, but unsure if this holds for crashed images. You can list your containers with |
|
You might try Anyhow, on first attempt, Second attempt went well:
Docker image size is ~20GB:
|
Anything here that you might be able to add to the Dockerfile, README, or build.sh to help others have an easier time with this? I'd be happy to get a pull request. |
@antonok-edm who initially contributed the Dockerfile |
It's hard to tell without confirmation from @torntrousers but that looks to me like it could have been a disk space error. If so, adding information about the required disk space would certainly be useful. |
I can't see how to change the disk space. In the Docker Preferences, in the Advanced tab where I can set CPUs and memory, it shows the location of the disk image but mentions nothing about changing the size (looking in Mac Finder its 38.21GB). |
@torntrousers Docker doesn't impose any artificial limits on a container's available disk space, so check that you still have space on the drive your Docker images are located on. |
I had an older version of Docker, newer versions for a Mac do have a disk option, so I've updated to Version 2.0.0.0-mac82 (29268). I've set the disk size to 64.0GB which is the max it would let me. Then I deleted all the old docker images with
Any ideas on that? |
Success! I upped the Docker memory to 6GB and swap to 1.5GB ( I can't remember what there were before) and tried again and now it works.
Now what? Has it built a binary image somewhere I can flash on an ESP8266? |
Muddling on, do I now do this step - https://github.com/emosenkis/esp-rs#usage - so
I've tried that and get:
looking in the build.sh I guess thats coming from here:
Any hints on what could be up with bindgen? |
@torntrousers Admittedly, I hadn't actually tried building anything from the Docker image -- I intended it solely as a step forward to getting CI working, just to make sure the build step proceeded ok. Looking at it now, it seems like using the image for builds would be great too, so it could just be hosted on Docker hub and users wouldn't have to spend an hour compiling the entirety of mrustc just to get a blinking light working. Looks like bindgen needs |
Thanks @antonok-edm , that gets it further. Now:
|
Docker runs as root by default and has a very minimal environment setup, so you'll have to run Not sure if running as root will cause any problems, but I guess we can find out! |
That gets a bit further:
|
@torntrousers this looks like a similar class of errors I encountered when upgrading my rust projects to the 2018 edition. My hunch is that since you've just installed rustup in the container, it is initializing a 2018 project by default but still trying to build old 2015 edition sources. If the @emosenkis Either we'll need to add that change as a build step or update the source. Do you know if this project will work with 2018 features if the syntax is changed? |
Thanks! It did have the
Is there something like a
Now it still fails with all those errors:
|
i think the error you are seeing is because libc 0.2.45 can't compile with mrustc, Can you try updating the libc line in your
|
Thanks @russell , I tried that but still get the same lots of |
are these errors from bindgen? I think those error occur because bindgen can't fully process C++ so they are safe to ignore. are there any other errors below bindgen? |
Beats me. This is the complete output from the build:
|
can you post the contents of edit: |
|
|
Ah, typo in the libc line in Cargo.toml:
not
|
So now success, yipee. Thank you!
Has that created some firmware image somewhere that I can flash the esp8266 with? |
It runs. So happy. Thanks everyone for the help.
|
Sounds like this is resolved by #24. @torntrousers, can you send a pull request that adds instructions for flashing firmware built using Docker? |
Ok. Ideally it would be great to do what was mentioned - ...hosted on Docker hub and users wouldn't have to spend an hour compiling the entirety of mrustc... |
That sounds great. I have no idea how to do that but I'm happy to review
pull requests.
…On Tue, Jan 1, 2019, 19:44 Anthony Elder ***@***.***> wrote:
Ok. Ideally it would be great to do what was mentioned
<#15 (comment)> - *...hosted
on Docker hub and users wouldn't have to spend an hour compiling the
entirety of mrustc...*
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#15 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABtgTlUo4MS8ZPEC-B6dVvhs8kDhrg-Oks5u-559gaJpZM4Wv6PT>
.
|
I run
esp-rs/build.sh --install
and get the following fail:Any ideas on how to fix or debug this?
The text was updated successfully, but these errors were encountered: