public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
* [bitcoin-dev] Bitcoin Archaeology
@ 2020-11-11 15:06 Dan Bryant
  2020-11-14 17:00 ` Dan Bryant
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Bryant @ 2020-11-11 15:06 UTC (permalink / raw)
  To: Bitcoin Protocol Discussion

[-- Attachment #1: Type: text/plain, Size: 2428 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 2999 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-21 22:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-11 15:06 [bitcoin-dev] Bitcoin Archaeology Dan Bryant
2020-11-14 17:00 ` Dan Bryant
2020-11-15  5:41   ` Dan Bryant
2020-11-21 22:59     ` Dan Bryant

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox