+1 And if we can have a README file under the cpp client distribution directory. It should be great. Users can find the explanation of what legacy means.
Regards, Penghui On Mon, Sep 4, 2023 at 7:54 PM Yunze Xu <x...@apache.org> wrote: > Hi all, > > Currently the official released pre-built binaries for Linux include: > - RPM packages for RedHat-based Linux distros > - DEB packages for Debian-based Linux distros > - APK packages for Alpine-based Linux distros > > Though they are provided in different Linux distributions, they are > all compiled with GCC. However, only the RPM package is built with GCC > < 5. GCC 5 brings a breaking ABI change [1] to the std::string, which > is widely used in the Pulsar C++ client interfaces as the byte array. > In short, the impact is, if you're using GCC >= 5 > 1. You have to add the -D_GLIBCXX_USE_CXX11_ABI=0 compile option to > use the pre-built RPM package. > 2. If your application depends on other 3rd party libraries that are > built with GCC >= 5, the pre-built RPM package cannot be used > together. > > So for users that use GCC >= 5, the current RPM package is very > unfriendly especially for the 2nd case. As a workaround, they have to > build libraries by themselves, while installing dependencies might be > complicated in C++ world. > > However, CentOS 7, whose EOL is 2024-06-30 [2], is still widely used. > In addition, if you're going to upgrade your GCC via devtoolset, the > installed GCC still does not have the cxx11 ABI [3]. So I don't think > it's good to drop the support for old ABIs for RedHat users. > > In short, I suggest adding separated pre-built binaries with new ABIs > for RPM packages. The hierarchy will be: > > rpm-arm64/aarch64/ ---- RPMs with new ABIs > rpm-arm64/aarch64/legacy ---- RPMs with old ABIs > rpm-x86_64/x86_64/ ---- RPMs with new ABIs > rpm-x86_64/x86_64/legacy ---- RPMs with old ABIs > > See [4] for the current hierarchy. > > After that, we should document the difference here [5]. > > [1] https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html > [2] https://wiki.centos.org/About/Product > [3] https://bugzilla.redhat.com/show_bug.cgi?id=1546704 > [4] https://archive.apache.org/dist/pulsar/pulsar-client-cpp-3.3.0/ > [5] https://pulsar.apache.org/docs/3.1.x/client-libraries-cpp-setup/ > > Thanks, > Yunze >