From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 179B4C016F for ; Wed, 11 Nov 2020 15:07:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 01927203E9 for ; Wed, 11 Nov 2020 15:07:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id y4-dhhb3Btn1 for ; Wed, 11 Nov 2020 15:07:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-il1-f196.google.com (mail-il1-f196.google.com [209.85.166.196]) by silver.osuosl.org (Postfix) with ESMTPS id E11B320365 for ; Wed, 11 Nov 2020 15:07:05 +0000 (UTC) Received: by mail-il1-f196.google.com with SMTP id x20so2233548ilj.8 for ; Wed, 11 Nov 2020 07:07:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:from:date:message-id:subject:to; bh=k21h3BRf6eQZ4qh8ryvB0CSSCg1hB4iZM/xPw6pXEEA=; b=OYYX0PNemKRS8xxX4tE2AH7OdltPpw/pekATOVF1YZ3GBgrlZ3XymyMyDAtUF1SoaQ 66JK7A0J6rDs3aX6k+zJbxtpKi4qaWjlLz0qxw9BDYWrhAQ7n2jPU1petlkEaP9zmMjV qHOF25qXswUM59Kl63sHXLgNpeSYP+2nva40dTQrpHfAzchXhNwH4CRB9vgi2yftZ3Wj u4GaZ3MhJkyDDcyAzmxQvZXmH/ZlTKQFxxsOVUjUkIFQbrAnp6cRoIdHNq2bXu1rX/m7 L2oNV/LuvObwByZHT3kkdto3pbaO/us7Nr1/83tMfLjrP3/qJ5IsGFEuGVJiXx7R1dze 11/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:from:date:message-id :subject:to; bh=k21h3BRf6eQZ4qh8ryvB0CSSCg1hB4iZM/xPw6pXEEA=; b=uF74/FWNsJUImXSJ6KEYH3ode27ahSbSURR2tPUv3USMX1otLzzSTw0y2SyCLrSvDK QlvsyWjdj5Y2iVSBqOFh6B76UEojhaFR3zp8/Q3Y83Ns6ekssK2+pFkEVWvapJXkMBgO SXS0s9yrl6U25PHA/nQLG8CIkiZiR5OODfsG5csvndMl1AEesu7jCXfFArQHRpiuXcr7 /vQr2IYs1k5rVcdFenwoJ80uZ4uU4rcjcEB81Kjj3Pz9lLQEOUy208hSk6p+O8gtbp8T t2Iw7g0ain2+J2063JZ5y1N/dWrQDkqNjj0rIknyrUWvKh3ri64bQkPxOgHprmPSGk1q Mi6w== X-Gm-Message-State: AOAM531C7GSmOgNG5p2SM6AyUdF7hiBPXwbpjOLy8Nw/1/ACYjy1cz4D 2BuPO1rVlYC1s7IAr0i6BTPbdBMxpEBRQdIdqbRQaFW8n/I= X-Google-Smtp-Source: ABdhPJwSLa7a4RDK1ryEWNwmHXbS1qGD6dVX/XIlrBnWyt80G3ZI00ZT3s3MR28yC3R0OZ9oHL+qv5kEewyfSmdyskY= X-Received: by 2002:a92:c844:: with SMTP id b4mr11186002ilq.292.1605107224889; Wed, 11 Nov 2020 07:07:04 -0800 (PST) MIME-Version: 1.0 Reply-To: DKBryant@gmail.com From: Dan Bryant Date: Wed, 11 Nov 2020 09:06:54 -0600 Message-ID: To: Bitcoin Protocol Discussion Content-Type: multipart/alternative; boundary="000000000000f74dfa05b3d625a1" X-Mailman-Approved-At: Wed, 11 Nov 2020 15:19:49 +0000 Subject: [bitcoin-dev] Bitcoin Archaeology X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Bitcoin Protocol Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Nov 2020 15:07:08 -0000 --000000000000f74dfa05b3d625a1 Content-Type: text/plain; charset="UTF-8" TLDR; How to build old OpenSSL releases in MSYS/MinGW v1.0.11 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. 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 mk1mf.pl [ref2] Perhaps there was a bad version of perl in MSYS v1.0.11, I'm not sure. 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? My options so far seem to be. 1. Try to find out how Satoshi did the MinGW OpenSSL build back in 2009. 2. Try to do the OpenSSL build through Cygwin which could cross-complile to MinGW at the time 3. Try to do the OpenSSL build through Msys2 with later versions of perl and libc 4. Buy some sketchy version of VC 6 on ebay and try that 5. Patch Bitcoin 0.1.0 to use OpenSSL v1.0.0 where they fixed the perl bug 6. Give up and use a precompiled OpenSSL release 7. Give up and use the Linux build methods introduced in Bitcoin v0.1.6 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. Thoughts? For those interested. The mk1mf.pl 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. * ref1: https://satoshi.nakamotoinstitute.org/code/ * ref1: https://github.com/openssl/openssl/blob/OpenSSL_0_9_8h/util/mk1mf.pl --000000000000f74dfa05b3d625a1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
TLDR; How to build old OpenSSL releases in MSYS/MinGW= v1.0.11

In a similar vein to the Github Artic Code Vau= lt, and the Nakamoto Institute, I thought it would be educational to do a b= uild of the first three versions of Bitcoin (v0.1.0, v0.1.3, and v0.1.5) [r= ef1].=C2=A0 Don't worry, I will keep these on a VLAN and not spam the I= RC channel.

Wanting to be as accurate=C2=A0as possible, = I spun up some VMs to try to recreate the vintage Oct 2009 toolchains that = were used.=C2=A0 The original Satoshi posts seem to imply that the builds c= ould be done using Visual C++ version 6.0 or MinGW and MSYS (which were at = v1.0.11).=C2=A0 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 sourc= eforge.=C2=A0 Most things seemed to build OK, with the exception of OpenSSL= , which looks to fail due to some issues in mk1= mf.pl [ref2]=C2=A0 Perhaps there was a bad version of perl in MSYS v1.0= .11, I'm not sure.

So my question is..=C2=A0 H= as anyone been here long enough to recall the steps to build OpenSSL v0.9.8= h in MSYS 1.0.11?=C2=A0 Or, does anyone know where to find a non-sketchy=C2= =A0copy of Visual C++ 6.0?

My options so far seem = to be.

1. Try to find out how Satoshi did the MinG= W OpenSSL build back in 2009.
2. Try to do the OpenSSL build thro= ugh Cygwin which could cross-complile=C2=A0to MinGW at the time
3= . Try to do the=C2=A0 OpenSSL build through Msys2 with later versions of perl and libc
= 4. Buy some sketchy version of VC 6 on ebay and try that
5. Patch= Bitcoin 0.1.0 to use OpenSSL v1.0.0 where they fixed the perl bug
6. Give up and use a precompiled=C2=A0OpenSSL release
7. Give u= p and use the Linux build methods introduced in Bitcoin v0.1.6
I realize this all sounds like a fool's folly, but it seem= s important (at some level) to be able to reproduce=C2=A0these old builds.= =C2=A0 But perhaps it's just my OCD.

Thoughts?=

For those interested.=C2=A0 The mk1mf.pl bug seems to be in parsing the list of headers thro= ugh either the var_add,=C2=A0clean_up_ws, or=C2=A0do_copy_rule subs.=C2=A0 = I see both the headers and header directories being parsed, but the directo= ries are dropped when building the make rules causing make to assume all he= aders are at root, failing the build.=C2=A0 Perhaps there is a version sed,= basename or dirname that is missing in MSYS, but I've failed to find t= he dependency yet.


--000000000000f74dfa05b3d625a1--