Sorry I haven’t written in a while. Life has been busy and I’ve been hacking away at Diamond in my “spare” time. I guess I need to catch this post series up.
I used GitKraken to clone the repository into ~/Projects/diamond. Then I created ~/Projects/diamond_build and ~/Projects/diamond_debug. Diamond had an additional dependency of hunspell.
sudo apt install libhunspell-dev
After that it was time to build. Change to the build directory and type the following:
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../diamond_debug -DCMAKE_PREFIX_PATH=/usr/lib/cs_lib/lib/cmake/CopperSpice ../diamond
roland@roland-amd-desktop:~/Projects/diamond_build$ cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/usr/lib/cs_lib/lib/cmake/CopperSpice ../diamond
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'hunspell'
-- Found hunspell, version 1.7.0
Diamond configured to run on: Linux 64 bit, Release Mode
Diamond will be built in: /home/roland/Projects/diamond_build
Diamond will be installed in: /usr/local
-- Configuring done
-- Generating done
-- Build files have been written to: /home/roland/Projects/diamond_build
roland@roland-amd-desktop:~/Projects/diamond_build$
Yeah! We are ready to build!
ninja install
I do need to tell you that if you just pulled down CopperSpice to a Ubuntu 20.04 LTS system, there is a shiny new dependency for the library build.
You need to install that and rebuild. Well, I rebuilt because I pulled down the updated source. It fixes or makes clearer an error message you see in the terminal.
The Drive Change
Initially this machine had a Seagate Barracuda 7200.12 160Gb drive. As I said before, my BOINC machines get the old drives put in them so I can get the last bit of use out of them. Building/changing/testing/using Diamond was too brutal for words. I deliberately left that drive in because I wanted to fix as many performance problems as I could given that Diamond uses JSON to store settings, last search, etc. Full builds were pretty bad. Just look at the specs for the drive. It’s an ATA-300 with only an 8MB buffer. Sadly, I’m old enough to remember when that drive was fast.
A quick image backup using Terabyte Drive Image for Linux and I swapped it out for a slightly better old drive from the shelf.
WDC WD2500AAKX-753CA1 (17.01H17)
SATA 300 with 16MB buffer
Still an ATA-300, but that 16MB buffer makes a real difference. I really don’t think it has anything to do with the extra 90Gig of storage. I’m only using a tiny fraction with this minimal system.