adtools / amigaos-cross-toolchain

AmigaOS cross compiler for Linux / MacOSX / Windows
184 stars 48 forks source link

flex-2.5.4 returns Error 410 'Gone' #27

Closed akikoplays closed 8 years ago

akikoplays commented 8 years ago

Hello, while running the py script tonight I ran into this error:

Traceback (most recent call last): File "./toolchain-m68k", line 623, in globals()[action].call(_args.args) File "./toolchain-m68k", line 206, in build fetch(name, url) File "/Users/akiko/packages/amigaos-cross-toolchain/common.py", line 37, in wrapper return fn(_args, _kwargs) File "/Users/akiko/packages/amigaos-cross-toolchain/common.py", line 350, in wrapper fn(_args, _kwargs) File "/Users/akiko/packages/amigaos-cross-toolchain/common.py", line 369, in fetch download(url, name) File "/Users/akiko/packages/amigaos-cross-toolchain/common.py", line 37, in wrapper return fn(_args, _kwargs) File "/Users/akiko/packages/amigaos-cross-toolchain/common.py", line 232, in download u = urllib2.urlopen(url) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open response = meth(req, response) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response 'http', request, response, code, msg, hdrs) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 475, in error return self._call_chain(_args) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain result = func(args) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 558, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 410: Gone

Seems the flex tar is gone from the source page (http://fossies.org/linux/misc/old/index_a.html). Maybe it's temporary, maybe not. To fix it, I've patched it locally by replacing the line 25 and 26 with:

'http://downloads.sourceforge.net/project/flex/flex-2.6.0.tar.bz2',

and later in code, line 597 with:

flex='flex-2.6.0',

Seems the build works ok now. Thanks a bunch for this repository, great work!

jens-maus commented 8 years ago

You can also simply modify the flexcat download URL using the following diff

diff --git a/toolchain-m68k b/toolchain-m68k
index c44d675..9b3f88b 100755
--- a/toolchain-m68k
+++ b/toolchain-m68k
@@ -22,7 +22,7 @@ URLS = \
    'ftp://ftp.gnu.org/gnu/binutils/binutils-2.9.1.tar.gz',
    'ftp://ftp.gnu.org/gnu/gcc/gcc-2.95.3/gcc-core-2.95.3.tar.gz',
    'ftp://ftp.gnu.org/gnu/gcc/gcc-2.95.3/gcc-g++-2.95.3.tar.gz',
-   ('http://fossies.org/linux/misc/old/flex-2.5.4a.tar.gz',
+   ('http://downloads.sourceforge.net/project/flex/flex/2.5.4.a/flex-2.5.4a.tar.gz',
     'flex-2.5.4.tar.gz'),
    'git://github.com/cahirwpz/libnix',
    'git://github.com/cahirwpz/fd2sfd',

@cahirwpz Please integrate this change and update the flex download URL accordingly.