summaryrefslogtreecommitdiff
path: root/bb/f9c91b097a4c8a17347b1fa406635907e36e20
blob: 29d2fc79ffbe89e0a8eafc18eb4f57ce1555b583 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
Return-Path: <dkbryant@gmail.com>
Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])
 by lists.linuxfoundation.org (Postfix) with ESMTP id 179B4C016F
 for <bitcoin-dev@lists.linuxfoundation.org>;
 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 <bitcoin-dev@lists.linuxfoundation.org>;
 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 <bitcoin-dev@lists.linuxfoundation.org>;
 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 <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 11 Nov 2020 15:07:05 +0000 (UTC)
Received: by mail-il1-f196.google.com with SMTP id x20so2233548ilj.8
 for <bitcoin-dev@lists.linuxfoundation.org>;
 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 <dkbryant@gmail.com>
Date: Wed, 11 Nov 2020 09:06:54 -0600
Message-ID: <CAAUFj113SCpCKyXwVqt+dtcHczNMZD7hPj8D65oDZHkhpx+rzA@mail.gmail.com>
To: Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
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 <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>, 
 <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>, 
 <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=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

<div dir=3D"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 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&#39;t worry, I will keep these on a VLAN and not spam the I=
RC channel.<div><br></div><div>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 <a href=3D"http://mk1mf.pl">mk1=
mf.pl</a> [ref2]=C2=A0 Perhaps there was a bad version of perl in MSYS v1.0=
.11, I&#39;m not sure.</div><div><br></div><div>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?</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 MinG=
W OpenSSL build back in 2009.</div><div>2. Try to do the OpenSSL build thro=
ugh Cygwin which could cross-complile=C2=A0to MinGW at the time</div><div>3=
. Try to do the=C2=A0

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><di=
v>6. Give up and use a precompiled=C2=A0OpenSSL release</div><div>7. Give u=
p and use the Linux build methods introduced in Bitcoin v0.1.6</div><div><b=
r></div><div>I realize this all sounds like a fool&#39;s folly, but it seem=
s important (at some level) to be able to reproduce=C2=A0these old builds.=
=C2=A0 But perhaps it&#39;s just my OCD.</div><div><br></div><div>Thoughts?=
</div><div><br></div><div>For those interested.=C2=A0 The <a href=3D"http:/=
/mk1mf.pl">mk1mf.pl</a> 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&#39;ve failed to find t=
he dependency yet.</div><div><br></div><div>* ref1:=C2=A0<a href=3D"https:/=
/satoshi.nakamotoinstitute.org/code/">https://satoshi.nakamotoinstitute.org=
/code/</a></div><div>* ref1: <a href=3D"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>

--000000000000f74dfa05b3d625a1--