paulfitz / cosmicos

Sending the lambda calculus into deep space
https://cosmicos.github.io/
GNU General Public License v2.0
134 stars 8 forks source link

error building #27

Closed dmkunsman closed 5 years ago

dmkunsman commented 5 years ago

Hello, I got this error after trying to build cosmic os with docker

$ ./make.sh tiny + hash docker + '[' -e build ']' + '[' '!' -e build/docker_build.txt ']' + mkdir -p build + touch build/docker_build.txt + [[ -n 197608 ]] + [[ -n '' ]] + docker ps -f name=cosmicos_build + MSYS_NO_PATHCONV=1 + docker.exe ps -f name=cosmicos_build + grep -q cosmicos + docker run -dit --rm --name cosmicos_build -v /c/Users/Bourbaki/SETI_Message/c osmicos:/cosmicos paulfitz/cosmicos_builder /bin/bash + MSYS_NO_PATHCONV=1 + docker.exe run -dit --rm --name cosmicos_build -v /c/Users/Bourbaki/SETI_Message/cosmicos:/cosmicos paulfitz/cosmicos_builder /bin/bash b547273a65bba9522ba976d0451c950f749caabba892446a732034309cf7aad7 + docker exec -e VERBOSE= cosmicos_build src/make_without_docker.sh tiny + MSYS_NO_PATHCONV=1 + docker.exe exec -e VERBOSE= cosmicos_build src/make_without_docker.sh tiny OCI runtime exec failed: exec failed: container_linux.go:348: starting container process caused "no such file or directory": unknown

if you have idea helping with me this, I would appreciate!

alanfwilliams commented 5 years ago

I'm having a little trouble reading this output. Do the plus signs indicate a new line? Is the full error OCI runtime exec failed: exec failed: container_linux.go:348: starting container process caused "no such file or directory": unknown?

paulfitz commented 5 years ago

Thanks for reporting @dmkunsman. It looks like you are running on windows, under mingw or cygwin or something like that? The error message suggests that when docker starts, it cannot find the working directory. Inside the docker container, the working directory should be /cosmicos. On your file system, it looks like that should be /c/Users/Bourbaki/SETI_Message/cosmicos. I'm wondering if there is some path issue. I'm not sure what that MSYS_NO_PATHCONV=1 is.

@aw1231 this issue started off on email, I asked @dmkunsman to do the following experiment to help diagnose the error message they were seeing:

paulfitz commented 5 years ago

Doing some googling, it is possible that docker on windows may need some setup to allow access to files.

dmkunsman commented 5 years ago

I tried to switch the working directory from /cosmicos to /c/Users/Bourbaki/SETI_Message/cosmicos and I still get this error

$ ./make.sh tiny

Also I using docker tools on Windows 7, so I am not sure how to share data volumes between docker container and windows.

paulfitz commented 5 years ago

Thanks for the follow-up @dmkunsman. If the docker tools you have are https://github.com/docker/toolbox, then the instructions for sharing data volumes appear to be these: https://docs.docker.com/toolbox/toolbox_install_windows/#optional-add-shared-directories. I've no experience at all with this. Is it that the volume shares in calls to the docker client are just ignored? If so, you could try explicitly sharing your /c/Users/Bourbaki/SETI_Messa ge/cosmicos directory as /cosmicos. There's nothing special about this project for this. So you could try practicing with e.g. the ubuntu docker image. On linux, if I do:

docker run -it -v /home/paulfitz/Documents:/docs ubuntu /bin/bash

Then I can do ls /docs within the container and see all my files in the host's Documents directory. If you can figure out how to achieve the same, then we should be able to fix up CosmicOS.

dmkunsman commented 5 years ago

Hello again, I tried running C:\Users\Bourbaki>docker run -it -v /c/Users/Bourbaki/SETI_Message/cosmicos:/cos micos ubuntu /bin/bash in the command prompt on Windows 7 and I get this error when I try to run: ./make.sh tiny root@3073efbca6de:/cosmicos# ./make.sh tiny bash: ./make.sh: /bin/bash^M: bad interpreter: No such file or directory

paulfitz commented 5 years ago

Oh that looks like progress. So I'm assuming you can list all the cosmicos files now from within the container?

The /bin/bash^M bad interpreter message sounds like there is a problem with line endings in that file, they have switched to "windows style" which has an extra character that confuses unix. This may have happened when you edited make.sh, or if there's some odd cygwin/mingw thing going on.

Can you try this:

docker run -it -v /c/Users/Bourbaki/SETI_Message/cosmicos:/cosmicos paulfitz/cosmicos_builder /bin/bash

(note paulfitz/cosmicos_builder instead of ubuntu) and then within the container do:

src/make_without_docker.sh

(this is the equivalent to ./make.sh if you are already within a container)

dmkunsman commented 5 years ago

was able to fix the last problem, but now I am getting this error after running make_without_docker.sh

root@850056d59508:/comsicos/src# ./make_without_docker.sh tiny Do not know which message to build

paulfitz commented 5 years ago

Try staying in the main directory, and running ./src/make_without_docker.sh

paulfitz commented 5 years ago

Correction, you'll need to specify which message to build, e.g:

./src/make_without_docker.sh tiny
dmkunsman commented 5 years ago

I figured that out and got it working!Sent from my Sprint Phone.-------- Original message --------From: Paul Fitzpatrick notifications@github.com Date: 11/15/2018 2:37 PM (GMT-06:00) To: paulfitz/cosmicos cosmicos@noreply.github.com Cc: dmkunsman dmkunsman@gmail.com, Mention mention@noreply.github.com Subject: Re: [paulfitz/cosmicos] error building (#27) Correction, you'll need to specify which message to build, e.g: ./src/make_without_docker.sh tiny

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread. {"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/paulfitz/cosmicos","title":"paulfitz/cosmicos","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/paulfitz/cosmicos"}},"updates":{"snippets":[{"icon":"PERSON","message":"@paulfitz in #27: Correction, you'll need to specify which message to build, e.g:\r\n\r\n./src/make_without_docker.sh tiny\r\n\r\n"}],"action":{"name":"View Issue","url":"https://github.com/paulfitz/cosmicos/issues/27#issuecomment-439181536"}}} [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/paulfitz/cosmicos/issues/27#issuecomment-439181536", "url": "https://github.com/paulfitz/cosmicos/issues/27#issuecomment-439181536", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } }, { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "Re: [paulfitz/cosmicos] error building (#27)", "sections": [ { "text": "", "activityTitle": "Paul Fitzpatrick", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@paulfitz", "facts": [

] } ], "potentialAction": [ { "name": "Add a comment", "@type": "ActionCard", "inputs": [ { "isMultiLine": true, "@type": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"paulfitz/cosmicos\",\n\"issueId\": 27,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}" } ] }, { "name": "Close issue", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"paulfitz/cosmicos\",\n\"issueId\": 27\n}" }, { "targets": [ { "os": "default", "uri": "https://github.com/paulfitz/cosmicos/issues/27#issuecomment-439181536" } ], "@type": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 388376370\n}" } ], "themeColor": "26292E" } ]