Open helgee opened 4 years ago
Perhaps you could add in some information, like: which versions of macOS, Julia, BinaryBuilder are you using? Is Docker installed (that's required for doing this on macOS)?
Perhaps you could add in some information, like: which versions of macOS, Julia, BinaryBuilder are you using? Is Docker installed (that's required for doing this on macOS)?
Indeed. I was just exhausted after a day of failure and needed to collect myself first. See above...
The issue only occurs when I try to use these sources from SourceForge:
https://downloads.sourceforge.net/project/libtirpc/libtirpc/1.2.6/libtirpc-1.2.6.tar.bz2
The issue is macOS-specific. No problems on Linux...
Hmmm, I have been unable to reproduce this on my MacOS machine, using the exact same versions of everything. Are you still facing this issue?
I just tried it again and it's gone 🤷 Thanks for having a look!
I have the same problem on a different machine now 😱 (using a different SourceForge link)
IIRC the only thing that the two setups have in common is that I installed Docker immediately before using BinaryBuilder. Could this be some kind of initialization thing?
These sourceforge links all use http redirects. That might be part of the problem.
The issue is back on the other Mac as well.
Okay, I did some digging.
The problem seems to be related to the query parameters that SourceForge attaches to the direct link which need to be manually removed.
The initial direct link from SF is, e.g.
https://downloads.sourceforge.net/project/gmat/GMAT/GMAT-R2020a/GMAT-src-R2020a.zip?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fgmat%2Ffiles%2FGMAT%2FGMAT-R2020a%2FGMAT-src-R2020a.zip%2Fdownload&ts=1597900593&use_mirror=autoselect
If I do not remove the query string garbage, the source
becomes
source::BinaryBuilder.SetupSource{FileSource} = BinaryBuilder.SetupSource{FileSource}("/var/folders/vp/qb910zys4w3951w9ntmb3zw40000gn/T/jl_7axuQ3/GMAT-src-R2020a.zip?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fgmat%2Ffiles%2FGMAT%2FGMAT-R2020a%2FGMAT-src-R2020a.zip%2Fdownload&ts=1597900593&use_mirror=autoselect", "943f403ac04d958b313b1d99d64fd09e3fa8e4c65363809d5bb88dd8c66e43e4", "")
The file var/folders/vp/qb910zys4w3951w9ntmb3zw40000gn/T/jl_7axuQ3/GMAT-src-R2020a.zip?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fgmat%2Ffiles%2FGMAT%2FGMAT-R2020a%2FGMAT-src-R2020a.zip%2Fdownload&ts=1597900593&use_mirror=autoselect
exists on disk and if I try to cp
it, e.g. cp(garbage_name_above, "Desktop")
, I get the same error message:
julia> blob = "/var/folders/vp/qb910zys4w3951w9ntmb3zw40000gn/T/jl_7axuQ3/GMAT-src-R2020a.zip?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fgmat%2Ffiles%2FGMAT%2FGMAT-R2020a%2FGMAT-src-R2020a.zip%2Fdownload&ts=1597900593&use_mirror=autoselect"
"/var/folders/vp/qb910zys4w3951w9ntmb3zw40000gn/T/jl_7axuQ3/GMAT-src-R2020a.zip?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fgmat%2Ffiles%2FGMAT%2FGMAT-R2020a%2FGMAT-src-R2020a.zip%2Fdownload&ts=1597900593&use_mirror=autoselect"
shell> pwd
/Users/helge
julia> cp(blob, "Desktop")
ERROR: ArgumentError: 'Desktop' exists. `force=true` is required to remove 'Desktop' before copying.
Stacktrace:
[1] checkfor_mv_cp_cptree(::String, ::String, ::String; force::Bool) at ./file.jl:308
[2] cp(::String, ::String; force::Bool, follow_symlinks::Bool) at ./file.jl:345
[3] cp(::String, ::String) at ./file.jl:345
[4] top-level scope at REPL[3]:1
EDIT: The error is correct because Desktop
does in fact exist. My bad...
TL;DR: There seem to be two issues here:
- A bug in Base.cp
which gives an incorrect error message for a garbage source argument
What is still puzzling me is that I ran into a situation were the downloaded archive became GMAT-src-R2020a.zip?
but if we apply Occam's Razor the answer is probably that I had a trailing ?
because I edited the URL improperly.
I ran into this and the problem was the url had ".ZIP" instead of ".zip" at the end.
Julia 1.5
Docker Desktop
BinaryBuilder
Error Log
I tried starting from scratch multiple times, rebooted the machine, and deleted the offending directories. Same result...