Gridcoin Compiles on Xenial


I know it might not mean anything to the non-techs, and it might seem insignificant to the uber-techs.

I have successfully built the Gridcoin client on Xenial 16.04.4 with proper libraries, and confirmed it sees my testnet wallet, and overall is just working like it should. (No testplan per se.)

This is a major accomplishment for me, and makes me very excited. It takes 16 minutes to compile with 3 cores of i7-6820HQ CPU @ 2.70GHz and 3.2GB RAM.

I get some QT warnings, but they do not seem to break anything:

/usr/include/x86_64-linux-gnu/qt5/QtCore/qlogging.h:112:73: note: in expansion of macro ‘Q_ATTRIBUTE_FORMAT_PRINTF’
void critical(CategoryFunction catFunc, const char *msg, ...) const Q_ATTRIBUTE_FORMAT_PRINTF(3, 4);

Here is my build environment setup procedure.

### Xenial Build Environment References
http://wiki.gridcoin.us/Linux_guide
https://raw.githubusercontent.com/gridcoin/Gridcoin-Research/master/CompilingGridcoinOnLinux.txt
Google searches for libqt5charts for xenial (KDE Neon distribution)

https://88plug.com/linux/install-berkeley-4-8-db-libs-on-ubuntu-16-04

##########################################
### Intall libqt5charts5-dev and related files from Neon LTS
cat < <‘EOF’ > /etc/apt/sources.list.d/kde-neon-archive-xenial.list
deb http://archive.neon.kde.org/testing-qt xenial main
deb http://archive.neon.kde.org/user/lts xenial main
EOF
sudo apt update
sudo upgrade
sudo apt install ntp git build-essential curl libcurl4-openssl-dev libcurl3-dev libssl-dev libzip-dev libzip4 libdb-dev libdb++-dev \
libdb4.8-dev libdb4.8++-dev debhelper devscripts automake libtool pkg-config libprotobuf-dev protobuf-compiler libminiupnpc-dev \
autotools-dev libevent-dev bsdmainutils software-properties-common libboost-all-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev \
libqrencode-dev qt-sdk qtcreator libqt5charts5-dev qt5-default qttools5-dev-tools libqt5webkit5-dev libqt5charts5-dev
sudo apt-get autoremove

### Change the distro back to Ubuntu from Neon
echo “DISTRIB_ID=Ubuntu” >> /etc/lsb-release

### Install BDB 4.8 on Xenial
sudo add-apt-repository ppa:bitcoin/bitcoin ## Stable
#sudo add-apt-repository ppa:bitcoin/rc ## testing
sudo apt update
sudo apt install libdb4.8-dev libdb4.8++-dev

##########################################
### New download
cd ~
git clone https://github.com/gridcoin/Gridcoin-Research
cd ~/Gridcoin-Research

### Optional if issues
git config –global http.sslverify false

##########################################
### Refresh download – master, hotfix, staging
cd ~/Gridcoin-Research
make clean
git fetch –all
git reset –hard origin/master

### Build Daemon
cd ~/Gridcoin-Research/src
make clean
mkdir obj
chmod 755 leveldb/build_detect_platform
make -j3 -f makefile.unix USE_UPNP=-
strip gridcoinresearchd
install -m 755 gridcoinresearchd ~/.Gridcoinresearchd/testnet/gridcoinresearchd
### The above probably wants sudo, and a target of /usr/bin

### Build GUI
cd ~/Gridcoin-Research
rm -f build/o.*
qmake gridcoinresearch.pro “USE_UPNP=-”
make -j3
strip gridcoinresearch
install -m 755 gridcoinresearch ~/.Gridcoinresearchd/testnet/gridcoinresearch
### The above probably wants sudo, and a target of /usr/bin

##########################################
### Refresh download, development
cd ~/Gridcoin-Research
make clean
git fetch –all
git reset –hard origin/development

### Build Autotools
cd ~/Gridcoin-Research
./autogen.sh
#./configure –with-incompatible-bdb ### If you do not have BDB 4.8
./configure
date ; make -j3 ; date
make install

###############################


GRC VM Template

Installed base OS

Ubuntu 16.04.4 LTS  because only LTS releases are worthy.  No auto-updates.
Copy over home directory and /etc/apt from my current TESTNET system

Split /home /usr /var /tmp into separate LVs.

lvcreate, edit /etc/fstab, mount on temp space, copy over, move old dir, reboot, remove old dir.

Shrunk root filesystem

grub
e
root=/dev/ram0 rw
^X

Wait for mdadm to finish complaining.
alias ll='ls -laF'
mkdir /mnt
lvm pvscan
lvm vgscan
lvm vgchange -a y
e2fsck -f /dev/ubuntu-vg/root
mount /dev/ubuntu-vg/root /mnt
cd /mnt
cp -a lib lib65 bin sbin /
cd /
umount /mnt
e2fsck -f /dev/ubuntu-vg/root
resize2fs -M /dev/ubuntu-vg/root
lvreduce -L 1120M /dev/ubuntu-vg/root
e2fsck -f /dev/ubuntu-vg/root
resize2fs /dev/ubuntu-vg/root
umount -a

power off VM since halt and reboot do not work.

Cleared free space

lvcreate -l 100%FREE -n deleteme ubuntu-vg
dd if=/dev/zero of=/dev/null bs=256k
lvremove /dev/ubuntu-vg/deleteme
swapoff /dev/ubuntu-vg/swap_1
dd if=/dev/zero of=/dev/ubuntu-vg/swap_1 bs=256k
for i in / /home /var /tmp /boot /usr ; do dd if=/dev/null of=${i}/deleteme bs=256k & rm ${i}/deleteme ; done
halt -p

Compacted

"\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyhd --compact "Xenial GRC Build.vdi"

Plans

Snapshot, test building.


Bike Stuff

Lots of bike stuff done today.

The R600 from Mark is in good shape. Bearings “looked” good, but the old grease had shiny flakes. Replaced the bearings and grease. Cones and races looked fine. Braking surface is at probably 40%, so I scuffed it a little with a diamond file, and deburred it all around.

Replaced the missing spoke from the donor R550 and got lateral true in good shape. I’m not sure about dish, but it’s within 4mm. There’s 2mm hop (dip really), but I got tired of messing with it. The spoke nipples are at the hub, and I kept turning them the wrong direction. I think one of the spoke heads is going to pull through. It seemed a little deeper in it’s seat washer than the others.

I have to say this is just about the tightest rim I have ever mounted a tire on. First bead of a gator was painfully snug, and I couldn’t reposition the tire without popping it back over the rim. The second bead absolutely required a steel lever. On the flip side, it was really happy to take 120psi.


The R550 wheel is now missing 2 spokes, and the cone is damaged from the previous owner riding with the cones over-tightened. Also, one race had faint rust from having been wet, but it wiped out. I cleaned, repacked, and reset cone spacing. It’s as good as it can get without putting money into it. Basically, it’s a spare parts. It’s almost exactly the same as the R600 wheel, though the R600 axle, cones,and hub seem a tiny bit lighter, and the dustcap is black plastic vs chromed plastic. The 550 finish is bead blasted, vs the 600 which is mirror finish.


Helped mark install some new Ksyrium Elite wheels. Adjusted lateral true, and sent him for a 1.85mm spacer (11-speed hub, 10-speed cassette). Adjusted brake tension and rewrapped the bar tape from the hoods up. Test ride was good, and his speed sensor is working properly.


New black bike is coming together. Installed the replacement chainrings on my DurAce 180mm Square Taper (1990s?). XT pedals installed. Rival brakes are installed and adjusted. Wrong color of cables came, but Ice Grey is good with Ben. I wanted black-carbon but I’m settling for plain black. I need to install the speed/cadence sensor and the saddle bag from the old black bike.

The only parts I need are cables and rear wheel. The black cables show up tomorrow. I may be able to pick up an R10S rear from Ben on the promise of helping him build up his project bike when all the parts come in. We’ll see what a 20-spoke rear wheel is like with me on it, but ideally, it’d be temporary until my other wheels come back from Easton.

Then, all that’s left will be fit/comfort adjustments, and maybe throwing the wheels onto a truing stand.


Picked up a 17mm cone wrench, and have blue and mavic spoke wrenches on order. Also, ordered some cassette spacers for 10-on-11, 10-on-8/9/10, and another gigpack of shop towels.