aria2 0.13.2+1 for Windows has been released (updated 07-Jun-08)
aria2 is a download utility with resuming and segmented downloading.
Using the makefile aria2.mak.
I successfully ported aria2 to Windows using the Debian MinGW cross-compiler. While aria2 compiles under native MinGW and Cygwin, the resultant executable is buggy, and numerous unit tests fail.
Update: I installed gcc 4.3.0 in MinGW using get_mingw.cmd and am now able to produce working binaries in my Windows environment. This leads me to believe that gcc 3.4.5 is not reliable under MinGW.
Version 0.13.2+1
Please see the README file here.
The binary is available on SourceForge.net and here.
Version 0.13.0
Please see the README file here.
The binary is available on SourceForge.net and here.
Version 0.12.0
Please see the README file here.
The binary is available on SourceForge.net and here.
Version 0.11.5
Please see the README file here.
The binary is available on SourceForge.net and here.
Version 0.11.4
Please see the README file here.
The binary is available on SourceForge.net and here.
Version 0.11.3-1
Please see the README file here.
The binary is available on SourceForge.net
and here.
Version 0.11.3
Please see the README file here.
The binary is available on SourceForge.net and here.
Version 0.11.2
Please see the README file here.
The binary is available here. Update: this release fixes the torrent download issue with the original 0.11.2 MinGW release.
Version 0.11.1+1
The binary is available here.
Version 0.11.0
The binary is available here.
Version 0.10.2+1
The binary is available here.
Please note that while the developer states in the README file: "aria2 is in very early development stage", I've successfully downloaded using the following methods:
- HTTPS
- HTTP
- FTP
- Local metalinks
- Remote metalinks
- Local torrents
- Remote torrents
I'm aware of the following issues:
- Azureus is much faster than aria2 on my system. Initially, I thought this was due to my firewall blocking incoming UDP traffic. As aria2 only uses TCP and not UDP sockets, this does not appear to be the reason why Azureus is faster. More research is needed.
- I wasn't able to directly download the metalink http://curl.haxx.se/metalink.cgi?curl=tar.gz. A workaround would be:
aria2c.exe -o local.metalink --follow-metalink=false http://curl.haxx.se/metalink.cgi?curl=tar.gz aria2c.exe -M local.metalink
The following issues have been fixed:
- Rename bug due to MinGW's rename() not deleting the destination file, if it already exists.
- HTTPS downloads failed prior to version 0.11.1+1.
- Downloads failed at 2GB prior to version 0.11.1+1.
- Due to MinGW's sscanf() function lacking support for the %Ld specifier, files larger than 2147483648 bytes will not download correctly via FTP. This is not an issue for the Cygwin version.
Here's the included README-win32.txt file:
Aria2 Win32 port Ross Smith (http://smithii.com) 07-Jun-08 Note: aria2 is also available via Cygwin's standard setup program. Versions used: aria2 0.13.2+1 MinGW (Windows): MinGW 5.1.3 / gcc 4.3.0 MSYS 1.0.10 C-Ares 1.5.2 LibXML 2.6.32 OpenSSL 0.9.8h 1. Install ActivePerl > wget http://downloads.activestate.com/ActivePerl/Windows/5.10/ActivePerl-5.10.0.1003-MSWin32-x86-285500.msi > msiexec /i ActivePerl-5.10.0.1003-MSWin32-x86-285500.msi 2. Install Cygwin > wget http://www.cygwin.com/setup.exe > cacls setup.exe /C /E /G "%USERNAME%":F > .\setup.exe (install gcc* + auto* packages) 3. Install MingGW > wget http://smithii.com/files/get_mingw.cmd > .\get_mingw.cmd 4. Build OpenSSL for MinGW using Cygwin: (I'm currently not able to build OpenSSL in MinGW) > path=c:\cygwin\bin;%path% > c:\cygwin\bin\bash --login -i $ wget http://smithii.com/files/openssl-mingw.mak $ make -f openssl-mingw.mak $ make -f openssl-mingw.mak install $ cp -prv /usr/local/ssl/* /c/msys/1.0/local $ exit 5. Build C-Ares/CppUnit/LibXML and Aria2 in MinGW: > path=c:\perl\bin;c:\msys\1.0\bin;c:\mingw\bin;%path% > c:\msys\1.0\bin\sh --login -i $ wget http://smithii.com/files/c-ares.mak $ wget http://smithii.com/files/cppunit.mak $ wget http://smithii.com/files/libxml2.mak $ make -f c-ares.mak $ make -f c-ares.mak install $ make -f cppunit.mak $ make -f cppunit.mak install $ make -f libxml2.mak $ make -f libxml2.mak install $ make -f aria2.mak $ pushd aria2-0.13.2+1 $ cp /usr/local/bin/libxml2-2.dll . $ cp /mingw/bin/pthreadGC2.dll . $ ./aria2c.exe --version $ popd 6. Build and run unit tests (optional): $ make -f aria2.mak test $ pushd aria2-0.13.2+1/test $ cp /usr/local/bin/libxml2-2.dll . $ cp /mingw/bin/pthreadGC2.dll . $ ./aria2c.exe $ popd $ exit 7. Build the distribution (e.g., aria2-0.13.2+1-win32-mingw.zip) (optional): 7a. Install GetGnuWin32 > wget http://voxel.dl.sourceforge.net/sourceforge/getgnuwin32/GetGnuWin32-0.6.19.exe > cacls setup.exe /C /E /G "%USERNAME%":F > .\GetGnuWin32-0.6.19.exe 7b. Execute: > path=C:/Progra~1/GnuWin32/GetGnuWin32/gnuwin32/bin;%path% > c:\msys\1.0\bin\sh --login -i $ make -f aria2.mak dist $ exit ****************************************************************************** OLD NOTES ****************************************************************************** Debian MinGW Cross-compiler (untried since 0.11.4): mingw32 3.4.5.20060117.1.dfsg-2 (gcc 3.4.5) mingw32-binutils 2.16.91-20060119.1-1 mingw32-runtime 3.9-4 C-Ares 1.4.0 LibXML 2.6.29 OpenSSL 0.9.8e Cygwin (Windows) (untried since 0.11.4): Cygwin 1.5.24 / gcc 3.4.4 LibXML 2.6.26 OpenSSL 0.9.8e Patches applied: aria2-0.11.4-mingw-cross-compile.patch (this patch is required when using the Debain MinGW Cross-compiler) To build Aria2 using Debain MinGW Cross-compiler: (First build openssl using Windows MinGW described below) On your Windows box: c:> cd c:\msys\local\lib c:> scp -p \ libtasn1.dll.a \ libtasn1.la \ libtasn1.a \ libz.a \ libssl32.a \ libeay32.a \ libssl.a \ libcrypto.a \ root@debianbox:/usr/i586-mingw32msvc/lib c:> cd c:\msys\local\include c:> scp -pr openssl root@debianbox:/usr/i586-mingw32msvc/include On your debian box: $ wget http://smithii.com/files/c-ares.mak $ wget http://smithii.com/files/cppunit.mak $ wget http://smithii.com/files/libxml2.mak $ wget http://smithii.com/files/aria2.mak $ make -f c-ares.mak install $ make -f cppunit.mak install $ make -f libxml2.mak install $ make -f aria2.mak $ make -f aria2.mak test On your Windows box: c:> pushd \\debianbox\home\ross\src\aria2-0.13.0\test z:> aria2c.exe z:> popd To build Aria2 in Cygwin: Using Cygwin's setup.exe installer, install the following packages: 1. cppunit 2. libgnutls-devel 3. libxml2-devel 4. openssl-devel > c:\cygwin\bin\bash --login -i $ wget http://smithii.com/files/c-ares.mak $ wget http://smithii.com/files/aria2.mak $ make -f c-ares.mak install $ make -f aria2.mak $ make -f aria2.mak test $ pushd aria2-0.11.4/test $ ./aria2c.exe $ popd ------------------------------------------------------------------------------ Version 0.11.4 test suite results: For MingW, All unit tests passed! For Cygwin: I haven't compiled 0.11.4 using Cygwin. ------------------------------------------------------------------------------ Version 0.11.3 test suite results: For MingW, All unit tests passed! For Cygwin: I haven't compiled 0.11.3 using Cygwin. ------------------------------------------------------------------------------ Version 0.11.2 test suite results: For MingW, All unit tests passed! For Cygwin: For Cygwin, the test suite immediately stackdumps. I haven't had time to research this yet. This most likely is due to Cygwin using gcc 3.4.4. Once Cygwin upgrades gcc to version 4.2 or higher, this problem may fix itself. ------------------------------------------------------------------------------ Version 0.11.1+1 test suite results: For Cygwin, the test suite immediately stackdumps. I haven't had time to research this yet. For Debian MingW, 3 unit tests are currently failing: ============================== UtilTest.cc:274:Assertion Test name: UtilTest::testRandomAlpha equality assertion failed - Expected: rUopvKRn - Actual : AdKqeYSu CookieParserTest.cc:34:Assertion Test name: CookieParserTest::testParse equality assertion failed - Expected: 1181473200 - Actual : 1181502000 TimeSeedCriteriaTest.cc:26:Assertion Test name: TimeSeedCriteriaTest::testEvaluate assertion failed - Expression: cri.evaluate() Failures !!! Run: 340 Failure total: 3 Failures: 3 Errors: 0 For Windows MingW, 12 unit tests are currently failing: ============================== HttpHeaderProcessorTest.cc:44:Assertion Test name: HttpHeaderProcessorTest::testUpdate1 assertion failed - Expression: proc.eoh() HttpHeaderProcessorTest.cc:54:Assertion Test name: HttpHeaderProcessorTest::testUpdate2 assertion failed - Expression: proc.eoh() HttpHeaderProcessorTest.cc:63:Assertion Test name: HttpHeaderProcessorTest::testGetPutBackDataLength assertion failed - Expression: proc.eoh() HttpHeaderProcessorTest.cc:81:Assertion Test name: HttpHeaderProcessorTest::testGetPutBackDataLength_nullChar assertion failed - Expression: proc.eoh() ##Failure Location unknown## : Error Test name: HttpHeaderProcessorTest::testGetHttpStatusHeader uncaught exception of unknown type ##Failure Location unknown## : Error Test name: HttpHeaderProcessorTest::testGetHttpStatusHeader_statusOnly uncaught exception of unknown type HttpHeaderProcessorTest.cc:197:Assertion Test name: HttpHeaderProcessorTest::testGetHeaderString equality assertion failed - Expected: HTTP/1.1 200 OK Date: Mon, 25 Jun 2007 16:04:59 GMT Server: Apache/2.2.3 (Debian) Last-Modified: Tue, 12 Jun 2007 14:28:43 GMT ETag: "594065-23e3-50825cc0" Accept-Ranges: bytes Content-Length: 9187 Connection: close Content-Type: text/html; charset=UTF-8 - Actual : UtilTest.cc:274:Assertion Test name: UtilTest::testRandomAlpha equality assertion failed - Expected: rUopvKRn - Actual : AdKqeYSu CookieParserTest.cc:34:Assertion Test name: CookieParserTest::testParse equality assertion failed - Expected: 1181473200 - Actual : 1181502000 ByteArrayDiskWriterTest.cc:36:Assertion Test name: ByteArrayDiskWriterTest::testWriteAndRead equality assertion failed - Expected: Hello world! - Actual : ByteArrayDiskWriterTest.cc:57:Assertion Test name: ByteArrayDiskWriterTest::testWriteAndRead2 equality assertion failed - Expected: Hello world! - Actual : TimeSeedCriteriaTest.cc:26:Assertion Test name: TimeSeedCriteriaTest::testEvaluate assertion failed - Expression: cri.evaluate() Failures !!! Run: 340 Failure total: 12 Failures: 10 Errors: 2 FAIL: aria2c ============================== I researched the ByteArrayDiskWriterTest errors, and the problem appears to be in the stringstream STL class in MinGW. For example: #include#include #include using namespace std; int main() { stringstream ss (stringstream::in | stringstream::out); string msg1 = "line1\nline2"; char buf[100]; int c; memset(buf, '\0', sizeof(buf)); cout << "msg1=" << msg1 << endl; ss.seekg(0, ios_base::beg); ss.write(msg1.c_str(), msg1.size()); cout << "ss.str()=" << ss.str() << endl; ss.seekg(0, ios_base::beg); cout << "ss.str()=" << ss.str() << endl; ss.read(buf, msg1.size()); c = ss.gcount(); cout << "c=" << c << endl; cout << "ss.str()=" << ss.str() << endl; ss.clear(); cout << "ss.str()=" << ss.str() << endl; buf[c] = '\0'; cout << "buf =" << buf << endl; memset(buf, '\0', sizeof(buf)); ss.read(buf, sizeof(buf)); c = ss.gcount(); cout << "c=" << c << endl; ss.clear(); buf[c] = '\0'; cout << "buf =" << buf << endl; } The above program outputs correctly in Linux, Cygwin, and with the executable compiled using the Debian MinGW cross compiler. msg1=line1 line2 ss.str()=line1 line2 ss.str()=line1 line2 c=11 ss.str()=line1 line2 ss.str()=line1 line2 buf =line1 line2 c=0 buf = but fails in MinGW: msg1=line1 line2 ss.str()= ss.str()= c=0 ss.str()= ss.str()= buf = c=0 buf = ============================== ------------------------------------------------------------------------------ Version 0.11.0 test suite results: For MingW, 6 unit tests are currently failing: ============================== UtilTest.cc:250:Assertion Test name: UtilTest::testRandomAlpha equality assertion failed - Expected: rUopvKRn - Actual : AdKqeYSu CookieParserTest.cc:34:Assertion Test name: CookieParserTest::testParse equality assertion failed - Expected: 1181473200 - Actual : 1181502000 ByteArrayDiskWriterTest.cc:36:Assertion Test name: ByteArrayDiskWriterTest::testWriteAndRead equality assertion failed - Expected: Hello world! - Actual : ByteArrayDiskWriterTest.cc:57:Assertion Test name: ByteArrayDiskWriterTest::testWriteAndRead2 equality assertion failed - Expected: Hello world! - Actual : TimeSeedCriteriaTest.cc:26:Assertion Test name: TimeSeedCriteriaTest::testEvaluate assertion failed - Expression: cri.evaluate() DefaultBtRequestFactoryTest.cc:153:Assertion Test name: DefaultBtRequestFactoryTest::testCreateRequestMessages_onEndGame equality assertion failed - Expected: 0 - Actual : 1 ============================== For Cygwin, the test suite immediately stackdumps. I haven't had time to research this yet. For version 0.10.2+1, I was not able to compile the test suite. ------------------------------------------------------------------------------ For version 0.9.0, 3 unit tests failed using MingW build: ============================== UtilTest.cc:232:Assertion Test name: UtilTest::testRandomAlpha equality assertion failed - Expected: rUopvKRn - Actual : AdKqeYSu BitfieldManTest.cc:168:Assertion Test name: BitfieldManTest::testGetMissingIndex equality assertion failed - Expected: 80 - Actual : 0 TimeSeedCriteriaTest.cc:26:Assertion Test name: TimeSeedCriteriaTest::testEvaluate assertion failed - Expression: cri.evaluate() ============================== For version 0.9.0, 2 unit tests failed using Cygwin build: ============================== UtilTest.cc:232:Assertion Test name: UtilTest::testRandomAlpha equality assertion failed - Expected: rUopvKRn - Actual : yDYvSwiB BitfieldManTest.cc:168:Assertion Test name: BitfieldManTest::testGetMissingIndex equality assertion failed - Expected: 80 - Actual : 104 ==============================
- ross's blog
- Login or register to post comments
