On Mon, 2020-12-21 at 10:36 +0100, Julien LAURENT-VARIN wrote: > I'm working with a big project, and i'm trying to compile it under > windows with WSL and ubuntu distribution ... but I met a problem with > unrecognized library member requirements ... To be more clear, I add > a very little program that reproduces the problem.
I'm not familiar with WSL so I can't say for sure. But, I think your problem is due to a terrible decision taken by the Debian project a while ago. They configured the ar tool to enable "deterministic mode" by default. See the man page for ar: D Operate in deterministic mode. When adding files and the archive index use zero for UIDs, GIDs, timestamps, and use consistent file modes for all files. When this option is used, if ar is used with identical options and identical input files, multiple runs will create identical output files regardless of the input files' owners, groups, file modes, or modification times. If binutils was configured with --enable-deterministic-archives, then this mode is on by default. It can be disabled with the U modifier, below. The Debian folks, in the grip of "determinism is what everyone should do by default" fever, decided to add --enable-deterministic-archives to their system configuration instead of the correct thing, which is to let people who want deterministic builds enable it for themselves. The problem with this is, as anyone would have realized if they'd asked, it totally breaks make's ability to manage archives because the timestamps in the archive are all set to 0. So, upshot: you should add the U option to your ARFLAGS to force ar to run in non-deterministic mode and see if that solves your problem: U Do not operate in deterministic mode. This is the inverse of the D modifier, above: added files and the archive index will get their actual UID, GID, timestamp, and file mode values. This is the default unless binutils was configured with --enable-deterministic-archives.