make: check_gx & dist_get issues on Windows #4510
Labels
kind/bug
A bug in existing code (including security flaws)
topic/build
Topic build
topic/windows
Windows specific
Milestone
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 mymake.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 forgx
and notgx.exe
. This triggersdist_get
to fire, this will download a zip containing gx.exe and gx-go.exe, it attempts to extract them but fails withAfter 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 bytegx
file inbin/
(ref), with this stub in placecheck_gx
seems to succeed forgx
but notgx-go
, this causesdist_get
to fire again to fetchgx-go
, howeverunzip
will fail againrunning
make
again (3rd) will cause it to leave another stub inbin/
during extraction, this time forgx-go
(ref).check_gx
will see both stubs inbin/
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 havegx.exe
andgx-go.exe
in our path since invokinggx
is synonymous with invokinggx.exe
on Windows, however if we did not have gx and gx-go installed, the build would fail at this point sincecheck_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 ofbin/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 ofbin/
after each run.Edit:
Forgot to link the root containing the log file
https://ipfs.io/ipfs/QmbBN9DbCD9JtX34P1pV3ErkMkSgD4Frfn35Dzw1Y2TLxS/
The text was updated successfully, but these errors were encountered: