3 ms·
The biggest reason (for me anyway) to restrict which gcc I use (and stick to the system-provided one) is so I don't need to distribute libstdc++ and libgcc_s wi
by jjnoakes 8y ago
The biggest reason (for me anyway) to restrict which gcc I use (and stick to the system-provided one) is so I don't need to distribute libstdc++ and libgcc_s with my program.
The RedHat devtoolset was a nice solution to this (use a newer gcc version, but link to the system libraries), but if that isn't available, then building with the system compilers helps in this area.
Rust doesn't have this problem when rust programs are statically linked, but if distros start shipping rust shared libraries which other programs start depending on, and/or some of the rust standard lib ends up in a system shared library, some of the same issues may arise (or maybe not, rust may have solved them in a clever way).
- steveklabnik 8y agoIt's not the end of the world for distros; they pick a single Rust version, and so shared libraries work for them. They do need to recompile the world when they update the compiler, but it's a single recompile each time.
- jjnoakes 8y agoRight - and so you get same situation that you have in C++-land (if I'm understanding you correctly) where compiling arbitrary rust programs with the distro compiler level may benefit you if you want to depend on the system-provided rust shared libraries.
- steveklabnik 8y agoYep.
- gdy 8y agoDLL hell on Linux.
- jjnoakes 8y agoNot really; there's a few substantial differences between shared objects with SONAMEs and link-time vs run-time file system names and LD_LIBRARY_PATH and /etc/ld.so.conf vs DLLs and searching PATH (starting with "."). I don't know much about modern Windows (SxS, etc) so things may have improved there, but last I looked (a while back admittedly) DLL hell and shared object issues were in different leagues.
- gdy 8y agoWell, I might have misunderstood the original problem. >so I don't need to distribute libstdc++ and libgcc_s with my program Could you explain why you want to avoid that?