Erreur installation dépendance --> erreur gcc

J’ai un des mes jeedom qui fonctionne sous une Debian Buster sur un OrangePI.

J’ai une échec de compilation ( erreur gccc) . Ci dessous la version de gcc et une extrait du log


gcc --version
gcc (Debian 8.3.0-6) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR

Compile failed: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1
creating tmp
cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInitbr43g7_n.c -o tmp/xmlXPathInitbr43g7_n.o
cc tmp/xmlXPathInitbr43g7_n.o -lxml2 -o a.out
error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1

Dans le doute avec le gcc appeler par le script ( la commande gcc pointe vers celui-ci via un lien symbolique)

/usr/bin/aarch64-linux-gnu-gcc --version
aarch64-linux-gnu-gcc (Debian 8.3.0-6) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Slt ça n 'a pas été testé sur cette architecture…

Met les logs complets

Info distribution ( charge élevée, install dépendance en cours)
Log de l’intsall des dépendance dans le prochain post, dés la fin de l’execution du script

  ___  ____  _   _____                ____
 / _ \|  _ \(_) |__  /___ _ __ ___   |___ \
| | | | |_) | |   / // _ \ '__/ _ \    __) |
| |_| |  __/| |  / /|  __/ | | (_) |  / __/
 \___/|_|   |_| /____\___|_|  \___/  |_____|

Welcome to Orange Pi buster with Linux 4.9.170-sun50iw9

System load:   2.53 1.76 1.38   Up time:       13 days 20:52
Memory usage:  41 % of 960MB    Zram usage:    38 % of 480Mb    IP:            192.168.3.28
CPU temp:      68°C
Usage of /:    4% of 115G

Le log
enphasesecur_update.log (17,8 Ko)

Tout va bien jusqu’au build de lxml

Installing collected packages: lxml
Running setup.py install for lxml: started
Running setup.py install for lxml: still running...
Running setup.py install for lxml: finished with status 'error'
Complete output from command /var/www/html/plugins/enphasesecur/resources/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-60g1c6fr/lxml/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('
', '
');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-x1l68csp/install-record.txt --single-version-externally-managed --compile --install-headers /var/www/html/plugins/enphasesecur/resources/venv/include/site/python3.7/lxml:
Building lxml version 5.1.0.
/tmp/pip-install-60g1c6fr/lxml/setup.py:67: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources
Building without Cython.
Building against libxml2 2.9.4 and libxslt 1.1.32
running install
/tmp/pip-build-env-yuh_5dii/lib/python3.7/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

J’ai tenté de recompilé le fichier qui a généré l’échec, mais le script a néttoyé le dossier dans /tmp

cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInitkqgypnaq.c -o tmp/xmlXPathInitkqgypnaq.o

contenu du dossier inclus lors de la compilation

tree libxml2/
libxml2/
└── libxml
    ├── c14n.h
    ├── catalog.h
    ├── chvalid.h
    ├── debugXML.h
    ├── dict.h
    ├── DOCBparser.h
    ├── encoding.h
    ├── entities.h
    ├── globals.h
    ├── hash.h
    ├── HTMLparser.h
    ├── HTMLtree.h
    ├── list.h
    ├── nanoftp.h
    ├── nanohttp.h
    ├── parser.h
    ├── parserInternals.h
    ├── pattern.h
    ├── relaxng.h
    ├── SAX2.h
    ├── SAX.h
    ├── schemasInternals.h
    ├── schematron.h
    ├── threads.h
    ├── tree.h
    ├── uri.h
    ├── valid.h
    ├── xinclude.h
    ├── xlink.h
    ├── xmlautomata.h
    ├── xmlerror.h
    ├── xmlexports.h
    ├── xmlIO.h
    ├── xmlmemory.h
    ├── xmlmodule.h
    ├── xmlreader.h
    ├── xmlregexp.h
    ├── xmlsave.h
    ├── xmlschemas.h
    ├── xmlschemastypes.h
    ├── xmlstring.h
    ├── xmlunicode.h
    ├── xmlversion.h
    ├── xmlwriter.h
    ├── xpath.h
    ├── xpathInternals.h
    └── xpointer.h

C’est install de lxml via pip3 qui ne fonctionne pas sur ma cible. Cause probable incompatiblité avec la version de cython ou de gcc

Ci-dessous l’erreur en lançant un pip install depuis le shell

    creating build/temp.linux-aarch64-cpython-37
    creating build/temp.linux-aarch64-cpython-37/src
    creating build/temp.linux-aarch64-cpython-37/src/lxml
    aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0 -I/usr/include/libxml2 -Isrc -Isrc/lxml/includes -I/usr/include/python3.7m -c src/lxml/etree.c -o build/temp.linux-aarch64-cpython-37/src/lxml/etree.o -w
    aarch64-linux-gnu-gcc: fatal error: Killed signal terminated program cc1
    compilation terminated.
    Compile failed: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1
    cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInitdvyprlg_.c -o tmp/xmlXPathInitdvyprlg_.o
    cc tmp/xmlXPathInitdvyprlg_.o -lxml2 -o a.out
    error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1

Je n’ai pas de solutions, tu peu toujours supprimer ce paquet de la Surveillance du démon et voir si ça fonctionne sur ta machine

J’ai trouvé une solution, pas super propre mais ça fonctionne:

  • Installer lxml via le gestionaire de paquet apt
sudo apt-get install  python3-lxml   
  • Modifier le script l’installation: install_apt.sh
echo 50 > ${PROGRESS_FILE}                                                                                              
sudo -u www-data python3 -m venv --system-site-packages  $BASEDIR/venv  
...
#sudo -u www-data $BASEDIR/venv/bin/pip3 install --no-cache-dir lxml    
#echo 94 > ${PROGRESS_FILE} 

  • relancer l’installation des dépendances