Hey there! Just ran the Mac OSX script from the first edition here to get a cross compiler, but it failed towards the end when trying to install objconv, specifically when it runs unzip objconv.zip -d build-objconv:
$ unzip objconv.zip -d build-objconv
Archive: objconv.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of objconv.zip or
objconv.zip.zip, and cannot find objconv.zip.ZIP, period.
Turns out the URL for objconv has moved (from http to https):
http://www.agner.org/optimize/objconv.zip
-> https://www.agner.org/optimize/objconv.zip
and response for the former HTTP URL is not the zip file but rather a HTTP redirect (301 Moved Permanently) to the latter HTTPS URL! This throws off curl and it downloads a 300B html page instead a 1MB zip file.
To fix the script, I changed the URL:
-curl http://www.agner.org/optimize/objconv.zip > objconv.zip
+curl https://www.agner.org/optimize/objconv.zip > objconv.zip
Also could consider adding the -L flag to make curl automatically follows HTTP redirects:
-curl http://www.agner.org/optimize/objconv.zip > objconv.zip
+curl -L https://www.agner.org/optimize/objconv.zip > objconv.zip
This is more future-proof in case the URL changes to a redirect again in the future.
Hey there! Just ran the Mac OSX script from the first edition here to get a cross compiler, but it failed towards the end when trying to install
objconv, specifically when it runsunzip objconv.zip -d build-objconv:Turns out the URL for objconv has moved (from http to https):
and response for the former HTTP URL is not the zip file but rather a HTTP redirect (301 Moved Permanently) to the latter HTTPS URL! This throws off curl and it downloads a 300B html page instead a 1MB zip file.
To fix the script, I changed the URL:
Also could consider adding the
-Lflag to make curl automatically follows HTTP redirects:This is more future-proof in case the URL changes to a redirect again in the future.