Piaware 8.2 Fails to Build on Kali Linux-2023 Raspberry Pi arm64

Piaware 8.2 Fails to Build on following image. Any thoughts?

kali-linux-2023.1-raspberry-pi-arm64.img.xz

 

 

image

 

#tcltls-rebuild dependencies
sudo apt install -y libssl-dev
sudo apt install -y tcl-dev
sudo apt install -y chrpath

$ ls tcltls-rebuild/*.deb
tcltls-rebuild/tcl-tls_1.7.22-2+fa1_arm64.deb
tcltls-rebuild/tcl-tls-dbgsym_1.7.22-2+fa1_arm64.deb
#Build-Tools
sudo apt install -y git
sudo apt install -y build-essential
sudo apt install -y devscripts
#Build-Depends: 
sudo apt install -y debhelper
sudo apt install -y tcl8.6-dev
sudo apt install -y autoconf
sudo apt install -y python3-dev
sudo apt install -y python3-venv
sudo apt install -y python3-setuptools
sudo apt install -y libz-dev
sudo apt install -y openssl
sudo apt install -y libboost-system-dev
sudo apt install -y libboost-program-options-dev
sudo apt install -y libboost-regex-dev
sudo apt install -y libboost-filesystem-dev
sudo apt install -y patchelf
#Depends:
sudo apt install -y net-tools
sudo apt install -y iproute2
sudo apt install -y tclx8.4
sudo apt install -y tcl8.6
sudo apt install -y tcllib
sudo apt install -y itcl3

It might be related to an issue with python 3.11 - see if this fixes it (replace the line containing # include <eval.h> with the following:

// Python headers needed for PyEval_EvalCode.
//
// Use ceval.h instead of eval.h with Pyhthon 3.11 and greater
#if PY_VERSION_HEX > 0x030B0000
#   include <ceval.h>
#else
#   include <eval.h>
#endif

Snagged the ‘fix’ from here

1 Like

Thank you @AhrBee for the workaround.

I will apply your suggested work around on copy of source code cloned on my Pi. However changes in Flightaware source code at github should be done by Flightaware programmers/software developers, otherwise everyone trying to build piaware from source code will face this issue.

Alternatively the Python team at Debian should remove this bug from Python 3.11

I located the file which contains <eval.h> by following command:

$ grep "<eval.h>" -r piaware_builder/*
piaware_builder/package-bullseye/cx_Freeze-6.8.3/source/bases/Common.c:#include <eval.h>

 

$ sudo nano piaware_builder/package-bullseye/cx_Freeze-6.8.3/source/bases/Common.c

//-----------------------------------------------------------------------------
// Common.c
//   Routines which are common to running frozen executables.
//-----------------------------------------------------------------------------

#include <compile.h>
#include <eval.h>
#include <osdefs.h>

 

It appears the issue of eval.h being deprecated was reported for a Debian 12 build here

As @abcd567 has found out, it also bites those who are using python 3.11 and newer to build piaware from scratch on Debian 11 as well.

Borrowing a finding from elsewhere (below), @obj or other Flightaware development staff might use this information for test if the above workaround makes sense for general release. I am too far removed from the programming world to remember how to submit a pull request, unfortunately.

According to Porting to Python 3.11 of “What’s New In Python 3.11 — Python 3.11.0b4 documentation ”,

The non-limited API files cellobject.h, classobject.h, code.h, context.h, funcobject.h, genobject.h and longintrepr.h have been moved to the Include/cpython directory. Moreover, the eval.h header file was removed. These files must not be included directly, as they are already included in Python.h: Include Files . If they have been included directly, consider including Python.h instead. (Contributed by Victor Stinner in bpo-35134.)

1 Like

Kali Linux 2023 uses Python ver 3.11, which gives problem.

However RaspberryPi OS Bullseye and Debian 11 Bullseye use Python version 3.9, so there is no problem on these yet.

 

 

 

Debian12 Bookworm Testing
Debian Installer Bookworm Alpha 2

Edited following file:

sudo nano piaware_builder/package-bullseye/cx_Freeze-6.8.3/source/bases/Common.c

 

Changed

#include <eval.h>

To

#include <ceval.h>

 

Ran command
sudo dpkg-buildpackage -b

The original error “fatal error: eval.h: No such file or directory” disappeared.
Got following new error:
make: *** [debian/rules:104: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

 

Click on Screenshot to See Larger Size

 

1 Like

You likely need a newer cx_freeze.

There was some activity on github regarding this but it didn’t go anywhere.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.