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 438C9C0800 for ; Sat, 14 Nov 2020 17:00:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 3A17A203CA for ; Sat, 14 Nov 2020 17:00:27 +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 uArMFhNS2cBK for ; Sat, 14 Nov 2020 17:00:24 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-il1-f194.google.com (mail-il1-f194.google.com [209.85.166.194]) by silver.osuosl.org (Postfix) with ESMTPS id 7820C203BD for ; Sat, 14 Nov 2020 17:00:24 +0000 (UTC) Received: by mail-il1-f194.google.com with SMTP id g15so11319217ilc.9 for ; Sat, 14 Nov 2020 09:00:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to; bh=beB7h6tLYJcDVV2vKrqLUd8QlfwZuKQSu28OS3JoI50=; b=PehkI29G6ZafdOXqGble2zPuNEyRehyXBh3pjPJWVC6qphaRMQ1i5Aqh7O+B7lkd3s bGNJHpeKsDLCyw3RMh06sHfNd1ZqGhUsJwdmuyA9O/cBRzJEMG9KDVeTN/g3cesb3WLo LnVGf5k6zKMO2Z03ugbo8vPGu3PWVR/e9a4CpQ8sdcq03JeBeQOvNfwEjFOvhNhaEEBe yLHNPk5qSLr2wHjSU1uUMoiBA0R3LhA8YOGvuMn81viw2o+WMw+NdHBZ9BGADJu2uwbS gmuDpUy7DMzbPOHCfi3Mr3+AGhAKpgJF1+968Mt17qOPDhvhUg3WH8N3scxQ1OOW4Hx9 zVHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to; bh=beB7h6tLYJcDVV2vKrqLUd8QlfwZuKQSu28OS3JoI50=; b=tLIrub7ddiCUmnwcdPy5hu4wwfcpo4hMqt5FTidxCNkwsuBu3wqDPB7KQSf5Nt3b/P pYjfI6XzTUav07auh8EdagxXngZYpPI53fZvv994w/339nnbTKIs01uiAT3MA7T1zYgi pdPM2KpnK8/nKO8BnLCmYE+AUJ6w4Ie+YpZcq2O5kOLhm3y30bqPbFZIirfKnC8a5Mep 0cU/uNpS+ZucUgObnc+NxXB0fc2CNAEAcEJlKPKSbwPVubw4ZmmNuwJBI3/p+J9DbvB6 KKOnmMVPls0os1sP2f3yTLJQ9IlcrD0jes2GxTMo/TzzBYeeTK82ad77B1qnKa+PX99X aauA== X-Gm-Message-State: AOAM532uv7IuJJQpAAMPCK1UTkD51TIhP+SXaBpmyGow+IsxYS0b9CW0 04h6S90G3nyho4fWS/xt6xmHTdPMfUaCWjuZ/mjLYjlXOeQ= X-Google-Smtp-Source: ABdhPJxsm4c21MbbLKMD11f91o6+/hC14Un/ezPa2qsn7tbYqnNZJpFnXh3h9vhYgOeGxX0rhtKaadd4qwFdhoeTVPY= X-Received: by 2002:a92:2e14:: with SMTP id v20mr3799597ile.192.1605373223334; Sat, 14 Nov 2020 09:00:23 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Reply-To: DKBryant@gmail.com From: Dan Bryant Date: Sat, 14 Nov 2020 11:00:12 -0600 Message-ID: To: Bitcoin Protocol Discussion Content-Type: multipart/alternative; boundary="000000000000b578a805b4141472" X-Mailman-Approved-At: Sat, 14 Nov 2020 17:10:39 +0000 Subject: Re: [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: Sat, 14 Nov 2020 17:00:27 -0000 --000000000000b578a805b4141472 Content-Type: text/plain; charset="UTF-8" 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 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 > > --000000000000b578a805b4141472 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Finally got it working,but was a bit harder than I expecte= d.=C2=A0 I had to forgo the OpenSSL modifications that Satoshi originally s= uggested.=C2=A0 I also switched to Strawberry Perl.=C2=A0 Those two changes= seemed to fix the OpenSSL build.=C2=A0 Everything else was all essentially= as documented in v0.4.0, which is the first version to put all the build s= teps out in detail.=C2=A0 The one exception is the bitcoin build itself.=C2= =A0 There are three minor issues that can be worked around with copy comman= ds.

1. The Makefile points to /wxWidgets/lib/vc_lib/ wh= ere it should really point to /wxWidgets/lib/gcc_lib/
2. The Makefile points to /OpenSSL/include where it should reall= y point to /OpenSSL/outinc
3. The Makefile builds to /obj without first creating the direct= ory

That covers v0.1.5, and I think it will probab= ly be smooth sailing from there all the way to v0.4.0.=C2=A0 I'll verif= y that my v0.1.5 toolchain can build v0.1.0 and v0.1.3 as well.=C2=A0 For a= nyone interested, here are the binaries I used to create the build environm= ent.=C2=A0 All of them are vintage=C2=A0and would have been accessible to S= atoshi with the exception of Win2012 and VirtualBox.=C2=A0 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-s= erver-2012
* https://download.virtualbox.org/vir= tualbox/6.1.12/VirtualBox-6.1.12-139181-Win.exe
* https://downloads.s= ourceforge.net/gnuwin32/zlib-1.2.3-bin.zip
* https://downloads.sourc= eforge.net/gnuwin32/bzip2-1.0.5-bin.zip
* https://downloads.= sourceforge.net/gnuwin32/libarchive-2.4.12-1-bin.zip
* h= ttps://downloads.sourceforge.net/mingw/binutils-2.19.1-mingw32-bin.tar.gz
*
https://downloads.sourceforge.net/mingw/gcc-core-3.4.5-20= 051220-1.tar.gz
* https://downloads.sourceforge.net/mingw/g= cc-g++-3.4.5-20051220-1.tar.gz
* https://downloads.source= forge.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/mingw3= 2-make-3.81-20080326-2.tar.gz
* https://downloads.sourceforge.net/mingw/MSY= S-1.0.11.exe
* https://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe<= /a>
*
http://strawberryperl.com/download/5.8.8/strawberry-perl-5.8= .8.2.zip
* https://github.com/bitcoin/bitcoin/archive/v0.1.5.zip
* h= ttps://downloads.sourceforge.net/wxwindows/wxWidgets-2.8.11.zip
* htt= ps://github.com/openssl/openssl/archive/OpenSSL_0_9_8h.zip
* https://downl= oad.oracle.com/berkeley-db/db-4.7.25.NC.zip
* https://downloads.sou= rceforge.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 I= nstitute, I thought it would be educational to do a build of the first thre= e versions of Bitcoin (v0.1.0, v0.1.3, and v0.1.5) [ref1].=C2=A0 Don't = worry, I will keep these on a VLAN and not spam the IRC 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 o= riginal Satoshi posts seem to imply that the builds could be done using Vis= ual 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 sourceforge.=C2=A0 Most thi= ngs seemed to build OK, with the exception of OpenSSL, which looks to fail = due to some issues in mk1mf.p= l [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 Has a= nyone been here long enough to recall the steps to build OpenSSL v0.9.8h in= MSYS 1.0.11?=C2=A0 Or, does anyone know where to find a non-sketchy=C2=A0c= opy of Visual C++ 6.0?

My options so far seem to b= e.

1. Try to find out how Satoshi did the MinGW Op= enSSL build back in 2009.
2. Try to do the OpenSSL build through = Cygwin which could cross-complile=C2=A0to MinGW at the time
3. Tr= y 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 li= st of headers through 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 parse= d, but the directories are dropped when building the make rules causing mak= e to assume all headers are at root, failing the build.=C2=A0 Perhaps there= is a version sed, basename or dirname that is missing in MSYS, but I'v= e failed to find the dependency yet.


--000000000000b578a805b4141472--