<div dir="ltr"><div>TLDR; How to build old OpenSSL releases in MSYS/MinGW v1.0.11</div><div><br></div>In a similar vein to the Github Artic Code Vault, and the Nakamoto Institute, I thought it would be educational to do a build of the first three versions of Bitcoin (v0.1.0, v0.1.3, and v0.1.5) [ref1].  Don't worry, I will keep these on a VLAN and not spam the IRC channel.<div><br></div><div>Wanting to be as accurate as possible, I spun up some VMs to try to recreate the vintage Oct 2009 toolchains that were used.  The original Satoshi posts seem to imply that the builds could be done using Visual C++ version 6.0 or MinGW and MSYS (which were at v1.0.11).  Since it looks like most versions of VC 6 have been purged from the internet, the only option left is MinGW which is still up on sourceforge.  Most things seemed to build OK, with the exception of OpenSSL, which looks to fail due to some issues in <a href="http://mk1mf.pl">mk1mf.pl</a> [ref2]  Perhaps there was a bad version of perl in MSYS v1.0.11, I'm not sure.</div><div><br></div><div>So my question is..  Has anyone been here long enough to recall the steps to build OpenSSL v0.9.8h in MSYS 1.0.11?  Or, does anyone know where to find a non-sketchy copy of Visual C++ 6.0?</div><div><br></div><div>My options so far seem to be.</div><div><br></div><div>1. Try to find out how Satoshi did the MinGW OpenSSL build back in 2009.</div><div>2. Try to do the OpenSSL build through Cygwin which could cross-complile to MinGW at the time</div><div>3. Try to do the 

OpenSSL build through Msys2 with later versions of perl and libc</div><div>4. Buy some sketchy version of VC 6 on ebay and try that</div><div>5. Patch Bitcoin 0.1.0 to use OpenSSL v1.0.0 where they fixed the perl bug</div><div>6. Give up and use a precompiled OpenSSL release</div><div>7. Give up and use the Linux build methods introduced in Bitcoin v0.1.6</div><div><br></div><div>I realize this all sounds like a fool's folly, but it seems important (at some level) to be able to reproduce these old builds.  But perhaps it's just my OCD.</div><div><br></div><div>Thoughts?</div><div><br></div><div>For those interested.  The <a href="http://mk1mf.pl">mk1mf.pl</a> bug seems to be in parsing the list of headers through either the var_add, clean_up_ws, or do_copy_rule subs.  I see both the headers and header directories being parsed, but the directories are dropped when building the make rules causing make to assume all headers are at root, failing the build.  Perhaps there is a version sed, basename or dirname that is missing in MSYS, but I've failed to find the dependency yet.</div><div><br></div><div>* ref1: <a href="https://satoshi.nakamotoinstitute.org/code/">https://satoshi.nakamotoinstitute.org/code/</a></div><div>* ref1: <a href="https://github.com/openssl/openssl/blob/OpenSSL_0_9_8h/util/mk1mf.pl">https://github.com/openssl/openssl/blob/OpenSSL_0_9_8h/util/mk1mf.pl</a><br></div><div><br></div></div>