Re: Fedora 36 / uninative GLIBCXX 3.4.30
Federico Pellegrin
Hello, Thanks for the feedback! Indeed the check is only on the "ldd --version" output which doesn't account for the libstdc++ and that explains it. As compared to Ubuntu 22.04, Fedora 36 actually has also GCC 12.0.1 as default compiler. As Martin mentions not sure if there is an easy portable way. He mentions objdump which is for sure effective but maybe complicated and I feel like relies on the filename being guessed (well should be known, the main link at least) and feels a bit overcomplicated (if we need to go that low level in case I'd suggest just to just use "strings" and grep there instead). Would relying just on the filename be too shaky? I can see here https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html in point 3 of "History" that it would seem quite well defined. Actually I guess if we would just compare the system libstdc++.so.X.Y.Z (which we may be easily able to get it from the libstdc++.so link) to uninative oneĀ maybe would be enough to determine it is newer? Hardcoding the path to libstdc++.so (as ie. /usr/lib64/libstdc++.so) is probably not nice (ie. for custom toolchains), so maybe we can ask g++ (-print-search-dirs, libraries section) and look in those? Then not sure if there are some distros/installs that do the insane-isy thing of just installing directly the .so stripping the versions from the name, hopefully not. I'm not sure using anything from g++ -dumpspecs would be viable if as Martin mentions you may have (ie. ubuntu-2204) a version with new stdc++ but older g++. Federico
Il giorno dom 3 apr 2022 alle ore 16:52 Martin Jansa <martin.jansa@...> ha scritto:
|
|