You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running on my Mac Mini (M2 chip) macOS Sonoma (14.6.1).
This occurs in PHP 8.2, but PHP 8.3 seems unaffected.
PHP Version
8.2.19
Environment/Platform
Command-line application
Web application
Serverless
Other (please specify)
Description
OMP: Error #15: Initializing libomp.dylib, but found libomp.dylib already initialized.
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://openmp.llvm.org/
Abort trap: 6
Sorry, I should have said. I'm currently on 0.5.1, but I noticed it when upgrading from 0.4.4 (which seems unaffected) to 0.5.0 Also happens on current main branch.
It's possible there's some problem with the FFI extension in my PHP 8.2 setup, but I just recompiled and upgraded to PHP 8.2.22. Same problem.
As mentioned, there's no problem under my PHP 8.3 setup, so the issue will go away for me. I thought it was worth reporting anyway.
I have tried for a couple of days now to reproduce the problem on my device and I haven't been able to. I have imagick installed and enabled for both PHP 8.2 and 8.3 on my MacBook Air M1 and I still haven't been able to hit the error.
Is there any more relevant information you could give me to experiment further on my end like how you installed PHP and imagick?
I installed the imagemagick library via Homebrew (7.1.1-38). I compiled the imagick PHP extension (3.7.0) from source (downloaded from PECL). These are all the latest versions.
I'm out of my depth here, but happy to provide any info you need, or try things / recompile things.
I can reproduce that as well. Also using https://github.com/shivammathur/homebrew-extensions. libomp is apparently a dependency of imagick. For PHP 8.3 for example, you can run brew deps shivammathur/extensions/imagick@8.3 to see the dependencies and there, libomp is part of the list 😊
Activity
CodeWithKyrian commentedon Aug 29, 2024
Which version of the package are you running with?
timwhitlock commentedon Aug 29, 2024
Sorry, I should have said. I'm currently on 0.5.1, but I noticed it when upgrading from 0.4.4 (which seems unaffected) to 0.5.0 Also happens on current main branch.
It's possible there's some problem with the FFI extension in my PHP 8.2 setup, but I just recompiled and upgraded to PHP 8.2.22. Same problem.
As mentioned, there's no problem under my PHP 8.3 setup, so the issue will go away for me. I thought it was worth reporting anyway.
cappuc commentedon Sep 2, 2024
I had the same problem but with php 8.3.
After some tests I found that disabling
imagickextension fixed the problem.timwhitlock commentedon Sep 2, 2024
I can confirm that my PHP 8.2 environment has
imagickinstalled, but my 8.3 env does not!CodeWithKyrian commentedon Sep 4, 2024
I have tried for a couple of days now to reproduce the problem on my device and I haven't been able to. I have
imagickinstalled and enabled for both PHP 8.2 and 8.3 on my MacBook Air M1 and I still haven't been able to hit the error.Is there any more relevant information you could give me to experiment further on my end like how you installed PHP and imagick?
cappuc commentedon Sep 5, 2024
I installed the extension from https://github.com/shivammathur/homebrew-extensions not with pecl
timwhitlock commentedon Sep 5, 2024
I installed the
imagemagicklibrary via Homebrew (7.1.1-38). I compiled theimagickPHP extension (3.7.0) from source (downloaded from PECL). These are all the latest versions.I'm out of my depth here, but happy to provide any info you need, or try things / recompile things.
Toflar commentedon Aug 20, 2025
I can reproduce that as well. Also using https://github.com/shivammathur/homebrew-extensions.
libompis apparently a dependency ofimagick. For PHP 8.3 for example, you can runbrew deps shivammathur/extensions/imagick@8.3to see the dependencies and there,libompis part of the list 😊