Flair installation on CentOS7 failed starting with "Geometry viewer not found"

I have the same error as FLAIR. Warning: Geometry Viewer not found but the installation is not on Mac but on CentOS7.
Trying to fix with
make DEBUG=yes
does not solve the problem.
Thanks for your help.
Best regards,

It seems that something went wrong during the installation.
Did you follow the instructions for CentOS on the Official flair site ?
Can you please post the output of the installation procedure?

Yes I followed the instructions. I hope with no mistake.
Here is what I have done:

$ tar -zxvf flair-3.1-15.1.tgz
$ tar -zxvf flair-geoviewer-3.1-15.1.tgz
$ cd flair-geoviewer-3.1
$ module load python
$ make DESTDIR=/pbs/software/centos-7-x86_64/fluka/flair/3.1
$ make DESTDIR=/pbs/software/centos-7-x86_64/fluka/flair/3.1 install
$ cd ../flair-3.1
$ make DESTDIR=/pbs/software/centos-7-x86_64/fluka/flair/3.1
$ make DESTDIR=/pbs/software/centos-7-x86_64/fluka/flair/3.1 install

Python version loaded is 3.9.1
I have modified FLAIR makefile as followed:

diff makefile.origin makefile
< APPDIR   = $(ROOT)/usr/share/applications
< MIMEDIR  = $(ROOT)/usr/share/mime
> APPDIR   = $(DESTDIR)/share/applications
> MIMEDIR  = $(DESTDIR)/share/mime
< LNKDIR   = $(ROOT)/usr/share/mimelnk/application
< ICONDIR  = $(ROOT)/usr/share/icons/hicolor/48x48/mimetypes
> LNKDIR   = $(DESTDIR)/share/mimelnk/application
> ICONDIR  = $(DESTDIR)/share/icons/hicolor/48x48/mimetypes
< 	mkdir -p $(ROOT)/usr/share/bash-completion/completions
< 	install -m 644 desktop/flair $(ROOT)/usr/share/bash-completion/completions
> 	mkdir -p $(DESTDIR)/share/bash-completion/completions
> 	install -m 644 desktop/flair $(DESTDIR)/share/bash-completion/completions

to avoid installation in /usr/share.


I fear that the problem is caused by the changes that you have introduced. Do you have a
/pbs/software/centos-7-x86_64/fluka/flair/3.1/share directory?

Also, I don’t understand why you are adding DESTDIR here:

$ make DESTDIR=/pbs/software/centos-7-x86_64/fluka/flair/3.1

And why you do this in the flair directory:

$ cd ../flair-3.1
$ make DESTDIR=/pbs/software/centos-7-x86_64/fluka/flair/3.1
$ make DESTDIR=/pbs/software/centos-7-x86_64/fluka/flair/3.1 install

Yes I have a /pbs/software/centos-7-x86_64/fluka/flair/3.1/share directory.

I added ‘DESTDIR=/pbs/software/centos-7-x86_64/fluka/flair/3.1’
because in the makefiles DESTDIR is defined as ‘/usr/local/flair’ which is not where we want FLAIR to be installed.
This is an option indicated in the installation instructions on the Official FLAIR site in the “Compile from source” section.

Dear @dbouvet,
To install flair (without the geoviewer) from source, you simply need to untar the flair-X-XX.tgz file in whichever place you want (not necessarily /usr/share), let’s say:


Then, to add the geoviewer, you just need to follow the instruction on the flair website:

1-untar the file flair-geoviewer-X-XX.tgz (this can be done in whichever directory as it doesn’t matter and all the unpacked material can be later removed):

tar -xvzf flair-geoviewer-X-XX.tgz

2-enter the newly created flair-geoviewer-X-XX directory:

cd flair-geoviewer-X-XX

3-do make there without adding any DESTDIR, but in case specifying how many processor you want to use, this will create the geoviewer.so file

make -j N

4-finally, do make install, specifying where you want to have flair (and therefore the geoviewer) installed, assuming what we said earlier and that you are installing the version available as of today:

make install DESTDIR=/pbs/software/centos-7-x86_64/fluka/flair-3.1

That would make it all. There is no need to touch the makefile. I just tested it in a random directory to which I have writing rights. As anticipated, you can optionally remove the flair-geoviewer-X-XX directory generated while “untar-ing” as well as the 2 .tgz file that you had downloaded.

Dear @amario,

I followed the four steps you gave me, but I still have the same error when running FLAIR:

$ ./flair
>w> Warning: Geometry Viewer not found
>e> ERROR: dynamic module does not define module export function (PyInit_geoviewer)

The library is installed (no error raised during make and make install) in the FLAIR directory:

$ pwd
$ ls -l geoviewer.so 
-rw-r--r-- 1 dbouvet ccin2p3 7680 Mar  1 12:08 geoviewer.so

Any idea?


Dear @dbouvet
I think the problem is not the “make install” command, but rather the compilation.
I have the feeling that you the makefile detects different PYTHON libraries than what you use to run.
Can you confirm that you don’t have multiple python versions and the dev packages of python match the ones you are using to run.

Which version of python are you using?
Did you have a look at this thread?
I think you might have a python version issue.

You’re right this is a python version issue.
Python 2.7 and Python 3.6 are installed with CentOS7 with the corresponding include directories. But we have also other Python versions installed in a shared area and I use to load the latest which is newer than the one coming with the system.
That was this mix causing the wrong compilation.
Using only the version from the system solved the problem.

Thanks a lot.