Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows compatibility issue #960

Closed
gitigs opened this issue May 26, 2021 · 6 comments · Fixed by #974
Closed

Windows compatibility issue #960

gitigs opened this issue May 26, 2021 · 6 comments · Fixed by #974
Assignees
Labels
C-bug Category: bugs S-confirmed Status: A confirmed bug

Comments

@gitigs
Copy link

gitigs commented May 26, 2021

Describe the bug
Failed to docker-compose build when trying to run local node.

To Reproduce
Steps to reproduce the behavior:

  1. Install Docker (WSL 2 backend) on Windows
  2. git clone [email protected]:ethereum-optimism/optimism.git
    2.1 cd optimism & yarn install & yarn build
    2.2 cd ops & docker-compose build
  3. See error message as below

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image

System Specs:

  • OS: Windows 10 (19042.985)
  • Docker Desktop 3.3.3 (64133)

Additional context:

  • Tried on different Windows machines
@smartcontracts
Copy link
Contributor

Thanks for the report! Will take a look at this today or tomorrow.

@smartcontracts smartcontracts added C-bug Category: bugs S-unconfirmed Status: Issue might be valid, but it’s not yet confirmed labels May 26, 2021
@smartcontracts smartcontracts self-assigned this May 26, 2021
@miroslavnedelchev
Copy link

Having the absolutely same issue, described here #36

@smartcontracts smartcontracts added S-confirmed Status: A confirmed bug and removed S-unconfirmed Status: Issue might be valid, but it’s not yet confirmed labels May 27, 2021
@smartcontracts
Copy link
Contributor

Confirmed. Gonna see what I can do. Also realized there's an issue with yarn clean because rm isn't recognized.

@smartcontracts
Copy link
Contributor

Ok I have a fix. Will make a PR in just a sec.

@smartcontracts
Copy link
Contributor

Underlying problem turned out to be the one described here: https://essenceofcode.com/2019/11/20/linux-style-line-feeds-in-docker-desktop-on-windows/

In a nutshell, docker on windows expects files to have unix-style (LF) line endings but we had windows-style (CRLF) endings. There are various ways to fix this, but one of the simplest is to add a .gitattributes file with certain config values. See #974 for the fix. In the short term, while I wait for review on that PR, you can try this fix as follows.

First, checkout the branch, clear your cache, and reset. This forces the .gitattributes file to take effect:

cd optimism
git checkout kelvin/fix-windows
git rm --cached -r .
git reset --hard

Then the standard:

yarn clean
yarn build
cd ops
docker-compose down -v
docker-compose build
docker-compose up

@igorsenych-cw
Copy link

I can confirm that it works now. Thanks @smartcontracts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bugs S-confirmed Status: A confirmed bug
Projects
None yet
4 participants