Error Installing on Ubuntu 22.04

I’m trying to install flair on ubuntu 22.04 LTS (ARM). It’s on a mac via parallels desktop. Following the instructions, I add the key and the repository but I get the following error:

parallels@ubuntu-linux-22-04-02-desktop:~$ sudo apt install flair
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 flair : Depends: flair-geoviewer but it is not installable
         Depends: python3-numpy but it is not going to be installed
         Depends: python3-scipy but it is not going to be installed
         Depends: python3-matplotlib but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Any hints would be really appreciated.

It’s a fresh ubuntu with no history so should normally be ok. From a bit of googling, I tried
dpkg --get-selections | grep hold
but this returned nothing.

Thanks,
Laurie

I installed python3-numpy, python3-scipy, python3-matplotlib manually with apt and that worked ok. But with flair-geoviewer I also get an error:

parallels@ubuntu-linux-22-04-02-desktop:~$ sudo apt install flair-geoviewer
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package flair-geoviewer is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'flair-geoviewer' has no installation candidate

I compiled it locally as the default compiler with ubuntu 22.04 is gcc 11.4 and there’s only binaries for gcc 7 and 9. But it seems to have the wrong compiler flags for ARM architecture. This is first in the geoviewer:

g++ -c d2layer.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 -fstrict-aliasing -I. -I..
g++: error: unrecognized command-line option ‘-m64’

Flair itself compiles ok but the geoviewer doesn’t but this is really necessary.

So I guess it’s that it’s ARM architecture.

Hi @lnevay
there is no flair-geoviewer precompiled for Ubuntu ARM version on the website. You did the right thing to try to recompile it but apparently the makefile fails to detect properly the OS and set the correct options.
The checking of the OS is done in the config.mk file
can you execute the following commands to tell us what it reports

make print-TARGET
make print-ARCH
make-print-UNAME

Hello,

Thanks Vasilis! Here’s the output:

TARGET = aarch64
ARCH = -m64
UNAME = Linux

(on ubuntu 22.04 LTS ARM via parallels desktop on an M1 mac)

Can you please open the config.mk and either comment the
line 111: ARCH = -m64
or change it it to something like with no value
ARCH =

That fixed it. It (the geoviewer) compiled after that.

Thanks @lnevay for confirming.
The -m64 option was used to request the 64bit version instead of the 32bit version of the code. Maybe the new systems do no longer provide the 32bit cross-compiling. If so we should remove the option