#970862 php-imagick cannot be loaded by apache2: Cannot allocate memory in static TLS block

Package:
php-imagick
Source:
php-imagick
Description:
Provides a wrapper to the ImageMagick library
Submitter:
procyon
Date:
2022-02-11 13:39:02 UTC
Severity:
normal
#970862#5
Date:
2020-09-24 13:29:08 UTC
From:
To:
Dear Maintainer,

loading the php module imagick fails with the following error in the apache2 error log:

PHP Warning:  PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/lib/php/20180731/imagick.so (/lib/aarch64-linux-gnu/libgomp.so.1: cannot allocate memory in static TLS block), /usr/lib/php/20180731/imagick.so.so (/usr/lib/php/20180731/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

on an arm64 system (Raspberry Pi 4B).

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
     I installed php-imagick and restarted apache2.
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
     The php module imagick could not be loaded.
   * What outcome did you expect instead?
     The php module imagick should be loaded without errors.

#970862#10
Date:
2020-09-24 13:52:50 UTC
From:
To:
Hi,

that doesn’t really seem to be a problem in the php-imagick:

/lib/aarch64-linux-gnu/libgomp.so.1: cannot allocate memory in static TLS block

Ondrej
--
Ondřej Surý (He/Him)
ondrej@sury.org

#970862#19
Date:
2020-09-25 08:24:09 UTC
From:
To:
Hi,

according to [1] this is a bug in "whatever dlopened libgomp.so.1 and
before doing that ate all the preallocated TLS area.", so yes, it seems
to be a bug in php, php-imagick, or even apache2-bin (I do not know, I
am not an experienced programmer).

However, I was able to fix this for my setup by adding the line
export LD_PRELOAD="libgomp.so.1:${LD_PRELOAD}"
to /etc/apache2/envvars and now everything runs fine.

 From my point of view, you can either tag this bug as fixed or wontfix,
as you prefer.

Sincerely,
procyon

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1722181#c6

Am 24.09.2020 um 15:52 schrieb Ondřej Surý:

#970862#26
Date:
2021-04-15 07:47:02 UTC
From:
To:
-- 
you see my message?

#970862#31
Date:
2022-02-11 13:36:10 UTC
From:
To:
Hallo, ich hoffe du hast meine Nachricht erhalten.
Ich brauche schnelle Antworten
Danke.
Katie