07 September 2017

bootstrapping go

System: Microsoft Windows XP Home Edition
CPUs: Intel(R) Atom(TM) CPU N270 @1.60GHz

See also the earlier post.

https://golang.org/doc/install/source
go1.4-bootstrap-20170531.tar.gz

I might modify src\cmd\dist\unix.c and write an interix.c file for that directory.

Either bash would need to be compiled for Interix or maybe the code could be
changed for use by other shells, possibly src\make.bash might need though to
be patched if that shell was utilised.

MS deprected Interix beginning with Windows 8.0, but the feasibility of running
SUA on Windows 10 S 64bit, on which WSL can not be enabled, intrigues me.

I considered earlier the possibility of compiling ghc under Interix.

Windows Vista and newer included in addition to gcc-3.3 also -4.2.

06 September 2017

Xapian

System: Microsoft Windows XP Home Edition
CPUs: Intel(R) Atom(TM) CPU N270 @1.60GHz

This post is not finished.

Installation of xapian-core-1.2.8.

This is an old thread but someone recently wrote me of an interest in compiling
the 1.2.x series Xapian under VS2013. I do not have access to that release but
on an XP machine I have VS2008.

https://lists.xapian.org/pipermail/xapian-devel/2012-October/001883.html

28 August 2017

bootstrapping go

System: Slackware Linux (version 14.0)
CPUs: Intel(R) Atom(TM) CPU N270 @1.60GHz
Deps: go1.4-bootstrap-20170531.tar.gz,
go1.9.src.tar.gz

I haven't tested V. Batts Slackbuild (unmodified or modified) on the
Slackware Linux version for which it was written, namely 14.2; this
post uses version 14.0. Furthermore I don't allocate for cgo, if you
are interested in that read the make.bash file.

Go 1.4 was the last version where the toolchain was written in C.

This entry will compile 1.4 and then use that to bootstrap 1.9.

https://golang.org/doc/install/source
go1.4-bootstrap-20170531.tar.gz

Download and extract the above file into root's home directory,
rename the folder, then cd into go1.4/src and run make.bash.

bash-4.2# tar xvf go1.4-bootstrap-20170531.tar.gz

...

bash-4.2# mv go go1.4
bash-4.2# cd go1.4/src
bash-4.2# ./make.bash

...

Installed Go for linux/386 in /root/go1.4
Installed commands in /root/go1.4/bin
bash-4.2# exit

http://slackbuilds.org/repository/14.2/development/google-go-lang/
google-go-lang.tar.gz

Download and extract the above file into root's home directory,
and then edit the google-go-lang.SlackBuild file as follows.

- VERSION=${VERSION:-1.8.3}
+ VERSION=${VERSION:-1.9}

- export GOROOT_BOOTSTRAP="/usr" # gcc 5+ is go1.4 API, so we'll bootstrap with it
+ # export GOROOT_BOOTSTRAP="/usr" # gcc 5+ is go1.4 API, so we'll bootstrap with it

https://golang.org/dl/
go1.9.src.tar.gz

Download the above file, then copy it into ~/google-go-lang
and build.

bash-4.2# cd google-go-lang
bash-4.2# ./google-go-lang.SlackBuild

...

Slackware package /tmp/google-go-lang-1.9-i586-1_SBo.tgz created.

bash-4.2#  cd ..
bash-4.2# rm -r go1.4
bash-4.2# rm -r google-go-lang
bash-4.2# rm -r /tmp/SBo
bash-4.2# installpkg /tmp/google-go-lang-1.9-i586-1_SBo.tgz
Verifying package google-go-lang-1.9-i586-1_SBo.tgz.
Installing package google-go-lang-1.9-i586-1_SBo.tgz:
PACKAGE DESCRIPTION:
# google-go-lang (Google's Go Language kit with gc tool chain)
#
# The Go programming language is an open source project to make
# programmers more productive. Go is expressive, concise, clean, and
# efficient. Its concurrency mechanisms make it easy to write programs
# that get the most out of multicore and networked machines, while its
# novel type system enables flexible and modular program construction.
#
Package google-go-lang-1.9-i586-1_SBo.tgz installed.

bash-4.2# exit

The makepkg script called by the Slackbuild will output a warning about
about issue6550.gz, this is expected, the file is used by gunzip_test.go.

Generally SlackBuild scripts will contain lines like the following after the
executables and dynamic libraries are compiled. The go source however
already contains some executables, so if only the newly generated files
were to be stripped, I might modify the build adding code to strip those
files in bin and libstd.so.

find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | \
 grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

Reboot and test your installation.

https://golang.org/doc/install/source#testing

Go 1.9 release notes.

15 August 2017

9p

System: Microsoft Windows 10 Home Edition
CPUs: Intel(R) Celeron(R) CPU N3060 @1.60GHz
64-bit Operating System, x64-based processor
Deps: vs_community__1560150700.1495339730.exe,
Setup-Subversion-1.8.17.msi, Python-3.6.1.tar.xz

This post is not finished.

See the 9pvfs post for the Visual Studio setup, and
the vim-notebook post for the python3 installation.

Installation of T. Newsham's 9P client/server implementation in Python.

http://www.thenewsh.com/~newsham/plan9/
9p.tgz

https://github.com/nurmi-labs/py9p
py9p-master.zip

Presently I don't have Plan 9 installed on a machine, and am unable to test the upgrade to python3.

https://www.dlitz.net/software/pycrypto/

https://www.pycryptodome.org/en/latest/

NB: The instructions for a Vim80 64bit compile will produce an executable enabled for arabic, farsi,
and python3.

Currently available functional programming languages' 9P implementations.

http://nurmi-labs.blogspot.com/2017/01/patching-network-ninep.html

http://nurmi-labs.blogspot.com/p/9p-scheme.html

http://chicken.kitten-technologies.co.uk/cache/4/9p/0.9/
[depends on A. Shinn's integer sets (isets)]

11 August 2017

test_distutils

See this post.
Updated: 09-11-2017

https://bugs.python.org/issue30389
https://github.com/python/cpython/commit/05f01d85257d0f3409c7335aaf0bf6a6da7eecb7
https://github.com/python/cpython/commit/af8d6b90723daa943c5cd0a38ee7564790d8687a

The cause of the FAILURE has now been fixed.

This Post will eventually be deleted.

After writing this patch for use on Windows 10 64bit I realised that 32bit installations
are not allocated for, that considered an IF block might be more appropriate, however
it is beyond the scope of this post to assess the frequency among that OS versions'
users running 32bit releases. Furthermore, as I'm on 64bit I am uninformed whether
VS2017 on 32bit factually has an HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VC7
Registry key.

I'll probably subsequent to error resolution merge this content with the vim-notebook post.

A more VS2017 specific solution would be to add a new Registry key pointing to the
'Build' directory, and then modify the _msvccompiler.py file to contain that new key.

As VS2017 has a Registry key as follows

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7

Value name:
15.0

Value data:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\

copying %VSINSTALLDIR%VC\Auxiliary\Build\vcvarsall.bat

to %VSINSTALLDIR%

and modifying Python-3.6.2\Lib\distutils\_msvccompiler.py

- r"Software\Microsoft\VisualStudio\SxS\VC7",
+ r"SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7",

then opening an x64 Native Tools Command Prompt for VS 2017 and running test_distutils
and test_distutils.py (verbose mode) produced the following output.

**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.0.26430.16
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

C:\Windows\System32>CD \Python-3.6.2\PCBuild

C:\Python-3.6.2\PCbuild>rt.bat -x64 test_distutils

...

test test_distutils failed -- Traceback (most recent call last):
  File "C:\Python-3.6.2\lib\distutils\tests\test_msvccompiler.py", line 79, in test_vcruntime_skip_copy
    self.assertTrue(os.path.isfile(dll))
AssertionError: False is not true

test_distutils failed

1 test failed:
    test_distutils

Total duration: 11 sec
Tests result: FAILURE

C:\Python-3.6.2\PCbuild>

C:\Python-3.6.2\PCbuild>CD amd64

C:\Python-3.6.2\PCbuild\amd64>python.exe ..\..\Lib\test\test_distutils.py

...

======================================================================
FAIL: test_vcruntime_skip_copy (distutils.tests.test_msvccompiler.msvccompilerTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Python-3.6.2\lib\distutils\tests\test_msvccompiler.py", line 79, in test_vcruntime_skip_copy
    self.assertTrue(os.path.isfile(dll))
AssertionError: False is not true

----------------------------------------------------------------------
Ran 236 tests in 14.125s
FAILED (failures=1, skipped=26)
Traceback (most recent call last):
  File "..\..\Lib\test\test_distutils.py", line 18, in <module>
    test_main()
  File "..\..\Lib\test\test_distutils.py", line 13, in test_main
    test.support.run_unittest(distutils.tests.test_suite())
  File "C:\Python-3.6.2\lib\test\support\__init__.py", line 1929, in run_unittest
    _run_suite(suite)
  File "C:\Python-3.6.2\lib\test\support\__init__.py", line 1898, in _run_suite
    raise TestFailed(err)
test.support.TestFailed: Traceback (most recent call last):
  File "C:\Python-3.6.2\lib\distutils\tests\test_msvccompiler.py", line 79, in test_vcruntime_skip_copy
    self.assertTrue(os.path.isfile(dll))
AssertionError: False is not true

C:\Python-3.6.2\PCbuild\amd64>

https://github.com/python/cpython/blob/master/Lib/distutils/_msvccompiler.py
https://github.com/python/cpython/blob/master/Lib/distutils/tests/test_msvccompiler.py

10 August 2017

cURL

System: Microsoft Windows 10 Home Edition
CPUs: Intel(R) Celeron(R) CPU N3060 @1.60GHz
64-bit Operating System, x64-based processor
Deps: vs_community__1560150700.1495339730.exe,
curl-7.55.0.zip

Installation of curl-7.55.0.

https://www.visualstudio.com/downloads/
vs_community__1560150700.1495339730.exe

See the 9pvfs post for the Visual Studio setup,
and OpenSSL installation.

https://curl.haxx.se/download.html
curl-7.55.0.zip

Open an x64_x86 Cross Tools Command Prompt as an administrator.

**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.0.26430.16
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64_x86'

C:\Windows\System32>CD \curl-7.55.0\winbuild

C:\curl-7.55.0\winbuild>nmake.exe /f Makefile.vc mode=dll WITH_DEVEL=c:\progra~2\openssl WITH_SSL=dll ENABLE_WINSSL=no MACHINE=x86

...

C:\curl-7.55.0\winbuild>MOVE ..\builds\libcurl-vc-x86-release-dll-ssl-dll-ipv6-sspi c:\progra~2\curl
        1 dir(s) moved.

C:\curl-7.55.0\winbuild>EXIT

Add "C:\Program Files (x86)\curl" to your System Environment Variable PATH.

08 August 2017

Eris

System: Slackware Linux (version 14.0)
CPUs: Intel(R) Atom(TM) CPU N270 @1.60GHz
Deps: eris-master.zip, ucspi-tcp-0.88.tar.gz

Installation of N. Pickett's eris-4.4.

http://slackbuilds.org/repository/14.2/network/ucspi-tcp/

bash-4.2# installpkg ucspi-tcp-0.88-486-1_SBo.tgz

...

bash-4.2# exit

https://github.com/nealey/eris
eris-master.zip

bash-4.2#  cd eris
bash-4.2# make
awk -F : 'NR==1 {printf("const char *FNORD = \"eris/%s\";\n", $1);}' CHANGES > version.h
cc -Wall -Werror   -c -o eris.o eris.c
cc -Wall -Werror   -c -o strings.o strings.c
cc -Wall -Werror   -c -o mime.o mime.c
cc -Wall -Werror   -c -o timerfc.o timerfc.c
cc   eris.o strings.o mime.o timerfc.o   -o eris
bash-4.2#

bash-4.2# ./test.sh
HTTPD: ./eris 
CGI:   ./eris -c 
IDX:   ./eris -d 
Basic tests          .............
Options              .
Tomfoolery           .....
If-Modified-Since    ........
Directory indexing   ...
CGI                  .............
Timeouts             .
CONNECT handler      .
fnord bugs           .......
52 of 52 tests passed (0 failed).
bash-4.2# exit