After GCC 7 switch dependencies on GCC runtime packages are incorrect
When a package depends on a library which can be found in RPATH and in standard path, pkgdepend generates require any dependency, like
depend fmri=pkg:/email@example.com fmri=pkg:/firstname.lastname@example.org type=require-any
developer/build/make , which depends on
Now, when system already has gcc-4-runtime installed (and it will by default), which delivers runtime libraries in /usr/lib ,
when one installs
developer/build/make, gcc-7-runtime is not installed and we likely have non-working make.
We've implemented the following workaround in oi-userland, when switched to GCC-6:
Likely, something similar should be implemented in illumos-gate (or we should fix pkgdepend and rely on it being fixed in build environment).
Updated by Joshua M. Clulow over 3 years ago
What about, instead, if distributions delivered a correct and sufficiently recent GCC runtime into
/usr/lib? This comes up with binaries built on other systems that are expected to run on many illumos distributions; e.g., the official Rust toolchain binaries. There isn't a way to nominate the correct RPATH for
libgcc_s.so.1 in a way that is generally correct for all distributions -- but it doesn't seem like that should matter, as the library is generally backwards compatible, and distributions could (and, I feel, should?) just deliver the latest well-tested one into
/usr/lib? The same should really apply to
Updated by Alexander Pyhalov over 3 years ago
We can do this if we are sure that our compilers completely ignore /usr/lib/libgcc_s.so*.
Otherwise there can be interesting effects, for example, when you build software on system with GCC 7-provided /usr/lib/libgcc_s.so*, and later transfer it to the system with GCC-4-provided /usr/lib/libgcc_s.so*.