Picking the right Linux OS from the selection available
All the GemStone related installation information is from the GS64-InstallGuide-Linux-3.6.2.
The OS system requirements:
Red Hat based:
1
2
3
4
5
6
- Red Hat/CentOS Linux ES 8.4 on x86_64
kernel version 4.18.0-305.7.1.el8_2.x86_64 and glibc-2.28-151.el8.x86_64
- Red Hat/CentOS Linux ES 7.9 on x86_64
kernel version 3.10.0-1160.31.1.el7.x86_64 and glibc-2.17-324.el7_9.x86_64
Note that GemStone/S 64 Bit v3.6.2 will not run on Red Hat Linux ES 6.x.
Since Red Hat (now owned by IBM) decided to ditch traditional CentOS Linux distribution in favor of CentOS Stream, it is probably not good idea to run GemStone/S on it. GemStone/S needs exact kernel, glibc, etc. versions which won’t probably be that easy to keep on CentOS stream.
How is now CentOS stream positioned in connection to Fedora/RHEL?
-
How it was:
Fedora —> RHEL —> CentOS Linux
-
Now how it is:
Fedora —> CentOS stream —> RHEL
It makes sense from the RHEL position, but if you were running CentOS server, where you wanted stability, not so much. You have alternatives like Rocky Linux or Alma Linux. You could probably get the same results as running RH, but I don’t want play around to only find out you can’t for whatever reason later on. If you own a RH license you should have GemStone/S installed there. Since the CentOS change, I have personally decided to go full Debian on all of my machines.
Debian based:
1
2
3
4
5
6
- Ubuntu 20.04 LTS on x86_64
kernel version 5.4.0-77-generic and glibc 2.31-0ubuntu9.2
- Ubuntu 18.04 LTS on x86_64
kernel version 4.15.0-147-generic and glibc 2.27-3ubuntu1.4
- Ubuntu 18.04 LTS on arm64
kernel version 5.3.18-v8+ and glibc 2.27-3ubuntu1.4
If you start a new x86_64
installation the system that makes the most sense, if you do not have RH license, to install it on is Ubuntu 20.04 LTS on x86_64. This guide is for people that want to start there and have some issues configuring the system as needed.
GemStone install requirements (on the Ubuntu 20.04 LTS)
The kernel version - kernel version 5.4.0-77-generic
The current kernel for the Ubuntu 20.04 LTS is:
1
2
uname -a
Linux osboxes 5.13.0-30-generic #33~20.04.1-Ubuntu SMP Mon Feb 7 14:25:10 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
To install older kernel you need to:
-
The kernel:
sudo apt install linux-image-5.4.0-77-generic
-
The kernel modules:
sudo apt install linux-modules-5.4.0-77-generic
-
The extra kernel modules - needed for libvirt’s virtio
sudo apt install linux-modules-extra-5.4.0-77-generic
To check if you have all the modules as you needed:
dpkg -l | grep linux-modules
The glibc
and gdb
versions were matching the required:
- The glibc is matching the one needed (
glibc 2.31-0ubuntu9.2
):1 2
ldd --version ldd (Ubuntu GLIBC 2.31-0ubuntu9.2) 2.31
- The gdb also matches the one needed (
gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
):1 2
gdb --version GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
The gcc version
On the Ubuntu 20.04 LTS the current gcc version is 9.4. I you have it installed you need to downgrade it. First that comes into mind is to configure it via update-alternatives
, which you can not. The update-alternatives
is for switching among gcc major versions. For example, switching between gcc8 and gcc10. Here you need different minor version so you need to have different approach.
Installing gcc 9.3
- To check current gcc 9.4 version:
1
2
3
4
5
6
7
8
9
10
11
12
sudo apt policy gcc-9-base
gcc-9-base:
Installed: 9.4.0-1ubuntu1~20.04.1
Candidate: 9.4.0-1ubuntu1~20.04.1
Version table:
*** 9.4.0-1ubuntu1~20.04.1 500
500 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
100 /var/lib/dpkg/status
9.3.0-10ubuntu2 500
500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages
The suggested way to downgrade by Manfred Hampl (said on 2022-05-11):
You cannot use apt to downgrade to a version that has already been removed from the repositories (because being superseded), but you have to do that manually.
Suggested steps:
dpkg -l | grep 9.4.0-1ubuntu1~20.04.1
This gives a list of the gcc-related packages currently installed in the 9.4-* version.Download the *.deb files for these packages from gcc 9.3 and put them into an empty directory cd into that directory
sudo dpkg --install --force-downgrade *.deb
The current gcc 9.4 installed list
1
2
3
4
5
6
7
dpkg -l | grep 9.4.0-1ubuntu1~20.04.1
ii cpp-9 9.4.0-1ubuntu1~20.04.1 amd64 GNU C preprocessor
ii gcc-9 9.4.0-1ubuntu1~20.04.1 amd64 GNU C compiler
ii gcc-9-base:amd64 9.4.0-1ubuntu1~20.04.1 amd64 GCC, the GNU Compiler Collection (base package)
ii libasan5:amd64 9.4.0-1ubuntu1~20.04.1 amd64 AddressSanitizer -- a fast memory error detector
ii libgcc-9-dev:amd64 9.4.0-1ubuntu1~20.04.1 amd64 GCC support library (development files)
After force gcc 9.3 (with some additional packages)
1
2
3
4
5
6
7
8
9
10
11
dpkg -l | grep 9.3.0-17ubuntu1~20.04
ii cpp-9 9.3.0-17ubuntu1~20.04 amd64 GNU C preprocessor
ii gcc-9 9.3.0-17ubuntu1~20.04 amd64 GNU C compiler
ii gcc-9-base:amd64 9.3.0-17ubuntu1~20.04 amd64 GCC, the GNU Compiler Collection (base package)
iU gcc-9-multilib 9.3.0-17ubuntu1~20.04 amd64 GNU C compiler (multilib support)
iU gcc-9-offload-nvptx 9.3.0-17ubuntu1~20.04 amd64 GCC offloading compiler to NVPTX
iU gcc-9-plugin-dev 9.3.0-17ubuntu1~20.04 amd64 Files for GNU GCC plugin development.
iU gcc-9-source 9.3.0-17ubuntu1~20.04 all Source of the GNU Compiler Collection
ii libasan5:amd64 9.3.0-17ubuntu1~20.04 amd64 AddressSanitizer -- a fast memory error detector
ii libgcc-9-dev:amd64 9.3.0-17ubuntu1~20.04 amd64 GCC support library (development files)
Now the current gcc version is:
1
2
gcc --version
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
If you check the details:
1
2
3
4
5
6
7
8
9
10
11
12
13
sudo apt policy gcc-9-base
gcc-9-base:
Installed: 9.3.0-17ubuntu1~20.04
Candidate: 9.4.0-1ubuntu1~20.04.1
Version table:
9.4.0-1ubuntu1~20.04.1 500
500 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
*** 9.3.0-17ubuntu1~20.04 100
100 /var/lib/dpkg/status
9.3.0-10ubuntu2 500
500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages
Note: If you try to install more than you had previously you need to satisfy the dependencies. If you don’t you will have unmet dependencies like this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
sudo apt remove gcc-9-offload-nvptx
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
g++-9-multilib : Depends: lib32stdc++-9-dev (= 9.3.0-17ubuntu1~20.04) but it is not going to be installed
Depends: libx32stdc++-9-dev (= 9.3.0-17ubuntu1~20.04) but it is not going to be installed
gcc-9-multilib : Depends: libc6-dev-i386 (>= 2.11) but it is not going to be installed
Depends: libc6-dev-x32 (>= 2.11) but it is not going to be installed
Depends: lib32gcc-9-dev (= 9.3.0-17ubuntu1~20.04) but it is not going to be installed
Depends: libx32gcc-9-dev (= 9.3.0-17ubuntu1~20.04) but it is not going to be installed
gcc-9-plugin-dev : Depends: libgmp-dev (>= 2:5.0.1~) but it is not going to be installed
Depends: libmpc-dev (>= 1.0) but it is not going to be installed
gcc-9-source : Depends: quilt but it is not going to be installed
Depends: patchutils
Depends: sharutils
Depends: gawk
Depends: m4
Depends: libtool but it is not going to be installed
Depends: autoconf but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Having different major gcc versions
-
Install older versions -
sudo apt install gcc-8 g++-8 gcc-9 g++-9 gcc-10 g++-10
- Run the update-alternatives
1 2 3
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 --slave /usr/bin/gcov gcov /usr/bin/gcov-10 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /usr/bin/gcov gcov /usr/bin/gcov-9 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 80 --slave /usr/bin/g++ g++ /usr/bin/g++-8 --slave /usr/bin/gcov gcov /usr/bin/gcov-8
- You need to pick a default one (
sudo update-alternatives --config gcc
):
1
2
3
4
5
6
7
8
9
10
11
There are 3 choices for the alternative gcc (providing /usr/bin/gcc).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/gcc-10 100 auto mode
1 /usr/bin/gcc-10 100 manual mode
2 /usr/bin/gcc-8 80 manual mode
3 /usr/bin/gcc-9 90 manual mode
Press <enter> to keep the current choice[*], or type selection number
How to force these packages NOT to get updated when the system is updated
These packages need to be put on hold:
Via apt
:
-
Hold a package:
sudo apt-mark hold <package-name>
-
Remove the hold:
sudo apt-mark unhold <package-name>
-
Show all packages on hold:
sudo apt-mark showhold
To hold the installed packages:
1
sudo apt-mark hold linux-image-5.4.0-77-generic linux-modules-5.4.0-77-generic linux-modules-extra-5.4.0-77-generic gdb gcc
You may have noticed that
glibc
is missing from the hold package list. This is due to the reason that the LTS version will probably never, perhaps for security reasons, change/update its glibc version as it has far reaching consequences which are in LTS version undesirable. You can’t even find it as package. You can try to find it by running:apt list glibc --installed
(nothing will be found!).
Now the hold(ed) packages look like this:
1
2
3
4
5
6
sudo apt-mark showhold
gcc
gdb
linux-image-5.4.0-77-generic
linux-modules-5.4.0-77-generic
linux-modules-extra-5.4.0-77-generic
To update these packages you need to remove the hold and then update the system.
Conclusion
Now we have met all the dependencies for installing GemStone/S on Ubuntu 20.04 LTS. We have frozen (put on hold) the packages that we don’t want to be updated when the whole system gets updated. This article will be part of the GemStone/S series, which will continue with the OS configuration itself.