During the final linking stage openjpeg use -lstdc++. Thus it depends on libstdc++ being installed, but it does not declare it as dependency. This is particularly easy to notice when using emerge-wrapper with a clean target like x86_64-w64-mingw32 (though openjpeg doesn't compiler on that for other reasons). Reproducible: Always Steps to Reproduce:
- virtual/libstdc++ is for libstdc++.so.5 from GCC 3.3.x - openjpeg is a source based package - libstdc++.so.6 is part of sys-devel/gcc, if you don't have gcc, you don't have a sane system in other words: no, I won't make sys-devel/gcc a depend of media-libs/openjpeg, as gcc is part of system set.
gcc was compiled with "nocxx" flags (since it is for a cross-compile toolchain). While I'd prefer it if I didn't need a C++ compiler just to get libstdc++, is there a chance to make it at least give a sane error message, like "recompile gcc without nocxx"? I noticed that quite a few other packages have similar "issues" e.g. gettext requiring actually a C++ compiler even with the nocxx use flag.
(In reply to comment #2) > gcc was compiled with "nocxx" flags (since it is for a cross-compile > toolchain). > While I'd prefer it if I didn't need a C++ compiler just to get libstdc++, is > there a chance to make it at least give a sane error message, like "recompile > gcc without nocxx"? > I noticed that quite a few other packages have similar "issues" e.g. gettext > requiring actually a C++ compiler even with the nocxx use flag. > There's currently no sane way of checking if gcc is built without nocxx or not, you're pretty much on your own if you do that. None of the packages linking to libstdc++ does any kind of checking. virtual/libstdc++ is really only for old binary packages that need the old libstdc++.so.5... so that's totally unrelated to this problem Ideally we'd have an eclass, like cxx.eclass, which would check the compilers properties that's currently used and selected with gcc-config, that could then be reused in ebuilds... but it's currently no-avail. I suggest you bring this up in gentoo-dev mailinglist
Or possible a tc-has-cxx() function to toolchain-funcs.eclass, that grep's for something appropiate like languages and c++ for `gcc -v`. Either way, any movement on this belongs to the mailinglist...
yes, this is a mailing list topic USE=cxx is for packages with optional C++ support. it is not for packages which always require C++.