mirror of
https://github.com/bitwiseworks/gcc-os2.git
synced 2026-02-14 14:15:02 +00:00
libstdc++ DLL binary incompatibility #9
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dmik on GitHub (Dec 27, 2019).
Originally assigned to: @dmik on GitHub.
While working on #6, I discovered the following. Given that we use our standard toolchain for our GCC 9.x build, the C++ DLL is now called
stdc++6.dll— just like on all other platforms. However, we provide it asstdcpp6.dllin the current set of 4.x RPMs (it was @ydario's decision — perhaps because + chars are something special that sometimes needs to be quoted). And this DLL is used by all C++ apps recently built using our RPM tool chain. So we need a forwarder for it.Creating forwarders is easy per se but we've got a problem with missing symbols. The following ones from
stdcpp6.dll(which is GCC 4.9.2) are missing from the new GCC 9.x DLL:Feeding it to c++filt gives this:
Re
__gnu_debug::_S_debug_messages, I have to figure that out. The rest looks related to these changes by @komh:203e99b908(native C++11 thread support) and2eafb765c8(native C++ locale support). I will try to look on how we can still provide these symbols in the forwarder but that will definitely take some time. If we fail to do so, we will have to use our legacy RPM machinery and provide a binary build ofstdcpp6.dllfrom 4.9.2 RPMs instead of a forwarder. I don't like this solution very much because it will double memory usage occupied by C++ classes when two apps using different DLLs are up and running.More over, there is another problem. Even before
stdcpp6.dllit was named juststdcpp.dll. This was for GCC RPMs for version 4.4.6. And there are still some apps built with GCC 4.4.6 and therefore using this DLL. Creating a forwarder for it is even harder as there are much more missing symbols. Currently, I don't know why as ABI should still be the same (see here) — perhaps the reason is that Yuri built these DLLs manually instead of letting the GCC makefie system do it. And that's not the only problem. The other one is that the package providing it is namedlibstdc++(as opposed tolibstdc++6which providesstdcpp6.dllin 4.9.2 RPMs). Andlibstdc++is the canonical name of the package. Our new 9.x RPMs (as well as all other platforms) have it like that. This means that it won't be possible to have bothlibstdc++packages (4.4.2 one and 9.x one) to be installed at the same time. I will also try to create a forwarder (which means resolve all missing symbols) and then decide. If I fail, we will use the legacy RPM machinery as well here.Anyway, it will take a few days to sort that out.