Bug#876901: QFINDTESTDATA uses __FILE__

Ximin Luo infinity0 at debian.org
Wed Nov 15 10:57:00 UTC 2017

Pino Toscano:
> In data martedì 14 novembre 2017 11:14:00 CET, Ximin Luo ha scritto:
>> You're using __FILE__ inappropriately, none of the documentation
>> guarantees or implies that you can access __FILE__ as a real
>> filesystem path. "Surely for relative paths" is your justification
>> for your own broken behaviour.
> Again, this is your own echo chamber: "__FILE__ is broken, everybody
> using it is broken no matter what".

It's not my "own echo chamber", I pointed you to lots of docs that confirm your usage of __FILE__ is not appropriate here.

Adrian Bunk also mentioned the C89 to me on IRC yesterday. Again, the wording gives no guarantee that __FILE__ should represent a real filesystem path.

If my previous words were a bit terse I am sorry for that, but I don't appreciate comments like "Any of your solutions get a big, fat, and giant nope" after trying to explain the problem and present you with no less than 4 alternative simple unintrusive solutions.

>> You can either accept my one line patch suggestion, or fix it some
>> other way.
> I am not interested in working around broken changes introduced blindly
> for very doubtful reasons.
>> I'm not going to change the GCC patch, it does nothing wrong.
> Let me add also another POV to this approach: do you really expect
> Debian to carry this important diversion for GCC upstream?  I really
> doubt GCC will accept this.

I'm in the process of getting the patch into GCC. We certainly don't intend to keep this as a Debian-specific thing. [1] If they don't accept it, you don't need to patch your package - but I'd say the use of __FILE__ is still not the best, since no documentation implies it can be used to find files, and all the examples only mention error messages.

And to be clear, in case Holger's earlier messages were missed, the FTBFS is currently only on tests.r-b.org and not on the official Debian archive.


[1] Although interestingly, NetBSD have a GCC patch that was written by us (dkg specifically) for a related purpose, that was not accepted into GCC. But they use it for reproducibility purposes.

GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE

More information about the Reproducible-builds mailing list