Build error with Debian 11

Want to share your OpenWrt / Gargoyle knowledge? Implemented a new feature? Let us know here.

Moderator: Moderators

Post Reply
stuartbh
Posts: 76
Joined: Sun Oct 20, 2019 4:18 pm

Build error with Debian 11

Post by stuartbh »

I started with a basic Debian 11 installation (running as a container under Proxmox VE 7) and then created a small script to assert my Gargoyle build environment and consequently execute the build.

#!/usr/bin/env bash

function setup_prerequisites()
{
# On debian-11 lib32gcc1 was replaced by lib32gcc-s1
time sudo apt-get install -y build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev lib32gcc-s1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo vim net-tools npm python-is-python3
return $?;
};

function perform_build()
{
[[ "${1}" == "clean" ]] && [[ -d gargoyle ]] && rm -rf gargoyle;
[[ ! -d gargoyle ]] && git clone http://github.com/ericpaulbishop/gargoyle.git;

# lets try this later after a simple build works first
# [[ -d gargoyle ]] && { cd gargoyle; time (make cleanup; make distclean; make FULL_BUILD=true FORCE=1 x86); };

[[ -d gargoyle ]] && { cd gargoyle; time make x86; };
};

setup_prerequisites && perform_build $*;

The full output was to large to put here, hence it can be reviewed at: https://pastebin.com/W9CJtWJ7

Then from bash I executed:
$ ./build-gargoyle clean
[..serious snippage...]
Checking 'ldconfig-stub'... ok.

Build dependency: Please install Python 2.x

Prerequisite check failed. Use FORCE=1 to override.
make[3]: *** [/home/stuart/gargoyle/x86-src/include/toplevel.mk:177: staging_dir/host/.prereq-build] Error 1
make[3]: Leaving directory '/home/stuart/gargoyle/x86-src'
make[2]: *** [/home/stuart/gargoyle/x86-src/include/toplevel.mk:83: prepare-tmpinfo] Error 2
make[2]: Leaving directory '/home/stuart/gargoyle/x86-src'
make[1]: *** [/home/stuart/gargoyle/x86-src/include/toplevel.mk:225: world] Error 2
make[1]: Leaving directory '/home/stuart/gargoyle/x86-src'
find: 'bin/packages/i386_pentium4': No such file or directory
find: '': No such file or directory
find: '': No such file or directory
find: 'bin/targets/x86/generic': No such file or directory
find: '': No such file or directory
find: '': No such file or directory
ls: cannot access 'bin/targets': No such file or directory

real 5m4.575s
user 1m6.500s
sys 0m20.150s

$

$ ls -la /usr/bin/python*
lrwxrwxrwx 1 root root 7 Mar 02 2021 19:44:22 /usr/bin/python -> python3
lrwxrwxrwx 1 root root 9 Apr 05 2021 12:00:48 /usr/bin/python3 -> python3.9
-rwxr-xr-x 1 root root 5479736 Feb 28 2021 17:03:44 /usr/bin/python3.9
lrwxrwxrwx 1 root root 58 Mar 19 2021 16:14:05 /usr/bin/pythontex -> ../share/texlive/texmf-dist/scripts/pythontex/pythontex.py

Python 2 is surely NOT installed as it is unsupported and ostensibly has unresolved security flaws at this juncture. Thus, python3 is the only version of python instantiated upon the instance I am creating the build environment for.

Might I respectfully ask, why this error might be occuring?

It is worthy of notation that I additionally attempted such a build with the 1.12 stable version and saw the same error.

Thanks in advance!
Very Respectfully,

Stuart, N3GWG
Computer Scientist

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Build error with Debian 11

Post by Lantis »

The build instructions provide a guide for Ubuntu. It is difficult to comment on an OS I've not used.

Python 2 is a build dependency (inherited from OpenWrt). Ubuntu 20 ships with python2, hence why the instructions include installing python-is-python3, which grabs python3 and makes sure it occupies the default symlink. Debian must have shipped python3 by default, so it is simply necessary to install python2 as well.

For building 1.12, python 3 may not be required at all (can't quite remember), and the Gargoyle build environment requires python2 for running some scripts.

Just having python installed in itself is not a vulnerability. You're going to be fine.
If you want to worry yourself, think about the fact that by running "make x86" you're trusting millions of lines of code to download and self execute and compile on your machine to produce the build artefact.
You have to extend your trust to the process to a certain extent.

Also, I included docker recipes in the git repo if it makes it easier for yourself or anyone else reading.
https://github.com/ericpaulbishop/gargo ... ils/Docker
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

stuartbh
Posts: 76
Joined: Sun Oct 20, 2019 4:18 pm

Re: Build error with Debian 11

Post by stuartbh »

Well, I ended up doing just that, I installed python2. After thinking about it, I figured it was not worth the concern since I had created a development container (under Proxmox) as a build environment anyway and I could always uninstall python2 after the build or just trash the whole LXC container. Eventually I plan to write an Ansible script to create an LXC container on Proxmox, download the source code and conduct a full build in an automated manner (the end of which could be destroying the container).

In spite of all of that, notwithstanding an allocation of 40GB of space, the build ran out of space in precedence to reaching completion. Thus, I ask, how much disk space is requisite to conduct a full_build=true x86 or full_build=true for all architectures?

Thanks in advance.
Very Respectfully,

Stuart, N3GWG
Computer Scientist

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Build error with Debian 11

Post by Lantis »

A full build of everything is taking up about 118GB on my machine at the moment.
x86 seems to be roughly 30GB on its own.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

Post Reply