Building Musltronic GNAT: Part 2

I recently made a post about building a musltronic GNAT for Cuntoo. Today, I wanted to write about my success with building ave1's latest version 2018-09-24, as I said I would in the previous post.

I took the same basic steps that I took with the previous version, detailed in the previous post. What follows is my log of the building of the 2018-09-24 version, as well as some testing steps on the Cuntoo target machine:

mod6@gentoo-lappy ~/AVE1_GNAT $ gpg --verify ada-musl-cross-2018-09-24.txt
gpg: Signature made Mon Sep 24 05:12:01 2018 CDT using RSA key ID 77BC59F9
gpg: Good signature from "ave--"
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 57EE 94EA 6F20 49A4 7DAF  A856 8F4C E8F7 77BC 59F9
mod6@gentoo-lappy ~/AVE1_GNAT $ su
gentoo-lappy AVE1_GNAT # tar -xf ada-musl-cross-2018-09-24.tgz
gentoo-lappy AVE1_GNAT # cd ada-musl-cross-2018-09-24
gentoo-lappy AVE1_GNAT # gnat --version
GNAT GPL 2016 (20160515-49)
Copyright (C) 1996-2016, Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

gentoo-lappy AVE1_GNAT # cd ada-musl-cross-2018-09-24
gentoo-lappy ada-musl-cross-2018-09-24 # mkdir bin
gentoo-lappy ada-musl-cross-2018-09-24 # ls -al
total 92
drwx------ 7  902 users 4096 Apr 21 14:49 .
drwxr-xr-x 6 mod6 mod6  4096 Apr 21 14:49 ..
-rw------- 1  902 users 4354 Sep 24  2018 README.md
drwxr-xr-x 2 root root  4096 Apr 21 14:49 bin
-rwx------ 1  902 users  186 Sep 24  2018 build-ada-arm64.sh
-rwx------ 1  902 users  187 Sep 24  2018 build-ada.sh
-rwx------ 1  902 users 2764 Sep 24  2018 build-native.sh
-rwx------ 1  902 users 4512 Sep 24  2018 build.sh
-rwx------ 1  902 users  125 Sep 24  2018 clean.sh
-rw------- 1  902 users  448 Sep 24  2018 config-static.sh
-rw------- 1  902 users  762 Sep 24  2018 config.sh
-rw------- 1  902 users 8931 Sep 24  2018 defs.sh
-rwx------ 1  902 users 2018 Sep 24  2018 download-adacore-2015.sh
-rwx------ 1  902 users 2685 Sep 24  2018 download-adacore-2016.sh
drwx------ 2  902 users 4096 Sep 24  2018 extra
-rw------- 1  902 users   41 Sep 24  2018 extraconfig.sh
drwx------ 2  902 users 4096 Sep 24  2018 hashes
drwx------ 2  902 users 4096 Sep 24  2018 patches
drwx------ 2  902 users 4096 Sep 24  2018 tarballs

gentoo-lappy ada-musl-cross-2018-09-24 # vim ~/.bashrc
gentoo-lappy ada-musl-cross-2018-09-24 # tail -1 /root/.bashrc
PATH="/home/mod6/AVE1_GNAT/ada-musl-cross-2018-09-24/bin/x86_64-linux-musl/bin/:$PATH"; export PATH
gentoo-lappy ada-musl-cross-2018-09-24 # source ~/.bashrc
gentoo-lappy ada-musl-cross-2018-09-24 # echo $PATH
/home/mod6/AVE1_GNAT/ada-musl-cross-2018-09-24/bin/x86_64-linux-musl/bin/:/usr/gnat/bin:/sbin:/bin:/usr/sbin:/usr/bin
gentoo-lappy ada-musl-cross-2018-09-24 # export MAKEOPTS=-j4
gentoo-lappy ada-musl-cross-2018-09-24 # echo $MAKEOPTS
-j4

gentoo-lappy ada-musl-cross-2018-09-24 # nohup ./build-ada.sh /home/mod6/AVE1_GNAT/ada-musl-cross-2018-09-24/bin &

... Some hours later ...

gentoo-lappy ada-musl-cross-2018-09-24 # cd bin
gentoo-lappy bin # pwd
/home/mod6/AVE1_GNAT/ada-musl-cross-2018-09-24/bin
gentoo-lappy bin # ls -al
total 837704
drwxr-xr-x  7 root root       4096 Apr 21 20:05 .
drwx------ 12  902 users      4096 Apr 21 14:58 ..
drwxr-xr-x  8 root root       4096 Apr 21 17:52 aarch64-linux-musl
drwxr-xr-x  9 root root       4096 Apr 21 20:07 aarch64-linux-musl-native
drwxr-xr-x  8 root root       4096 Apr 21 15:41 bootstrap
-rw-r--r--  1 root root  277760306 Apr 21 20:07 muslaarch64-linux-musl-nativeada.tar.gz
-rw-r--r--  1 root root  135554542 Apr 21 17:52 muslaarch64-linux-muslada.tar.gz
-rw-r--r--  1 root root  298885391 Apr 21 19:00 muslx86_64-linux-musl-nativeada.tar.gz
-rw-r--r--  1 root root  145566406 Apr 21 16:50 muslx86_64-linux-muslada.tar.gz
drwxr-xr-x  8 root root       4096 Apr 21 16:50 x86_64-linux-musl
drwxr-xr-x  8 root root       4096 Apr 21 19:00 x86_64-linux-musl-native
gentoo-lappy bin # sha512sum musl*.tar.gz
97115def5223707837ab83ec661d6f418ef8e4c54cb0a729559011d4b18f1f516cb74ec4a2f4a86a388cfcabadaa542b6fc4cf56521478b089ebe342a4a14765  muslaarch64-linux-musl-nativeada.tar.gz
98c8185f4a38c1db8069915f704cfafabf929a935245b49d3598783106fce3af7fca7e0dee5643bc08ddd2d6f92c31368cfc2e39657cfcd771f281aa031eae91  muslaarch64-linux-muslada.tar.gz
f56931c10a5d49ab779cf3a3b034d5080bb45c1210ae44198900ed16c61391da98aafe1959b65155c1cf3c32899f8320d0b336ad865bba3945f3621728e15b12  muslx86_64-linux-musl-nativeada.tar.gz
04f5506532b512f856a922278a0227eaca52abe30e5ffe0a3f47ab48b3aa5112f12b155878eff2c7c59f89f768f49431249209037ad057cc6f1b45728d45a963  muslx86_64-linux-muslada.tar.gz
gentoo-lappy bin #

# I then copied up these two tarballs to my cuntoo-test1 machine:
muslx86_64-linux-musl-nativeada.tar.gz
muslx86_64-linux-muslada.tar.gz

# I then created a directory for ave1's 2018-09-24 version:
cuntoo-test1 /opt # mkdir 20180924
cuntoo-test1 /opt # cd 20180924
cuntoo-test1 /opt/20180924 # cp /home/mod6/AVE1_GNAT/20180924/muslx86_64-linux-musl-nativeada.tar.gz .
cuntoo-test1 /opt/20180924 # tar -xf muslx86_64-linux-musl-nativeada.tar.gz
cuntoo-test1 /opt/20180924 # ls
muslx86_64-linux-musl-nativeada.tar.gz  x86_64-linux-musl-native

Back to a regular mod6 shell...

mod6@cuntoo-test1 ~ $ source ~/.bashrc
mod6@cuntoo-test1 ~ $ tail -1 ~/.bashrc
export PATH="$PATH:/opt/20180924/x86_64-linux-musl-native/bin"
mod6@cuntoo-test1 ~ $ echo $PATH
/usr/gnat/bin:/usr/x86_64-gentoo-linux-musl/gcc-bin/4.9.4:/usr/local/bin:/usr/bin:/bin:/opt/bin:/opt/20180924/x86_64-linux-musl-native/bin
mod6@cuntoo-test1 ~ $ command -v gnat
/opt/20180924/x86_64-linux-musl-native/bin/gnat
mod6@cuntoo-test1 ~ $ gnat --version
GNAT GPL 2016 (20160515)
Copyright (C) 1996-2016, Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

mod6@cuntoo-test1 ~ $ command -v gnat
/opt/20180924/x86_64-linux-musl-native/bin/gnat
mod6@cuntoo-test1 ~ $ /opt/20180924/x86_64-linux-musl-native/bin/gnat --version
GNAT GPL 2016 (20160515)
Copyright (C) 1996-2016, Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

mod6@cuntoo-test1 ~ $
mod6@cuntoo-test1 ~/test-ave1gnat-20180924 $ curl -sL "http://ossasepia.com/vpatches/starter_v.zip" -O
mod6@cuntoo-test1 ~/test-ave1gnat-20180924 $ curl -sL "http://ossasepia.com/vpatches/starter_v.zip.diana_coman.sig" -O
mod6@cuntoo-test1 ~/test-ave1gnat-20180924 $ gpg --import ../diana_coman.asc
gpg: key 390F999E: "Diana Coman " not changed
gpg: Total number processed: 1
gpg:              unchanged: 1
mod6@cuntoo-test1 ~/test-ave1gnat-20180924 $ gpg --verify starter_v.zip.diana_coman.sig starter_v.zip
gpg: Signature made Wed Nov 14 10:39:50 2018 UTC using RSA key ID 390F999E
gpg: Good signature from "Diana Coman "
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: E72D CCB7 3A5E 0669 4C5C  D781 D519 6EE6 390F 999E
mod6@cuntoo-test1 ~/test-ave1gnat-20180924 $ unzip starter_v.zip                                                                                                                                                    [3/76]
Archive:  starter_v.zip
   creating: starter_v/
  inflating: starter_v/clean.sh
  inflating: starter_v/build.sh
   creating: starter_v/vtools/
  inflating: starter_v/vtools/vdiff.gpr
  inflating: starter_v/vtools/vpatch.gpr
  inflating: starter_v/vtools/Makefile
  inflating: starter_v/vtools/ksum.gpr
  inflating: starter_v/vtools/manifest
   creating: starter_v/v/
  inflating: starter_v/v/v.pl
  inflating: starter_v/v/v_quick_start.txt
  inflating: starter_v/v/manifest
   creating: starter_v/vtools/src/
  inflating: starter_v/vtools/src/bits.ads
  inflating: starter_v/vtools/src/keccak_c.adb
  inflating: starter_v/vtools/src/vpatch.adb
  inflating: starter_v/vtools/src/dir.c
  inflating: starter_v/vtools/src/util.c
  inflating: starter_v/vtools/src/keccak.h
  inflating: starter_v/vtools/src/diff.h
  inflating: starter_v/vtools/src/bits.adb
  inflating: starter_v/vtools/src/character_io.ads
  inflating: starter_v/vtools/src/context.c
  inflating: starter_v/vtools/src/smg_keccak.adb
  inflating: starter_v/vtools/src/character_io.adb
  inflating: starter_v/vtools/src/ksum.adb
  inflating: starter_v/vtools/src/analyze.c
  inflating: starter_v/vtools/src/keccak_c.ads
  inflating: starter_v/vtools/src/io.c
  inflating: starter_v/vtools/src/diff.c
  inflating: starter_v/vtools/src/smg_keccak.ads
  inflating: starter_v/vtools/src/system.h
   creating: starter_v/vtools/lib/
  inflating: starter_v/vtools/lib/hash.c
  inflating: starter_v/vtools/lib/cmpbuf.c
  inflating: starter_v/vtools/lib/progname.c
  inflating: starter_v/vtools/lib/filetype.h
  inflating: starter_v/vtools/lib/xalloc.c
  inflating: starter_v/vtools/lib/dirname.h
  inflating: starter_v/vtools/lib/filetype.c
  inflating: starter_v/vtools/lib/progname.h
  inflating: starter_v/vtools/lib/cmpbuf.h
  inflating: starter_v/vtools/lib/error.h
  inflating: starter_v/vtools/lib/error.c
  inflating: starter_v/vtools/lib/filenamecat.c
  inflating: starter_v/vtools/lib/dirname.c
  inflating: starter_v/vtools/lib/diffseq.h
  inflating: starter_v/vtools/lib/hash.h
  inflating: starter_v/vtools/lib/filenamecat.h
  inflating: starter_v/vtools/lib/xalloc.h
   creating: starter_v/vtools/obj/
 extracting: starter_v/vtools/obj/readme
mod6@cuntoo-test1 ~/test-ave1gnat-20180924 $ cd starter_v
mod6@cuntoo-test1 ~/test-ave1gnat-20180924/starter_v $ chmod +x build.sh
mod6@cuntoo-test1 ~/test-ave1gnat-20180924/starter_v $ ./build.sh
Compile
   [C]            diff.c
   [C]            filetype.c
   [C]            error.c
   [C]            cmpbuf.c
   [C]            progname.c
   [C]            dirname.c
   [C]            hash.c
   [C]            filenamecat.c
   [C]            xalloc.c
   [C]            dir.c
   [C]            io.c
   [C]            util.c
   [C]            context.c
   [C]            analyze.c
   [Ada]          bits.adb
   [Ada]          ksum.adb
   [Ada]          character_io.adb
   [Ada]          keccak_c.adb
   [Ada]          smg_keccak.adb
Bind
   [gprbind]      diff.bexch
   [Ada]          bits.ali -n
Link
   [archive]      libvdiff.a
   [index]        libvdiff.a
   [link]         diff.c
Compile
   [Ada]          vpatch.adb
Bind
   [gprbind]      vpatch.bexch
   [Ada]          vpatch.ali
Link
   [link]         vpatch.adb
Bind
   [gprbind]      ksum.bexch
   [Ada]          ksum.ali
Link
   [link]         ksum.adb
Done.

mod6@cuntoo-test1 ~/test-ave1gnat-20180924/starter_v $ cd ..
mod6@cuntoo-test1 ~/test-ave1gnat-20180924 $ cp ../ffa/ffa-keccak.tar.gz .
mod6@cuntoo-test1 ~/test-ave1gnat-20180924 $ mkdir ffa
mod6@cuntoo-test1 ~/test-ave1gnat-20180924 $ mv ffa-keccak.tar.gz ffa
mod6@cuntoo-test1 ~/test-ave1gnat-20180924 $ cd ffa/
mod6@cuntoo-test1 ~/test-ave1gnat-20180924/ffa $ tar -xf ffa-keccak.tar.gz
mod6@cuntoo-test1 ~/test-ave1gnat-20180924/ffa $ mkdir -p .wot patches .seals
mod6@cuntoo-test1 ~/test-ave1gnat-20180924/ffa $ mv keccak/*.sig .seals/
mod6@cuntoo-test1 ~/test-ave1gnat-20180924/ffa $ mv keccak/*.vpatch patches/
mod6@cuntoo-test1 ~/test-ave1gnat-20180924/ffa $ cp ../starter_v/vk.pl .
mod6@cuntoo-test1 ~/test-ave1gnat-20180924/ffa $ ./vk.pl w
asciilifeform:17215D118B7239507FAFED98B98228A001ABFFC7:Stanislav Datskovskiy 
mod6@cuntoo-test1 ~/test-ave1gnat-20180924/ffa $ ./vk.pl f
ffa_ch1_genesis.kv.vpatch (asciilifeform)
ffa_ch2_logicals.kv.vpatch (asciilifeform)
ffa_ch3_shifts.kv.vpatch (asciilifeform)
ffa_ch4_ffacalc.kv.vpatch (asciilifeform)
ffa_ch5_egypt.kv.vpatch (asciilifeform)
ffa_ch6_simplest_rsa.kv.vpatch (asciilifeform)
ffa_ch7_turbo_egyptians.kv.vpatch (asciilifeform)
ffa_ch8_randomism.kv.vpatch (asciilifeform)
ffa_ch9_exodus.kv.vpatch (asciilifeform)
ffa_ch10_karatsuba.kv.vpatch (asciilifeform)
ffa_ch11_tuning_and_api.kv.vpatch (asciilifeform)
ffa_ch12_karatsuba_redux.kv.vpatch (asciilifeform)
ffa_w_borrow_expr.kv.vpatch (asciilifeform)
ffa_ch13_measure_and_qshifts.kv.vpatch (asciilifeform)
ffa_ch14_barrett.kv.vpatch (asciilifeform)
ffa_ch15_gcd.kv.vpatch (asciilifeform)
ffa_ch16_miller_rabin.kv.vpatch (asciilifeform)
ffa_ch17_peh.kv.vpatch (asciilifeform)
ffa_ch18_subroutines.kv.vpatch (asciilifeform)
mod6@cuntoo-test1 ~/test-ave1gnat-20180924/ffa $ ./vk.pl p v ch1 ffa_ch1_genesis.kv.vpatch
ffa_ch1_genesis.kv.vpatch
  creating ffa/README
  creating ffa/ffademo/README
  creating ffa/ffademo/bin/README
  creating ffa/ffademo/demo_ch1.adb
  creating ffa/ffademo/demo_ch1.ads
  creating ffa/ffademo/ffa_demo.adb
  creating ffa/ffademo/ffa_demo.gpr
  creating ffa/ffademo/ffa_io.adb
  creating ffa/ffademo/ffa_io.ads
  creating ffa/ffademo/obj/README
  creating ffa/libffa/README
  creating ffa/libffa/ffa.gpr
  creating ffa/libffa/fz_arith.adb
  creating ffa/libffa/fz_arith.ads
  creating ffa/libffa/fz_type.ads
  creating ffa/libffa/iron.ads
  creating ffa/libffa/lib/README
  creating ffa/libffa/obj/README
  creating ffa/libffa/restrict.adc
  creating ffa/libffa/w_shifts.ads
  creating ffa/libffa/word_ops.adb
  creating ffa/libffa/word_ops.ads
  creating ffa/libffa/words.ads

mod6@cuntoo-test1 ~/test-ave1gnat-20180924/ffa $ cd ch1/ffa/ffademo/
mod6@cuntoo-test1 ~/test-ave1gnat-20180924/ffa/ch1/ffa/ffademo $ gprbuild
using project file ffa_demo.gpr
Compile
   [Ada]          ffa_demo.adb
   [Ada]          iron.ads
   [Ada]          word_ops.adb
   [Ada]          w_shifts.ads
   [Ada]          fz_arith.adb
   [Ada]          words.ads
   [Ada]          fz_type.ads
   [Ada]          demo_ch1.adb
   [Ada]          ffa_io.adb
Build Libraries
   [gprlib]       FFA.lexch
   [archive]      libFFA.a
   [index]        libFFA.a
Bind
   [gprbind]      ffa_demo.bexch
   [Ada]          ffa_demo.ali
Link
   [link]         ffa_demo.adb
mod6@cuntoo-test1 ~/test-ave1gnat-20180924/ffa/ch1/ffa/ffademo $ bin/ffa_demo
X         =
0000000000000000000000000000000000000000000000000000000000000000
Y         =
0000000000000000000000000000000000000000000000000000000000005555
X + Y     =
0000000000000000000000000000000000000000000000000000000000005555
C         =  0
X - Y     =
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAAAB
C         =  1
mod6@cuntoo-test1 ~/test-ave1gnat-20180924/ffa/ch1/ffa/ffademo $

One Response to “Building Musltronic GNAT: Part 2”

  1. [...] mod6's Blog « Building Musltronic GNAT: Part 2 [...]

Leave a Reply