-
-
Notifications
You must be signed in to change notification settings - Fork 297
Description
> I can reproduce this 8.3 bug locally on my debian vm, seems it's a linking dynamic libstdc++.so bug. But I have no idea why opcache happen to get this error.
Hmmm intresting. I finally found which extension caused it. When I build opcache
alone, it's ok. But when I build opcache,intl
or opcache,imagick
, it failed in ./configure
. But opcache,swoole
is working, that's weird.
If it is just because of the error of libstdc++.so, then swoole should not compile successfully. But when I realized that intl
and imagick
have letters before opcache
, and swoole
has letters after opcache
, then this makes sense. And I renamed ext/swoole
to ext/aswoole
, it failed as expected.
But why does the 8.3 opcache extension incorrectly use libstdc++.so
when including C++ dependencies instead of the other libraries? In theory we would only manually insert -lstdc++
at the final make
step.
Also, if I use the opcache,imagick
combination, it has not only libstdc++
, but also libgomp
(libgomp is added here
$extra_libs .= (empty($extra_libs) ? '' : ' ') . '-lgomp '; |
configure:70964: checking for sysvipc shared memory support
configure:71038: x86_64-linux-musl-gcc -o conftest -fPIE -ffp-contract=off -fvisibility=hidden -pthread -I/home/jerry/project/static-php-cli/buildroot/include -D_GNU_SOURCE -D_REENTRANT -L/home/jerry/project/static-php-cli/buildroot/lib -Wl,-rpath,/home/jerry/project/static-php-cli/buildroot/lib/pkgconfig/../../lib -L/home/jerry/project/static-php-cli/buildroot/lib/pkgconfig/../../lib -Wl,-rpath,/home/jerry/project/static-php-cli/buildroot/lib -L/home/jerry/project/static-php-cli/buildroot/lib conftest.c -lgomp -lrt -lm -ldl -lpthread -lm -lpthread -lMagickWand-7.Q16HDRI -ltiff -ljpeg -lz -lm -ljpeg -lz -lfreetype -lpng16 -lz -ljpeg -lpng16 -lz -lheif -lstdc++ -lde265 -lstdc++ -laom -lm -ljpeg -lsharpyuv -lz -lbrotlidec -lbrotlicommon -lwebpmux -lwebpdemux -lwebp -lsharpyuv -lwebp -lsharpyuv -lxml2 -liconv -lm -licui18n -licuuc -licudata -lpthread -lm -lz -lzip -lbz2 -lssl -lcrypto -lz -lm -lpthread -lgomp -lm -lMagickCore-7.Q16HDRI -ltiff -ljpeg -lz -lm -ljpeg -lz -lfreetype -lpng16 -lz -ljpeg -lpng16 -lz -lheif -lstdc++ -lde265 -lstdc++ -laom -lm -ljpeg -lsharpyuv -lz -lbrotlidec -lbrotlicommon -lwebpmux -lwebpdemux -lwebp -lsharpyuv -lwebp -lsharpyuv -lxml2 -liconv -lm -licui18n -licuuc -licudata -lpthread -lm -lz -lzip -lbz2 -lssl -lcrypto -lz -lm -lpthread -lgomp -lm >&5
configure:71038: $? = 0
configure:71038: ./conftest
Error loading shared library libgomp.so.1: No such file or directory (needed by ./conftest)
Error loading shared library libstdc++.so.6: No such file or directory (needed by ./conftest)
Originally posted by @crazywhalecc in #622 (comment)
Related workflow runs:
- https://github.com/crazywhalecc/static-php-cli/actions/runs/13964694286/job/39092395766?pr=663#step:11:15607
- https://github.com/crazywhalecc/static-php-cli/actions/runs/13974139212/job/39123422137?pr=661
Related PR:
Activity
henderkes commentedon Mar 20, 2025
Are you not setting LD_PRELOAD path for the spc configure option? It should find lstdc++ and lgomp in the musl paths.
crazywhalecc commentedon Mar 21, 2025
@DubbleClick I realized that this might not be a problem with the stdc++ library, but perhaps a configuration bug in some extension that caused this check to include dependencies on other extensions. There shouldn't be any other dependencies here.
But it seems that this problem only occurs on macOS, so I may have missed something. It may be a lot of work to solve it from the original source.
crazywhalecc commentedon Jul 23, 2025
Looks like we have no issue currently in main branch.