CopperSpice Experiments – Pt. 4
By: Date: June 11, 2020 Categories: Information Technology Tags: , , , , , , ,

Keep in mind I have a minimal Ubuntu 20.04 LTS on this system. The Building for Unix instructions assume a full installation and even then aren’t complete. By using a minimal install I can help even non-Ubuntu users because I will find everything that got missed.

sudo apt-get install libfreetype6-dev libfontconfig1-dev libglib2.0-dev libgstreamer1.0-dev \
                libgstreamer-plugins-base1.0-dev libice-dev libaudio-dev libgl1-mesa-dev libc6-dev \
                libsm-dev libxcursor-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev \
                libxrandr-dev libxrender-dev libxkbcommon-dev libxkbcommon-x11-dev libx11-dev

sudo apt-get install libxcb1-dev libx11-xcb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev \
                libxcb-render0-dev libxcb-render-util0-dev libxcb-randr0-dev libxcb-shape0-dev \
                libxcb-shm0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev libxcb-xkb-dev

One of the first things I want to do is try converting my XpnsQt project from Qt to CopperSpice. This and my lottery tracking application are my goto tire kicking applications. XpnsQt needs PostgreSQL.

I rebooted at this point so all would be good with PostgreSQL.

Yeah, the import works from the oldest year it finds a data file for to the current year. I just don’t have files for this year on this machine. Data from 1996 or so through 2019 should be more than enough to kick the tires.

My first attempt at configuring CopperSpice failed rather spectacularly.

Configuring CMake for CopperSpice

Search for required Packages

-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR) (Required is at least version "1.0")
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") 
-- Could NOT find Cups (missing: CUPS_LIBRARIES CUPS_INCLUDE_DIR) 
-- Could NOT find ALSA (missing: ALSA_LIBRARY ALSA_INCLUDE_DIR) 
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Could NOT find PulseAudio (missing: PULSEAUDIO_LIBRARY PULSEAUDIO_INCLUDE_DIR) (Required is at least version "0.9.9")
-- Could NOT find PostgreSQL (missing: PostgreSQL_TYPE_INCLUDE_DIR) (found version "12.2")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE 
-- Found GLib2: /usr/include/glib-2.0;/usr/lib/x86_64-linux-gnu/glib-2.0/include 
-- Found GOBJECT2: /usr/lib/x86_64-linux-gnu/libgobject-2.0.so 
-- Found Iconv: /usr/include 
-- Found X11: /usr/include found components: ICE SM Xcursor Xext Xfixes Xi Xinerama Xrandr Xrender 
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found xcb: /usr/include 
-- Found xcb-image: /usr/include 
-- Found xcb-icccm: /usr/include 
-- Found xcb-sync: /usr/include 
-- Found xcb-xfixes: /usr/include 
-- Found xcb-shm: /usr/include 
-- Found xcb-randr: /usr/include 
-- Found xcb-shape: /usr/include 
-- Found xcb-keysyms: /usr/include 
-- Found xcb-xinerama: /usr/include 
-- Found xcb-xkb: /usr/include 
-- Found xcb-render: /usr/include 
-- Found xcb-render-util: /usr/include 
-- Found X11_XCB: /usr/lib/x86_64-linux-gnu/libX11-xcb.so 
-- Found XKBCommon: /usr/lib/x86_64-linux-gnu/libxkbcommon.so 
-- Found XKBCommon_X11: /usr/lib/x86_64-linux-gnu/libxkbcommon-x11.so 
-- Found Fontconfig: /usr/include 
-- Checking for module 'gstreamer-1.0'
-- Found gstreamer-1.0, version 1.16.2
-- Checking for module 'gstreamer-base-1.0'
-- Found gstreamer-base-1.0, version 1.16.2
-- Checking for module 'gstreamer-app-1.0'
-- Found gstreamer-app-1.0, version 1.16.2
-- Checking for module 'gstreamer-audio-1.0'
-- Found gstreamer-audio-1.0, version 1.16.2
-- Checking for module 'gstreamer-video-1.0'
-- Found gstreamer-video-1.0, version 1.16.2
-- Found GStreamer: /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so 
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so 
-- Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)


Enabled CopperSpice libraries

* Core Gui Multimedia Network OpenGL Script Sql Svg WebKit Xml XmlPatterns

-- The following packages have been found:

* ZLIB, Compression Library, <https://zlib.net>
Required for compression support
* Threads, Platform dependant threading library
Required for threading support
* GLib2, GNOME core library, <https://developer.gnome.org/glib>
Required for glib mainloop support
* GObject2, The object system used for Pango and GTK+, <https://developer.gnome.org/gobject>
Required for glib mainloop support
* Iconv, For use on systems which do not have Iconv or lack Unicode support, <http://www.gnu.org/software/libiconv/>
Iconv support
* X11, Open source implementation of the X Window System, <https://www.x.org>
Required for X11/X.Org integration support
* XCB, Open source implementation of the XCB Interface for the X11 Window System, <https://xcb.freedesktop.org>
Required for XCB/X.Org integration support
* X11_XCB, Integration between X11 and XCB, <https://xcb.freedesktop.org>
Required for X11 XCB support
* XKBCommon, Keyboard library, <https://xkbcommon.org>
Required for XKB integration support
* XKBCommon_X11, Keyboard library, <https://xkbcommon.org>
Required for XKB X11 integration support
* Fontconfig, Library for configuring and customizing font access, <http://www.freedesktop.org/wiki/Software/fontconfig/>
Required for fonts configuration support
* GStreamer, Open source media playback library, <http://gstreamer.freedesktop.org>
Required for multimedia audio and video support
* OpenGL, The Mesa 3D Graphics Library, <http://www.mesa3d.org/>
Required for OpenGL support

-- The following packages have not been found:

* OpenSSL (required version >= 1.0), Support for SSL and TLS, <https://openssl.org>
Required for HTTPS support
* Cups, CUPS is the standards-based open source printing system, <https://www.cups.org>
Required for printing support
* ALSA, Advanced Linux Sound Architecture, <http://www.alsa-project.org>
Required for ALSA audio support
* PulseAudio, Sound processing daemon for Unix, <http://www.pulseaudio.org>
Required for pulseaudio support
* PostgreSQL, Popular open source database, <http://www.postgresql.org>
Required for PostgreSQL database support
* MySQL, Popular open source database, <http://www.mysql.com>
Required for MySQL database support
* LibXml2, XML C parser and toolkit developed for the Gnome project, <http://www.xmlsoft.org/>
Required for XML support in WebKit


CopperSpice configured to run on: Linux 64 bit, Release Mode
CopperSpice will be built in: /home/roland/Projects/cs_build
CopperSpice will be installed in: /usr/lib/cs_lib


-- Configuring done
-- Generating done
-- Build files have been written to: /home/roland/Projects/cs_build
roland@roland-amd-desktop:~/Projects/cs_build$ 

I was rather shocked to see Cups, Alsa, SSL, and PulseAudio in the list of things that weren’t there. The Alsa and PulseAudio were listed in the table on the documentation link, just not in the commands.

This time should work, right?

Since I know I installed the official libraries, this is a bit of a head scratcher. Scrolling back in the output I see the following:

I won’t bore you with how many times I edited my .profile assigning different values to PostgreSQL_ROOT and PostgreSQL_TYPE_INCLUDE_DIR. I even started rebooting instead of just logging out and back in. I will share an image of one of the stupid things a person tries when the doc leads them off a cliff.

Ah! /usr/include/pqxx/types Now there is excitement! Nah. False high.

That’s the package you need. The number will change with PostgreSQL version, but you need postgresql-server-dev-nnnn. It installs a standard U.S. buttload of dependencies when you select it.

Yes, I rebooted after this to see if things would work. This time when I entered the command:

cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/lib/cs_lib ~/Projects/copperspice

I had much greater success.

Like most of the known universe, I quit caring about MySQL when Oracle bought InnoDB. Someday Oracle will squeeze that orange for every drop of juice and I don’t want to be relying on it.

Now we can build CopperSpice.

I believe I also had to manually install CMake.

The screenshot utility that comes installed with Ubuntu 20.04 LTS blows

On KDE Neon they have a great one. You can tell it to delay when you are going to scrape a screen section so you can navigate to the proper place in a menu system. Not on this one. They have a delay, but it is only for entire windows or screens.

Adding insult to injury it will randomly show you a screen shot an then save a garbage file after you give it a name. I can’t find a pattern, it just does it. There are half a dozen screen scrapes that didn’t get into this post series already because it “said it saved them” but the file was trash.

The other insulting feature is that it autosnaps as soon as you get done dragging the mouse. The default one on KDE Neon leaves the box around what you selected and allows you to adjust things before hitting return to select your scrape. When the left margins are hosed in this post series, that is why.

One thought on “CopperSpice Experiments – Pt. 4

  1. I saw your post on the Copperspice Forum and decide to check it out.

    Should be an interesting review. I write software using Qt both Commercial & Open Source, on Windows and Linux, using any number of compilers.

    My work with Copperspice has been limited due to compiler constraints…. for 3’rd party packages I have to use older compilers. But I have just installed MSVS 2019 so giving that a whirl.

    I looked forward to future discussions.

    Regards
    CandL

Comments are not opened.