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: Re: [bitcoin-dev] Bitcoin Archaeology
Date: Sat, 14 Nov 2020 23:41:33 -0600	[thread overview]
Message-ID: <CAAUFj11kc1UwxMNu5qBwnp8L7ihrh5A8X5FXkjLMSkmLCKfC0Q@mail.gmail.com> (raw)
In-Reply-To: <CAAUFj11GMycwsEG+GmyitgdWLY6vL0US6xomOTbVw3b5YNoDKw@mail.gmail.com>

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

I think I'm set now.  I should have everything I need from v0.1.0 to 0.3.13
when they changed the compiler.  I'll refine it a bit more then eventually
start posting the binary builds on the repo below.  I might go ahead and
disable the IRC bot to ensure people don't inadvertently spam the
`#bitcoin` IRC.  Since I have a patch process worked out it should be
fairly straight forward.  Since the official builds pickup at v0.8.6, I'll
likely stop there.

https://github.com/brianddk/bitcoin-archaeology


On Sat, Nov 14, 2020 at 11:00 AM Dan Bryant <dkbryant@gmail.com> wrote:

> Finally got it working,but was a bit harder than I expected.  I had to
> forgo the OpenSSL modifications that Satoshi originally suggested.  I also
> switched to Strawberry Perl.  Those two changes seemed to fix the OpenSSL
> build.  Everything else was all essentially as documented in v0.4.0, which
> is the first version to put all the build steps out in detail.  The one
> exception is the bitcoin build itself.  There are three minor issues that
> can be worked around with copy commands.
>
> 1. The Makefile points to /wxWidgets/lib/vc_lib/ where it should really
> point to /wxWidgets/lib/gcc_lib/
> 2. The Makefile points to /OpenSSL/include where it should really point to
> /OpenSSL/outinc
> 3. The Makefile builds to /obj without first creating the directory
>
> That covers v0.1.5, and I think it will probably be smooth sailing from
> there all the way to v0.4.0.  I'll verify that my v0.1.5 toolchain can
> build v0.1.0 and v0.1.3 as well.  For anyone interested, here are the
> binaries I used to create the build environment.  All of them are
> vintage and would have been accessible to Satoshi with the exception of
> Win2012 and VirtualBox.  I'll try to reproduce my work on a Win2000 which
> is now quasi-open-domain.
>
> For anyone wanting to give it a shot...
>
> * https://www.microsoft.com/en-us/evalcenter/evaluate-hyper-v-server-2012
> *
> https://download.virtualbox.org/virtualbox/6.1.12/VirtualBox-6.1.12-139181-Win.exe
> * https://downloads.sourceforge.net/gnuwin32/zlib-1.2.3-bin.zip
> * https://downloads.sourceforge.net/gnuwin32/bzip2-1.0.5-bin.zip
> * https://downloads.sourceforge.net/gnuwin32/libarchive-2.4.12-1-bin.zip
> *
> https://downloads.sourceforge.net/mingw/binutils-2.19.1-mingw32-bin.tar.gz
> * https://downloads.sourceforge.net/mingw/gcc-core-3.4.5-20051220-1.tar.gz
> * https://downloads.sourceforge.net/mingw/gcc-g++-3.4.5-20051220-1.tar.gz
> *
> https://downloads.sourceforge.net/mingw/mingwrt-3.15.2-mingw32-dev.tar.gz
> *
> https://downloads.sourceforge.net/mingw/mingwrt-3.15.2-mingw32-dll.tar.gz
> * https://downloads.sourceforge.net/mingw/w32api-3.13-mingw32-dev.tar.gz
> *
> https://downloads.sourceforge.net/mingw/mingw32-make-3.81-20080326-2.tar.gz
> * https://downloads.sourceforge.net/mingw/MSYS-1.0.11.exe
> * https://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe
> * http://strawberryperl.com/download/5.8.8/strawberry-perl-5.8.8.2.zip
> * https://github.com/bitcoin/bitcoin/archive/v0.1.5.zip
> * https://downloads.sourceforge.net/wxwindows/wxWidgets-2.8.11.zip
> * https://github.com/openssl/openssl/archive/OpenSSL_0_9_8h.zip
> * https://download.oracle.com/berkeley-db/db-4.7.25.NC.zip
> * https://downloads.sourceforge.net/boost/1.37.0/boost_1_37_0.zip
> *
> https://downloads.sourceforge.net/boost/boost-jam/boost-jam-3.1.17-1-ntx86.zip
>
>
> On Wed, Nov 11, 2020 at 9:06 AM Dan Bryant <dkbryant@gmail.com> wrote:
>
>> 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: 9408 bytes --]

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

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=CAAUFj11kc1UwxMNu5qBwnp8L7ihrh5A8X5FXkjLMSkmLCKfC0Q@mail.gmail.com \
    --to=dkbryant@gmail.com \
    --cc=bitcoin-dev@lists.linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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