Installing flair on CentOS 8

Hello experts,

I have problems installing flair on CentOS 8. I searched the forum and found solutions to some issues, but others have remained:

I use

python 3.6.8
gcc 9.3.0
c++ 9.3.0

First I tried to install flair according to the instructions for ‘Linux:Fedora,CentOS,RedHat(.rpm)’.

Beforehand I installed the required packages.
When I used the command

rpm -ivh flair-3.2-1.noarch.rpm

I received:

error: Failed dependencies:
flair-geoviewer is needed by flair-3.2-1.noarch
python3-pydicom is needed by flair-3.2-1.noarch

However, I installed the latter with the command

pip3 insall -U pydicom

When I type ‘python3’ and then 'import pydicom’, the import succeeds.
Regarding the missing geoviewer for the flair installation, I tried to install them at the same time using

rpm -ivh flair-3.2-1.noarch.rpm flair-geoviewer-3.2-1.x86_64.rpm

error: Failed dependencies:
python3-pydicom is needed by flair-3.2-1.noarch
libc.so.6(GLIBC_2.32)(64bit) is needed by flair-geoviewer-3.2-1.x86_64
libc.so.6(GLIBC_2.33)(64bit) is needed by flair-geoviewer-3.2-1.x86_64
libc.so.6(GLIBC_2.34)(64bit) is needed by flair-geoviewer-3.2-1.x86_64
libm.so.6(GLIBC_2.29)(64bit) is needed by flair-geoviewer-3.2-1.x86_64
libm.so.6(GLIBC_2.35)(64bit) is needed by flair-geoviewer-3.2-1.x86_64
libstdc++.so.6(CXXABI_1.3.13)(64bit) is needed by flair-geoviewer-3.2-1.x86_64
libstdc++.so.6(GLIBCXX_3.4.29)(64bit) is needed by flair-geoviewer-3.2-1.x86_64

Alternatively I tried to build it from source and downloaded the tgz files.
I followed the same procedure with which I successfully installed flair on MacOS from source:

  • untared flair

  • cd into the folder

  • command: make

  • Untared geoviewer

  • cd into the folder

  • command: make

  • save in a variable FPATH my path to flair

  • type (within the geoviewer directory) : make install DESTDIR=$FPATH

This latter command resulted in:

make: python3-config: Command not found
make -C viewer
make[1]: Entering directory ‘/home/mibauer/Downloads/flair-geoviewer-3.2/viewer’
make[1]: Nothing to be done for ‘all’.
make[1]: Leaving directory ‘/home/mibauer/Downloads/flair-geoviewer-3.2/viewer’
make -C farm
make[1]: Entering directory ‘/home/mibauer/Downloads/flair-geoviewer-3.2/farm’
make[1]: Nothing to be done for ‘all’.
make[1]: Leaving directory ‘/home/mibauer/Downloads/flair-geoviewer-3.2/farm’
make -C geometry
make[1]: Entering directory ‘/home/mibauer/Downloads/flair-geoviewer-3.2/geometry’
make[1]: Nothing to be done for ‘all’.
make[1]: Leaving directory ‘/home/mibauer/Downloads/flair-geoviewer-3.2/geometry’
make -C data
make[1]: Entering directory ‘/home/mibauer/Downloads/flair-geoviewer-3.2/data’
make[1]: Nothing to be done for ‘all’.
make[1]: Leaving directory ‘/home/mibauer/Downloads/flair-geoviewer-3.2/data’
make -C graph
make[1]: Entering directory ‘/home/mibauer/Downloads/flair-geoviewer-3.2/graph’
make[1]: Nothing to be done for ‘all’.
make[1]: Leaving directory ‘/home/mibauer/Downloads/flair-geoviewer-3.2/graph’
make -C math
make[1]: Entering directory ‘/home/mibauer/Downloads/flair-geoviewer-3.2/math’
make[1]: Nothing to be done for ‘all’.
make[1]: Leaving directory ‘/home/mibauer/Downloads/flair-geoviewer-3.2/math’
make -C tool
make[1]: Entering directory ‘/home/mibauer/Downloads/flair-geoviewer-3.2/tool’
make[1]: Nothing to be done for ‘all’.
make[1]: Leaving directory ‘/home/mibauer/Downloads/flair-geoviewer-3.2/tool’
make -C xdraw
make[1]: Entering directory ‘/home/mibauer/Downloads/flair-geoviewer-3.2/xdraw’
make[1]: Nothing to be done for ‘all’.
make[1]: Leaving directory ‘/home/mibauer/Downloads/flair-geoviewer-3.2/xdraw’
g++ -c geometryobject.cc -m64 -g -DUNIX -std=c++11 -O3 -funroll-loops -fno-math-errno -DNDEBUG -D_DEBUG=0 -ftree-vectorize -DTHREAD -pedantic -W -Wall -Wcast-qual -Wextra -Wformat -Wpointer-arith -Wshadow -Wno-write-strings -Wcast-align -Wredundant-decls -Wno-long-long -Wno-non-virtual-dtor -Wno-variadic-macros -Woverloaded-virtual -Wpointer-arith -Wshadow -Wunused -Wuninitialized -Wwrite-strings -Wshadow -pipe -pthread -Wno-class-memaccess -fwrapv -fstack-protector -fpic -fno-strict-aliasing -I. -I… -I/usr/include
geometryobject.cc:12:10: fatal error: Python.h: No such file or directory
12 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
make: *** [makefile:310: geometryobject.o] Error 1

Further I ran the script from page

check_fluka.sh

Mon Feb 20 12:54:14 CET 2023
Linux workepadp01 4.18.0-448.el8.x86_64 #1 SMP Wed Jan 18 15:02:46 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
CentOS Stream release 8
NAME=“CentOS Stream”
VERSION=“8”
ID=“centos”
ID_LIKE=“rhel fedora”
VERSION_ID=“8”
PLATFORM_ID=“platform:el8”
PRETTY_NAME=“CentOS Stream 8”
ANSI_COLOR=“0;31”
CPE_NAME=“cpe:/o:centos:centos:8”
HOME_URL=“https://centos.org/
BUG_REPORT_URL=“https://bugzilla.redhat.com/
REDHAT_SUPPORT_PRODUCT=“Red Hat Enterprise Linux 8”
REDHAT_SUPPORT_PRODUCT_VERSION=“CentOS Stream”
CentOS Stream release 8

Checking python
Version: 3.6-8 ok

Checking python tkinter module
tkinter found

Checking tk library
Tk Version= 8.6 ok

Checking python imaging
python-imaging-tk installed

Checking gnuplot
gnuplot 5.2.4 ok

Checking memory
Ram: 32372924 kb ok
Swap: 16388092 kb ok

Checking CPU
CPUs: 8 ok
Clock: 1322.64 MHz ok
Arch: x86_64

Checking X11
X11 dimension: 3840x2160 ok
X11 depth: 24 ok

Checking flair
flair not in standard directory
/usr/bin/which: no flair in (/usr/local/gcc/bin:/afs/cern.ch/atlas/scripts:/home/mibauer/.local/bin:/home/mibauer/bin:/afs/cern.ch/atlas/scripts:/usr/sue/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/opt/puppetlabs/bin)
============================== WARNING ==============================
flair found

Please install the latest version of flair.
If it is already installed please add flair to your PATH
Possible commands (as superuser):
Fedora, RedHast, Scientific Linux, CentOS, Suse:
rpm -ivh --nodeps http://cern.ch/flair/download/flair-3.0-7.noarch.rpm
Ubuntu:
Strongly recommended to install the flair repository, so you
can benefit automatically from the flair updates.
Instructions at: Official flair site

Alternatively you can manually install the debian package
Download flair-3.0-7_all.deb from the Official flair site
and install with
dpkg -i flair-3.0-7_all.deb
MacOS:
Follow the instructions on Official flair site
For more information please look in the flair readme file

======================================================================
/flair.py not found
Enter flair directory: /home/mibauer/Downloads/flair-3.2
flair directory: /home/mibauer/Downloads/flair-3.2
flair version: 3.2-1

Checking flair-geoviewer
============================== ERROR ==============================
Module: /home/mibauer/Downloads/flair-3.2/geoviewer.so not found in flair directory

Please install the flair-geoviewer package,
rpm based:
rpm -ivh flair-geoviewer-X.Y-Z.ARCH.rpm
deb based:
dpkg -i flair-geoviewer_X.Y-Z_ARCH.deb
from source:
follow the installation instructions in the flair README file
where: X.Y-Z is the latest flair version
ARCH is the appropriate architecture for your machine
If there is not available for your machine please try to
compile and install from source (tgz)

======================================================================

Thanks for your help,
Michael

Dear Michael,

to compile python from source you will need some extra packages: python-devel and tk-devel. The actual package names may be different on Centos 8 and based on the method of how python was installed.

The .rpm package unfortunately won’t work, since it was compiled for newer distributions.

Cheers,
David

Dear David,

thanks for your help.
I found the packages you mentioned for CentOS 8 having the same name, installed them and now it works!

Thanks again,
Michael