Skip to content

8.3.33 linux-x86_64-gnu tarball is missing lib/libstdc++.a — static links fail on ICU's C++ symbols #49

Description

@luthermonson

php-sdk-8.3.33-linux-x86_64-gnu.tar.gz does not contain lib/libstdc++.a. Every neighbouring release does. ICU still ships in the same tarball, and ICU is C++, so anything linking this SDK statically fails with undefined C++ runtime symbols.

Evidence

Listing archive members of the released Linux tarballs:

Linux SDK libstdc++.a libicuuc.a total .a in lib/
8.3.31 present present 38
8.3.33 absent present 37
8.4.23 present present 38
8.4.24 present present 38

Exactly one file, only in this release.

Downstream failure

ePHPm's crates/ephpm-php/build.rs links the bundled archive when it finds it:

warning: ephpm-php@0.1.0: probe libstdc++.a at .../php-sdk/8.3.33-linux-x86_64-gnu/lib/libstdc++.a: found=false

and then the link dies:

rust-lld: error: undefined symbol: operator new(unsigned long)
rust-lld: error: undefined symbol: __cxa_begin_catch
rust-lld: error: undefined symbol: __gxx_personality_v0
rust-lld: error: undefined symbol: vtable for __cxxabiv1::__si_class_type_info
rust-lld: error: undefined symbol: std::condition_variable::condition_variable()
rust-lld: error: too many errors emitted, stopping now

Reproduced in CI on ephpm/ephpm#373, which does nothing but move the 8.3 pin from 8.3.31 to 8.3.33. Same code, same build.rs, only the SDK version differs — 8.3.31 links clean.

Why it matters right now

8.3.33 is the release ePHPm needs in order to fix #47 — Windows PHP 8.3 builds currently run with OPcache silently disabled, and 8.3.33 is the oldest 8.3 SDK carrying the supported_sapis allowlist patch. This regression is the only thing blocking that fix, since the pin is per-minor and cannot be set per-platform.

Note on intent

This looks unintentional rather than a deliberate change: bundling libstdc++ is documented behaviour in the tarball's own THIRD-PARTY-NOTICES.txt ("Bundled so consumers link the same C++ runtime static-php-cli compiled ICU and libxml2 against"), and dropping it while keeping ICU leaves the tarball internally inconsistent. If it was deliberate, the notices file and the consumer guidance need updating too, and consumers need a documented way to supply their own C++ runtime.

Suggested fix

Rebuild the 8.3.33 linux-x86_64-gnu lane (and check linux-aarch64-gnu, plus the musl linux-* variants, which were not inspected here) so libstdc++.a is staged into lib/ as it is for 8.3.31 / 8.4.23 / 8.4.24.

Worth adding a completeness assertion to the packaging step: the Linux Package SDK job could fail if libicuuc.a is present without libstdc++.a, which is exactly the inconsistent state shipped here.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions