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

make: check_gx & dist_get issues on Windows #4510

Closed
djdv opened this issue Dec 20, 2017 · 0 comments · Fixed by #4682
Closed

make: check_gx & dist_get issues on Windows #4510

djdv opened this issue Dec 20, 2017 · 0 comments · Fixed by #4682
Labels
kind/bug A bug in existing code (including security flaws) topic/build Topic build topic/windows Windows specific

Comments

@djdv
Copy link
Contributor

djdv commented Dec 20, 2017

Version information:

N/A

Type:

Bug

Severity:

Medium (easy workaround - make sure gx and gx-go are installed and run make 3 times)

Wall of text:

Context: my environment is a Windows machine, my shell is cmd.exe and my make.exe comes from the msys2 project.

On Windows when running make check_gx fails to detect that gx and gx-go are already installed, I assume this is because it is checking for gx and not gx.exe. This triggers dist_get to fire, this will download a zip containing gx.exe and gx-go.exe, it attempts to extract them but fails with

caution: filename not matched:  gx/gx
unzip has failed

After this 1st run bin/ is left with some garbage inside (ref).
Running make again after this point (2nd) causes it to leave behind a 0 byte gx file in bin/(ref), with this stub in place check_gx seems to succeed for gx but not gx-go, this causes dist_get to fire again to fetch gx-go, however unzip will fail again

caution: filename not matched:  gx-go/gx-go
unzip has failed

running make again (3rd) will cause it to leave another stub in bin/ during extraction, this time for gx-go (ref). check_gx will see both stubs in bin/ at this point and assume we have them, going forth with the standard build procedure. On Windows this build will succeed so long as we have gx.exe and gx-go.exe in our path since invoking gx is synonymous with invoking gx.exe on Windows, however if we did not have gx and gx-go installed, the build would fail at this point since check_gx was fooled by the stubs.

There are 2 issues overall here, 1 is that .exe files are not being picked up, and 2 is that the downloaded dependencies are not being properly validated, I assume this is because the validation process invokes by name and does not specify a direct path i.e gx instead of bin/gx.

Attached here is a log file that shows me running make build 3 times to get a successful build, as well as the state of bin/ after each run.
Edit:
Forgot to link the root containing the log file
https://ipfs.io/ipfs/QmbBN9DbCD9JtX34P1pV3ErkMkSgD4Frfn35Dzw1Y2TLxS/

@whyrusleeping whyrusleeping added topic/build Topic build topic/windows Windows specific kind/bug A bug in existing code (including security flaws) labels Dec 20, 2017
@Stebalien Stebalien added this to the go-ipfs 0.4.14 milestone Dec 21, 2017
@djdv djdv mentioned this issue Feb 11, 2018
@djdv djdv mentioned this issue Mar 28, 2018
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) topic/build Topic build topic/windows Windows specific
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants