tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: A better method to require compiler features
Michael Bäuerle <micha%NetBSD.org@localhost> writes:
> I think in general this change would be a good idea. But for a package
> maintainer it may be harder to declare what is required with the
> proposed new system.
>
> It is unlikely that upstreams document the features used. Manually
> searching for all of them in the source code looks not very convenient,
> particularly if the list gets long in the future.
It may be unlikely, but an upstream failing to document build
requirements is absolutely an upstream bug. Mostly, they should say
something like "requires a C++17 compiler". If their requirements are
complicated, they should either document them, or set the wayback
machine and not allow use of features beyond the current C++NN. But
people tend to code to what the compiler in front of them expects,
rather than understanding and following standards.
> There should be some tool that checks for the features used in a
> source tree. Maybe as simple as searching for the header corresponding
> to a feature (e.g. "#include <filesystem>") and print the feature name
> that has to be added to USE_CXX_FEATURES.
There should, but it's not about pkgsrc. Every packaging system has
this issue. See my recent proposal to not allow building with
undeclared --std, explicitly or implicitly.
Home |
Main Index |
Thread Index |
Old Index