public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Dan Bryant <dkbryant@gmail•com>
To: Bitcoin Protocol Discussion <bitcoin-dev@lists•linuxfoundation.org>
Subject: [bitcoin-dev] Bitcoin Archaeology
Date: Wed, 11 Nov 2020 09:06:54 -0600	[thread overview]
Message-ID: <CAAUFj113SCpCKyXwVqt+dtcHczNMZD7hPj8D65oDZHkhpx+rzA@mail.gmail.com> (raw)

[-- 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 --]

             reply	other threads:[~2020-11-11 15:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-11 15:06 Dan Bryant [this message]
2020-11-14 17:00 ` Dan Bryant
2020-11-15  5:41   ` Dan Bryant
2020-11-21 22:59     ` Dan Bryant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAUFj113SCpCKyXwVqt+dtcHczNMZD7hPj8D65oDZHkhpx+rzA@mail.gmail.com \
    --to=dkbryant@gmail$(echo .)com \
    --cc=bitcoin-dev@lists$(echo .)linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox