Ubuntu 22.04.1 : GCC 11 ( -fcommon ) : Issue … Multiple definition of.

Avec GCC 11 on a changer la valeur par défaut.

Donc pour supprimer les problèmes (de facon rapide) il suffit d’ajouter la directive -fcommon. La solution idéale est de revoir le code … et surtout les .h.

Misère.

Pour information Ubuntu 22.04.1 utilise gcc 11.2.0-19 .

La doc : https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html

-fcommon

In C code, this option controls the placement of global variables defined without an initializer, known as tentative definitions in the C standard. Tentative definitions are distinct from declarations of a variable with the extern keyword, which do not allocate storage.

The default is -fno-common, which specifies that the compiler places uninitialized global variables in the BSS section of the object file. This inhibits the merging of tentative definitions by the linker so you get a multiple-definition error if the same variable is accidentally defined in more than one compilation unit.

The -fcommon places uninitialized global variables in a common block. This allows the linker to resolve all tentative definitions of the same variable in different compilation units to the same object, or to a non-tentative definition. This behavior is inconsistent with C++, and on many targets implies a speed and code size penalty on global variable references. It is mainly useful to enable legacy code to link without errors.

Humhub v1.11.1 : Migration de php 7.3 vers php 7.4


J’ai du faire un update de PHP afn de pouvoir mettre la dernière version de Humhub :

sudo apt -y install lsb-release apt-transport-https ca-certificates 
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list
sudo apt update
sudo apt -y install php7.4

Ma release de Debian :

# cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
# php -v
PHP 7.4.29 (cli) (built: Apr 22 2022 06:44:32) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.29, Copyright (c), by Zend Technologies

La seconde étape :

# sudo a2dismod php7.3
Module php7.3 disabled.
To activate the new configuration, you need to run:
  systemctl restart apache2
# sudo a2enmod php7.4
Considering dependency mpm_prefork for php7.4:
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Module mpm_prefork already enabled
Considering conflict php5 for php7.4:
Enabling module php7.4.
To activate the new configuration, you need to run:
  systemctl restart apache2
# systemctl restart apache2

Ensuite rien ne fonctionnait … j’ai donc ajouté ceci :

# apt install php7.4-common php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-curl 
php7.4-gd php7.4-imagick php7.4-cli php7.4-dev php7.4-imap php7.4-mbstring 
php7.4-opcache php7.4-soap php7.4-zip php7.4-intl -y
# systemctl restart apache2

Ubuntu 20.04 : Thunderbirds impossible d’enregistrer un fichier

Il était impossible d’ouvrir un dossier ou d’enregistrer un fichier, j »ai donc vu qu’il manquait un package :

$ sudo apt-get install xdg-desktop-portal-gtk
...
Les paquets supplémentaires suivants seront installés :
  xdg-desktop-portal
Les NOUVEAUX paquets suivants seront installés :
  xdg-desktop-portal xdg-desktop-portal-gtk
...

Je pense qu’il manque donc une dépendence entre Thunderbirds et xdg-desktop-portal.

A suivre.

Migration d’un fichier PST (Outlook) vers Thunderbird Linux

Etape 1 : Mettre en place le bon soft :

# sudo apt-get -y install pst-utils

Etape 2 : Conversion :

# readpst -u backup-2021.pst
# find out -type d | tac | grep -v '^out$' | xargs -d '\n' -I{} mv {} {}.sbd
# find out -name mbox -type f | xargs -d '\n' -I{} echo '"{}" "{}"' | sed -e 's/\.sbd\/mbox"$/"/' | xargs -L 1 mv
# find out -empty -type d | xargs -d '\n' rmdir
# find out -type d | egrep '*.sbd' | sed 's/.\{4\}$//' | xargs -d '\n' touch
# mv out/Boîte\ de\ réception.sbd/ ../snap/thunderbird/common/.thunderbird/zy3zk9ms.default/Mail/Local\ Folders/.
# touch ../snap/thunderbird/common/.thunderbird/zy3zk9ms.default/Mail/Local\ Folders/Boîte\ de\ réception
# touch ../snap/thunderbird/common/.thunderbird/zy3zk9ms.default/Mail/Local\ Folders/Boîte\ de\ réception.msf

A noter que le ID : zy3zk9ms n’est pas le même suivant les installations. Et aussi j’ai une installation sous snap, donc le répertoire n’est pas standard.

J’ai 42 Go d’email :

# du -sh ../snap/thunderbird/common/.thunderbird/zy3zk9ms.default/Mail/Local\ Folders/
42G	../snap/thunderbird/common/.thunderbird/zy3zk9ms.default/Mail/Local Folders/

Misère.