5 ms·
> Debian 11, which isn't even released yet and has rustc 1.48, is already out of date and unable to compile most rust programs written for the rust spec just 3
by cogman10 5y ago
> Debian 11, which isn't even released yet and has rustc 1.48, is already out of date and unable to compile most rust programs written for the rust spec just 3 months later.
This comes up with Java as well. Lots of distros ship with "java X" and ignore the version march. Ultimately you end up going around package management if you want to stay up to date.
I'm not sure the best way to fix this. A lot of distros want to treat everything like they treat GCC and C++. C++ which releases new versions every 3 years or so which means that having a version of GCC 1 or 2 years out of date doesn't generally matter.
> the vast majority of devs using Rust are the type that use $latest features and Rust adds $latest features at a blinding rate compared to established languages.
A major complaint I have about rust devs is so many libs require nightly rust. That, IMO, is inexcusable. Sure, it's ok to try out those features, but why are you publishing libraries that REQUIRE those features to work? That seems like just a generally bad idea.
> This is also why 99% of rust documentation starts with telling you to install rust-up from out of repo third party sources: your local repository rust, no matter how new, is already out of date.
With browser and Java that's already the case so I don't see this as an issue with rust. I'm not sure the best way to solve this, but I hardly think it's a rust issue so much as it's a problem with how dependency management works today.
- steveklabnik 5y agoWhat libraries still hit that nightly pain for you today?
- cogman10 5y agohttps://github.com/master-of-zen/Av1an https://github.com/master-of-zen/Av1an just required it. Not technically a library but it's on my mind. Rocket still uses nightly https://rocket.rs/v0.4/guide/getting-started/ https://rocket.rs/v0.4/guide/getting-started/ Not sure about others but those are the two I think of. It's usually something that comes up when I start playing with rust and want to do X. Last few times I've done that the nightly requirement hits.
- pie_flavor 5y agoRocket publishes a library that requires nightly features to work because the alternative is not publishing the library that requires nightly features to work. I'm not sure what you think you're losing by the library existing on crates.io, but there really isn't a way of doing what rocket does without nightly. If there were, Rocket would be doing it (and stabilization for its features is fast approaching).
- steveklabnik 5y agoThanks. It’s always good to know. I rarely run into this anymore, so different perspectives are useful. (Rocket’s master branch doesn’t require nightly but they haven’t released yet, incidentally.)
- papaf 5y agoPacked SIMD [1] can be a pain because it pops up as a transitive dependency [2]. [1] https://github.com/rust-lang/packed_simd/blob/master/rust-toolchain https://github.com/rust-lang/packed_simd/blob/master/rust-to... [2] https://crates.io/crates/packed_simd_2/reverse_dependencies https://crates.io/crates/packed_simd_2/reverse_dependencies
- throwaway894345 5y agoI get the distinct impression that the existing Linux package management ecosystem has evolved so thoroughly around C/C++'s complete lack of sane build tooling or package management, and it's ironically difficult for some reason to embrace languages like Go or Rust which make package management trivial. I don't know if it's a tooling issue or what, but this seems to be a common problem. I'd be really interested in opinions from people who know more about Linux package management from the maintainer side.
- cogman10 5y agoI think Linus really hits the nail on the head here. It's the fact that core libs, like glibc, are CONSTANTLY changing their ABI making it damn near impossible to ship a binary from one version of the platform to the next https://www.youtube.com/watch?v=Pzl1B7nB9Kc https://www.youtube.com/watch?v=Pzl1B7nB9Kc . You can still run windows 95 apps in windows 10. But running a ubuntu 12.04 binary in ubuntu 21.04? No way.
- AnIdiotOnTheNet 5y agoIt is so hilariously bad that Linux has an easier time running Windows applications than it does Linux applications from an older (or newer, or sideways) distro. It's been like this for decades, it has been complained about for decades, but there seems to be very little desire to fix it.
- zozbot234 5y agoThis is what containers are for. Wine is nothing special, it just installs a Windows userspace container alongside your existing system.
- ynik 5y agoglibc is perfectly backwards compatible. We still build software on Debian 7 (glibc 2.13 from 2011) and the binaries works just fine on Debian 11 (and also on most other glibc-based distributions). But you need to be careful to only use libraries that provide long-term binary compatibility. Most libraries you can find in the system package manager don't do this. Also, on Linux it's weirdly difficult to do it the other way around: use the current distribution to build binaries that also run on older distributions. On Windows this is trivial: I can develop on Windows 10, with the current VS2019 and the current Windows 10 SDK, and a simple "#define _WIN32_WINNT 0x600" is sufficient to make my binary work all the way to Windows Vista (2006). On Windows it's normal to ship libraries in the application directory instead of depending on a global /usr/lib/ installation; so non-Microsoft libraries that don't maintain a stable ABI are much less problematic. Also, good luck if you're on Linux and want to use an up-to-date gcc (e.g. gcc-8 for C++17 support) on an older distribution. Building gcc from source is easy, but the resulting gcc-8 will produce binaries that require symbols from libgcc-8, which the system libgcc won't have. We actually ended up patching gcc to disable the optimizations that introduce uses of new symbols not yet present in deb7 libgcc.
- pjmlp 5y agoExcept Java has LTS versions, valid for three years, which most Java libraries tend to hold on to.
- cogman10 5y agoThis is a common misconception. LTS versions of Java are strictly a JDK vendor thing. There is no "LTS" for openjdk. So, while Oracle, AdoptOpenJDK, Azul, and other might have LTS releases of their JDKs, you get no support from the OpenJDK source. That means, Linux Distros would be in charge of backporting security fixes/support for their distributions of the JDK if they want LTS.
- pjmlp 5y agoIndeed, which doesn't happen at all with Rust.