Could common open source dependencies be a (con)federal government responsibility? The European Union does not have as large a software industry as the USA so there would be a less strong argument of government/corporate competition. It could take the form of government grants depending on the size. My rationale is that governments benefit from the general prosperity of open source more so than solo authors or small companies.
I am restricting the scope to simple and small libraries where investment is more clearly beneficial unlike Tensorflow as that is large and complex.
Here is an extreme example, the 'either' crate is a 'rayon' dependency and many others. Paradoxically a project of this size likely does not need funding but it is really important.
https://github.com/bluss/either
https://crates.io/crates/either/reverse_dependencies
With applications having so many dependencies, peculiar/'rogue' library changes are guaranteed.
Right now there are billionaires that are directly benefiting from the advantages of open source. It's time that they create foundations that focus on maintaining open source software and making sure that the movement continues. Or users need to pay a minimum amount at a certain point after they adopt it in a for profit venture. It doesn't have to be a large amount but it needs to be enough to keep the software up to date and free of bugs.
The Linux foundation is a good model. The foundation pays Linus Torvalds to oversee the OS's development and make sure it continues to be kept up to date.
I agree that software needs to be libre but it can't be at no cost forever. It's not maintainable. Very few people can donate their time and know-how for very long before they run out of money. At the very least, the programmers behind the software need to eat and have a place to live.